summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_fragprog.c
AgeCommit message (Collapse)Author
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
2006-01-21Do individual negetation in swizzling, thus we canJerome Glisse
save one instruction in some case.
2006-01-21Indent & wrap around 80Jerome Glisse
2006-01-21Add individual component negation.Jerome Glisse
2006-01-13namespace pollution fixes (Tilman Sauerbeck)Aapo Tahkola
2006-01-09Missing patch from Ben Skeggs:Aapo Tahkola
Lots of changes, and fixes for some badness on my behalf. 1. Disposable data used during fp compile is now per-context, rather than per-program to save memory. 2. Track usage of INPUT/TEMP registers from Mesa program, free them when no longer required so the hw temps can be re-used. 3. Changed LAST_NODE to OUTPUT_COLOR (see r300_reg.h) 4. Implemented remaining ARB_f_p instructions, with the exception of the trig/LIT opcodes. 5. Treat ZERO/ONE swizzles the same way as other native swizzles. 6. emit_arith changes, basically a complete re-write. Should produce cleaner instructions, but no real functional changes. internal reg -> hw reg routines shared with emit_tex. A bit messy still.
2006-01-09Fix node setup(from Ben Skeggs)Aapo Tahkola
2005-11-20Make Saturate a 2-bit field again, renamed to SaturateMode with threeBrian Paul
possible values: SATURATE_OFF, SATURATE_ZERO_ONE and SATURATE_PLUS_MINUS_ONE.
2005-11-19remove #include arbfragparse.hBrian Paul
2005-11-12Move stuff common to vertex/fragment_program into the base class, including:Brian Paul
Instructions, InputsRead, OutputsWritten, and Parameters. Also, added debug functions: _mesa_print_instruction(), _mesa_print_program_parameters() and revamp _mesa_print_program().
2005-11-07s/_mesa_debug_fp_inst/_mesa_print_program/Brian Paul
2005-11-05Unify vertex/fragment program instuctions.Brian Paul
Based on patch by Ian (#4967) but also unify instruction opcodes.
2005-10-31fix problems found with gcc 2.96 (bug 4934)Brian Paul
2005-10-26Reduce stderr noise and fix some compiler warnings.Aapo Tahkola
2005-07-20Clean up warnings in r300 code by making some symbols static, adding prototypesEric Anholt
for others, and being cleaner with types in fragment/vertex program structures. One warning in r300_shader.c is still concerning.
2005-06-08- Secondary colourBen Skeggs
- Calculate tc_count in EmitArrays (enabled units != nr texcoords).
2005-06-06TEX to outputBen Skeggs
2005-06-05Fix xyz/w interaction (needs a cleanup still..)Ben Skeggs
Use SRC0A instead of WZY/XXX combination for W in XYZ positions. Remove dodgy hack from POW opcode, now works correctly without it
2005-05-28Play with swizzling a bit.Ben Skeggs
2005-05-26constant trackingBen Skeggs
2005-05-25- Remove one of the loops in emit_arithBen Skeggs
- Handle REPL_ALPHA in emit_arith (possibly incorrect for some things) - Start on getting demos/arbfplight.c to look right. Won't be animated yet, need to re-work const emit so we can update consts without re-translating the entire program. Assertion in r300_state.c::setup_rs_unit needs to be disabled for it to work.
2005-05-23Implement enough of ARB_fragment_program for Keith's texenv programBen Skeggs
generation in Mesa. Requires most recent Mesa cvs to work correctly. Swizzle code is possibly slow/buggy and will probably be replaced. Old behaviour can be controlled by a #define in r300_context.h, if no-one minds I'll remove the old code later on. Also, disabled cube map extension. AFAIK We don't support it yet, and it causes issues with UT2004.