Age | Commit message (Collapse) | Author |
|
Make sure we detect constant buffer changes indicated by the new flag.
Should be able to remove _NEW_PROGRAM (and _NEW_MODELVIEW, _NEW_LIGHT, etc)
from several places (someday.
|
|
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.
|
|
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).
|
|
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>
|
|
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
|
|
|
|
This fixes piglit's fp-kil and fp-generic/kil-swizzle tests.
|
|
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.
|
|
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.
|
|
In addition, this pass fixes non-native swizzles.
|
|
|
|
|
|
This fixes a regression introduced by dea8719f0...
|
|
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.
|
|
|
|
|
|
Missed the homogenous divide of R by Q before...
|
|
I don't like PROGRAM_BUILTIN; could we either patch Mesa or just use a different constant?
|
|
r5xx should fallback if it encounters a bad FP.
TODO: Re-enable the dumb shader so we don't have to completely fallback.
|
|
|
|
Yes, I know it's massive. Imagine how I felt, auditing 3000 lines of code.
|
|
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
|
|
To do: Add a slightly more accurate LIT. Will do later.
|
|
|
|
Thanks to nh for the r3xx version.
|
|
Why didn't anybody tell me we were missing this one? I thought I committed it ages ago!
|
|
This should also clean up LIT later on.
|
|
SIN/COS.
|
|
I wish I had a snarky commit message, but I'll save that for after I get the
trig working with this.
|
|
|
|
|
|
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!
|
|
Still broken; will fix tomorrow.
|
|
Specifically, fix improper swizzling.
|
|
Also remove some unused bits of the r500 fragprog struct
|
|
this fixes texenv
|
|
One of the ref counters wasn't being added to the temp counter.
Yet another product of late-night coding...
|
|
Now we can add arbitrary sources and swizzles. Will make many things smoother.
|
|
Still not working, but getting closer.
|
|
|
|
Huh, could have sworn I already did this once before...
Maybe I forgot to commit it?
|
|
|
|
Common uses of MAD now use emit_mad(), the two common negation masks work,
and fixed a few off-by-one errors.
|
|
Yay?
|
|
Converted ADD.
|
|
If it uses MAD, emit it with emit_mad()!
(Now available at your local grocer's. Multiply and add responsibly.)
|
|
They're all the same, really.
|
|
|
|
|
|
|