summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_fragprog.c
AgeCommit message (Collapse)Author
2007-10-07r300: fragprog tex instruction now take writemask into acount.Jerome Glisse
2007-05-11r300: Use __FUNCTION__ not __func__.Oliver McFadden
Just for consistency; most of the code already uses __FUNCTION__.
2007-05-09r300: Added some more Doxygen documentation and made some functions static.Oliver McFadden
2007-05-09r300: Added a few more Doxygen comments.Christoph Bill
2007-05-09r300: Converted "rp" variables (r300_fragment_program) to "fp".Oliver McFadden
2007-05-09r300: Fixed indenting from previous commitOliver McFadden
d28f6d91760374e2eb71b541b0f259f81dd73c69.
2007-05-09r300: Fixed some more function names.Oliver McFadden
Note there might be some calls to the old function names in conditionally disabled code, but I think I've got them all.
2007-05-09r300: Last of the indent changes. :)Oliver McFadden
2007-05-09r300: Indented r300_fragprog.[ch].Oliver McFadden
2007-03-26r300: Fix warnings that were introduced by the glsl mergeNicolai Haehnle
2007-03-26merge of glsl-compiler-1 branchBrian
2007-03-25r300: Fix regression: unnecessary node indirectionNicolai Haehnle
The texture_rectangle fix introduced a bug where every texture instruction caused a new indirection.
2007-03-24r300: Fix texture coordinate calculation for rectangle texturesNicolai Haehnle
R300 hardware takes texcoords in the range 0..1 even for rectangle textures. Previously, the necessary texcoord conversion was applied to the texture coordinate during vertex processing in a render stage. This is obviously wrong when fragment programs are used, which can calculate arbitrary coordinates for TEX instructions. Therefore, we now inject an appropriate MUL instruction before a TEX that reference a rectangle texture.
2007-03-21merge from masterBrian
2007-03-21r300: Remove the program-global const_sin indexNicolai Haehnle
The index is no longer necessary to share constants between multiple SIN/COS/SCS instructions inside a single fragment program, and storing a tiny implementation detail like this in the fragment_program structure itself was just nasty.
2007-03-19r300: Cleanup fragment program constant allocation, share constantsNicolai Haehnle
The constant/parameter allocation was significantly simplified, removing one unnecessary copy operation of parameters. The dirty state tracking is unchanged and far from optimal, since all state is always re-fetched. Constants and parameters are now emitted only once, which significantly reduces the resource pressure on larger programs.
2007-03-19r300: Fix special case (tmp.x <= 0) in fragment program LIT instructionNicolai Haehnle
Also, fix a typo in a related comment.
2007-03-19r300: Clear fragment program instruction slots on first useNicolai Haehnle
Make sure that instruction slots are fully initialized with NOPs during find_and_prepare_slot(). This fixes a bug when a fragment program was translated more than once (e.g. due to a second call to glProgramStringARB). This partially fixes glean/fragProg1.
2007-03-19r300: Dump fragment program after translation if RADEON_DEBUG=pixel is setNicolai Haehnle
2007-03-19r300: Whitespace cleanup (remove trailing spaces)Nicolai Haehnle
2007-03-19r300: Fix WRITEMASK handling when writing to result.depthNicolai Haehnle
This is a necessary change to emit the right instructions when writing to result.depth. However, even with this test, Z-write doesn't work properly, and I don't fully understand why. In addition to this, we'll at least have to disable early-Z, but even that doesn't seem to be enough.
2007-03-19r300: Streamlined fragment program LIT implementationNicolai Haehnle
Fix a bug in the LIT implementation (clamp exponent to 128, not 0.5) and change the implementation around. In theory, the new implementation needs as little as 5 instruction slots. Unfortunately, the dependency analysis in find_and_replace_slot is not strong enough to look at individual components of a register yet.
2007-03-19r300: Fix fragment program reorderingNicolai Haehnle
Do not move an instruction that writes to a temp forward past an instruction that reads the same temporary.
2007-03-19r300: Fragment program dumps format tex instructionsNicolai Haehnle
2007-03-19r300: Fix hw fragment program dumpNicolai Haehnle
Dumps of fragment programs were incorrect when the program consisted of multiple nodes. Also, improved the formatting a bit.
2007-03-19r300: Fix fragment program instruction pairing and register allocationNicolai Haehnle
There were a number of bugs related to the pairing of vector and scalar operations where swizzles ended up using the wrong source register, or an instruction was moved forward and ended up overwriting an aliased register. The new algorithm for register allocation is quite conservative and may run out of registers before necessary. On the plus side, It Just Works. Pairing is done whenever possible, and in more cases than before, so in practice this change should be a net win.
2007-03-15r300: Added _mesa_copy_instructions.Oliver McFadden
2007-03-15r300: Use _mesa_alloc_instructions/_mesa_init_instructions instead of malloc.Oliver McFadden
Note that insert_wpos in r300_vertexprog.c is still a little flaky and could be improved.
2007-03-15r300: Updated R300 to use the new SWIZZLE macros.Oliver McFadden
2007-03-15Committed Rune Petersen's fragment.position patch (Bug #10024) plus a few smallOliver McFadden
corrections.
2007-03-09Merge branch 'origin' into glsl-compiler-1Brian
Conflicts: src/mesa/main/context.c
2007-03-01Optimize cos&sin instruction a bit more.Rune Petersen
2007-02-23Update DRI drivers for new glsl compiler.Brian
Mostly: - update #includes - update STATE_* token code
2007-02-14r300: Fix cos & add scs to fragment program.Rune Peterson
So this do : - Fixes COS. - Does range reductions for SIN & COS. - Adds SCS. - removes the optimized version of SIN & COS. - tweaked weight (should help on precision). - fixed a copy paste typo in emit_arith().
2007-02-12r300: Add proper support for sin/cos instruction in fragment programRune Peterson
Getting proper SIN and COS wasn't as easy as it appeared. I had to make make some changes to the fragment program code. general FP changes: - support HHH swizzle for vector instructions. - don't copy a source to a temp when it is not XYZW swizzled, but combine the two and have the swizzle resolve any issues. (saves temps/instructions with more elaborate shader code) - fix overflow in cnstv[].
2007-01-11Fix typo from commit 1d312ae0137eb39bf74fac91eb97ed25c289a4ca .Jerome Glisse
2007-01-04r300: Correct bug introduced by fragprog rework.Jerome Glisse
Thx for Tilman who spoted the bugs.
2006-12-25Rework r300 fragprog avoid using bitfield structure.Jerome Glisse
It seems that bitfield structure lead to some strange problem on 64bits arch, don't want to waste time debugging strange things like that so converted pfs_reg_t structure to a GLuint and use good old masking and shifting spell. (cherry picked from 2a7de9d095d8e60da12b11aaa1efe664b87b11d3 commit)
2006-11-20Disable fragment program debug messages.Rune Petersen
2006-11-17fragment.position supportRune Petersen
World position is calculated in the vertex shader and passed to the fragment shader via an unused texcoord.
2006-11-05Add sin instruction to fragment program.Jerome Glisse
There is a bug somewhere in fragment program. tri-cos and tri-sin show the bug. Also we should not emit multiple time the same constant. for sin,cos,lit have to fix that.
2006-11-04Add cos instruction and remove left over debug.Jerome Glisse
2006-11-01Add LIT instruction to fragment program.Jerome Glisse
2006-08-31re-apply shader fix.Rune Petersen
appears to have been reverted by mistake.
2006-07-20Some structure renaming. Prefix vertex/fragment-related structs withBrian Paul
"gl_" to match other structs.
2006-07-15A small logic error.Rune Petersen
We need to call do_swizzle() when the scaler _or_ vector unit have a swizzle other 000/ZERO/111/ONE. This ensures that the gloss on banners in ut2004 is not angel-dependent (since when was banners glossy?).
2006-05-23init mask=0 to silence warningBrian Paul
2006-03-29FP textures and fixes (Ewald Snel)Brian Paul
2006-03-13Clean build.Aapo Tahkola
2006-01-27remove broken non arb fp pathAapo Tahkola