summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r500_fragprog.c
AgeCommit message (Collapse)Author
2009-04-22Merge remote branch 'origin/master' into radeon-rewriteDave Airlie
2009-04-19r300: cleanup includesMaciej Cencora
2009-04-19r300: move common fp functions to seperate fileMaciej Cencora
2009-04-19r300: more r300/r500 unificationMaciej Cencora
reuse insert_WPOS_trailer function
2009-04-19r300: more prepare for mergeMaciej Cencora
2009-04-19r300: further r300/r500 merge preparationMaciej Cencora
2009-04-19r300: merge r300/r500 fragment program compiler structureMaciej Cencora
2009-04-19r300: merge r300/r500 fragment program structuresMaciej Cencora
2009-04-19r300: r300/r500 fp shader merge WIPMaciej Cencora
2009-04-17r300: cleanup frag prog setup a littleMaciej Cencora
Use proper fields for marking if fp is translated, and if is translated succesfully. Now if fp gets translated (even unsuccesfully) fp->translated is true. If the translation failed (i.e. because we exceeded limit of maximum texture indirections) the fp->error is set. With a little updated fallback function it prevents non native fragment programs from beeing translated with every frame (the translation would fail anyway so there's no point to try again). Also implement IsProgramNative function for GL_FRAGMENT_PROGRAM_ARB (it should give some performance boost in apps that checks if program is native and falls back to simpler shader to meet hw limits if necessary) and cleanup indentation (remove whitespaces on empty lines).
2009-04-14mesa: merge the prog_src_register::NegateBase and NegateAbs fieldsBrian Paul
There's really no need for two negation fields. This came from the GL_NV_fragment_program extension. The new, unified Negate bitfield applies after the absolute value step.
2009-02-28mesa: rename, reorder FRAG_RESULT_x tokensBrian Paul
s/FRAG_RESULT_DEPR/FRAG_RESULT_DEPTH/ s/FRAG_RESULT_COLR/FRAG_RESULT/COLOR/ Remove FRAG_RESULT_COLH (NV half-precision) output since we never used it. Next, we might merge the COLOR and DATA outputs (COLOR0, COLOR1, etc).
2009-02-14r300: Redirect constant TEX coordinatesNicolai Haehnle
R3xx/R5xx fragment program texture constants must come from a hardware register instead of the constant file, so we redirect if necessary during the native rewrite phase. The symptoms of this bug started appearing when the Mesa fixed function texenvprogram code started using STATE_CURRENT_ATTRIB constants for texture coordinates when the corresponding attributes were constant across all vertices. Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com>
2008-08-17r5xx: Add DDX and DDY instructions.Corbin Simpson
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2008-07-27r300: Implement ARB_shadow_ambient; add STATE_SHADOW_AMBIENTNicolai Haehnle
2008-07-27r500: Handle non-native swizzles in texture instructionsNicolai Haehnle
This fixes piglit's fp-kil and fp-generic/kil-swizzle tests.
2008-07-27r500: Redirect TEX writes to output registersNicolai Haehnle
While R500 fragment program texture instructions appear to support writemasks, they cannot write to the output FIFO immediately, so we need to insert a MOV for these instructions. This fixes piglit's fp-fragment-position and fp-incomplete-tex tests.
2008-07-12r500_fragprog: Major refactoring of final emitNicolai Haehnle
Use an abstracted instruction scheduling and register allocation algorithm that we will be able to share with r300_fragprog. Unlike the original emit code, this code tries to pair instructions that only use the RGB part of the ALU with instructions that only use the alpha part. However, the pairing algorithm still has some shortcomings; for example, it doesn't generate optimal code for the emulation of LIT.
2008-07-12r500: Add "Not quite SSA" and dead code elimination passNicolai Haehnle
In addition, this pass fixes non-native swizzles.
2008-07-12r500_fragprog: Transform trigonometric functions in first passNicolai Haehnle
2008-07-06r300: Allow adding parameters during fragprog transform, share LIT codeNicolai Haehnle
2008-07-05r300: Correctly scan for used temporary registersNicolai Haehnle
This fixes a regression introduced by dea8719f0...
2008-07-05r500: Major refactoring of fragment program emitNicolai Haehnle
Use the common facilities to convert non-native instructions into native ones. Worked hard to make the code easier to read (hopefully), by using helper functions instead of direct manipulation of the machine code. Fixes two bugs related to FLR and XPD.
2008-07-05r300: Remove clause stuff for now in favour of a cloned generic gl_programNicolai Haehnle
2008-07-05r500_fragprog: Cleanup some unused variables and code.Nicolai Haehnle
2008-07-04r300: Fix depth texture in compare modeNicolai Haehnle
Missed the homogenous divide of R by Q before...
2008-06-14r5xx: Enable fragment.position, partial ARB_shadow.Corbin Simpson
I don't like PROGRAM_BUILTIN; could we either patch Mesa or just use a different constant?
2008-06-14r5xx: Detangle FP fallback and translation switches.Corbin Simpson
r5xx should fallback if it encounters a bad FP. TODO: Re-enable the dumb shader so we don't have to completely fallback.
2008-06-14r5xx: More FP rewriting; fix texrect FP insts.Corbin Simpson
2008-06-14r5xx: FP refactor, take one.Corbin Simpson
Yes, I know it's massive. Imagine how I felt, auditing 3000 lines of code.
2008-06-13r300/r500: Separate fragprog compiler structuresNicolai Haehnle
r500 code still used r300_pfs_compile_state, which contains some fields that really only make sense on r3xx type hardware. In order to allow both fragprog implementations to go forward without disturbing each other, I've pushed this structure down into the respective r[3|5]00_fragprog.c
2008-06-06r5xx: Fix speedy LIT once and for all.Corbin Simpson
To do: Add a slightly more accurate LIT. Will do later.
2008-06-02r500: add missing brackets around depth testingDave Airlie
2008-06-01r5xx: Enable depth write emission.Corbin Simpson
Thanks to nh for the r3xx version.
2008-06-01r5xx: Add OPCODE_FLR.Corbin Simpson
Why didn't anybody tell me we were missing this one? I thought I committed it ages ago!
2008-05-31r5xx: Last emit_sop() for now.Corbin Simpson
This should also clean up LIT later on.
2008-05-31r5xx: More emit_sop(), stage 2.Corbin Simpson
SIN/COS.
2008-05-31r5xx: Cleanup SOP with emit_sop().Corbin Simpson
I wish I had a snarky commit message, but I'll save that for after I get the trig working with this.
2008-05-31r5xx: Dump shader constants when dumping program assembly.Corbin Simpson
2008-05-28r500: cleanup warnings and include filesDave Airlie
2008-05-27r5xx: Add OPCODE_XPD. In working condition, I might add.Corbin Simpson
And we're officially finished with the ARB_fragment_program instruction set. It's worth noting that LIT is still not reliable. SIN and COS were fixed a few commits ago. We're finished with stage 1! Whoohoo!
2008-05-27r5xx: Just a few small LIT fixes.Corbin Simpson
Still broken; will fix tomorrow.
2008-05-27r5xx: Fix emit_mov() regression.Corbin Simpson
Specifically, fix improper swizzling.
2008-05-27r500: the cs is shared per context - doh so don't use for program upload.Dave Airlie
Also remove some unused bits of the r500 fragprog struct
2008-05-27r500: need to re-setup inst offset/end for translated programsDave Airlie
this fixes texenv
2008-05-26r5xx: Fix FP temp counting.Corbin Simpson
One of the ref counters wasn't being added to the temp counter. Yet another product of late-night coding...
2008-05-26r5xx: Enhance emit_mov().Corbin Simpson
Now we can add arbitrary sources and swizzles. Will make many things smoother.
2008-05-26r5xx: Moar LIT.Corbin Simpson
Still not working, but getting closer.
2008-05-26r5xx: First stab at LIT.Corbin Simpson
2008-05-25Replace copyright on r500_fragprog.cCorbin Simpson
Huh, could have sworn I already did this once before... Maybe I forgot to commit it?