Age | Commit message (Collapse) | Author |
|
Just for consistency; most of the code already uses __FUNCTION__.
|
|
|
|
|
|
|
|
d28f6d91760374e2eb71b541b0f259f81dd73c69.
|
|
Note there might be some calls to the old function names in conditionally
disabled code, but I think I've got them all.
|
|
|
|
|
|
|
|
|
|
The texture_rectangle fix introduced a bug where every texture instruction
caused a new indirection.
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
Also, fix a typo in a related comment.
|
|
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.
|
|
|
|
|
|
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.
|
|
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.
|
|
Do not move an instruction that writes to a temp forward past an instruction
that reads the same temporary.
|
|
|
|
Dumps of fragment programs were incorrect when the program consisted of multiple
nodes.
Also, improved the formatting a bit.
|
|
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.
|
|
|
|
Note that insert_wpos in r300_vertexprog.c is still a little flaky and could be
improved.
|
|
|
|
corrections.
|
|
Conflicts:
src/mesa/main/context.c
|
|
|
|
Mostly:
- update #includes
- update STATE_* token code
|
|
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().
|
|
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[].
|
|
|
|
Thx for Tilman who spoted the bugs.
|
|
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)
|
|
|
|
World position is calculated in the vertex shader and passed to the
fragment shader via an unused texcoord.
|
|
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.
|
|
|
|
|
|
appears to have been reverted by mistake.
|
|
"gl_" to match other structs.
|
|
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?).
|
|
|
|
|
|
|
|
|
|
save one instruction in some case.
|