Age | Commit message (Collapse) | Author |
|
|
|
I've no idea if this code might break something or how it should interact
with vertex shaders, it makes the clip demo work for me
|
|
Construct the vertprog instruction in the 4 DWORD parts...
DWORD 0: Opcode and Output.
DWORD 1: First Argument.
DWORD 2: Second Argument.
DWORD 3: Third Argument.
Allow the opcode translation functions to generate more than one instruction;
useful for when an instruction must be emulated. FLR, XPD, etc.
|
|
|
|
|
|
|
|
|
|
Possibly performance may improve by setting it to the last instruction that
writes result.position, rather than the last instruction in the vertex program.
|
|
|
|
|
|
These registers are per-pixel and per-vertex X and Y clipping planes.
|
|
The VTXFMT code was broken by the new VBO branch and the OPTIMIZE_ELTS path
relied on the VTXFMT code...
I'm not even sure if the OPTIMIZE_ELTS path ever worked; the testing that I did
after minimizing the code duplication would have taken the same path as the
non-OPTIMIZE_ELTS code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
compiler conditional anyway; probably broken?
|
|
|
|
specific.
|
|
Enabling R300_SPAN_DISABLE_LOCKING would probably cause more lockups; I think
there are a couple of other little bugs in this code, too. It's best to remove
it.
|
|
|
|
This was okayed by Jerome Glisse and Keith Whitwell on the dri-devel IRC channel
and list, respectively.
|
|
Note there might be some calls to the old function names in conditionally
disabled code, but I think I've got them all.
|
|
disabled code.
|
|
|
|
|
|
|
|
|
|
|
|
compatibility with vertex programs and the fact that swtcl very rarely gets hit with tcl capable hw.
|
|
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.
|
|
There used to be an assertion when a fragment program accesses an incomplete
texture image. Work around this assertion.
Note: I am unsure whether this workaround produces the desired result
(0,0,0,1) on all hardware.
|
|
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.
|
|
Do not move an instruction that writes to a temp forward past an instruction
that reads the same temporary.
|
|
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.
|
|
(Oliver McFadden)
|
|
ialization code.
Note that there are still plenty of actual unknown variables left that should
probably be deciphered.
There are a number of things incomplete in the driver; the different polygon
offset modes (line, point, etc), the other texture filter, texture chroma key,
etc. These should probably be fixed in the future, or at least added to the TODO
list.
|
|
|
|
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[].
|