| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Because of flat shading, we can't use same code as PIPE_PRIM_TRIANGLE_FAN.
This is a follow-on to commit a59575d8fbe8b0ca053cc8366ce7a42bc660158a.
|
|
|
|
| |
This fixes incorrect front/back-face orientation.
|
|
|
|
|
|
| |
This was originally taken from i915 and it shows.
Basically most the stuff in r300_render.c was never needed and
shouldn't have worked in the first place
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
This fixes the incorrect colors seen when rendering flat-shaded polygons.
Note that clipped polygons were correct, but unclipped polygons were wrong.
See the glean/clipFlat test for regression testing.
|
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 5d75124db480b37977c353511b4e228905b7cc95.
This fixed unclipped polygons, but broke clipped polygons.
A better fix from the mesa 7.5 branch will be merged next...
|
| | |
|
| | |
|
| |
| |
| |
| | |
On a side note, why is RADEON_MAX_BOS 24? Should ask airlied about that.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This makes some code cleaner, and we can now easily
do CEIL and TRUNC.
|
| |
| |
| |
| |
| |
| |
| |
| | |
For TXP we need to divide texture coords by their w component, or
use the coords' 1/w in the perspective interpolation instruction.
This also tries to support 1D, 3D and CUBE textures, and lets the
instruction only load the components that are used.
|
| |
| |
| |
| |
| |
| |
| | |
Use different buffers for immds, FP params, and VP params.
One has to map constant buffer indices in shader code to buffers
defined via CB_DEF. In principle, we could use more buffers so
we'd have to change the shader code less frequently.
|
| |
| |
| |
| |
| | |
Since we stopped using alloc_temp to get hw indices for FP attrs
there shouldn't be any non-deallocated temps left.
|
| |
| |
| |
| |
| | |
Since we know when we don't use a TEMP or FP ATTR register anymore,
we can release their hw resources early.
|
| |
| |
| |
| |
| |
| | |
Immediates are inlined now where possible, so we need to set
pc->allow32 to FALSE in LIT where we have the conditional MOV,
since immediates swallow the predicate bits.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
I chose to just convert unpaired 32 bit length instructions
after parsing all instructions, although it might be possible
to determine beforehand whether there would be any lone ones,
and then even do some swapping to bring them together ...
|
| | |
|
| |
| |
| |
| |
| | |
This would have happened in p.e. ADD TEMP[0], TEMP[0].xyxy, TEMP[1]
or RCP/RSQ TEMP[i], TEMP[i].
|
| |
| |
| |
| |
| | |
Depth output in fragment programs should end up in the first
register after the color outputs.
|
| |
| |
| |
| |
| |
| |
| |
| | |
VP outputs that should be loadable in the FP are mapped to
interpolant indices by HPOS, COL0 etc.; of course HPOS is
always written, so the highest byte of 1988 is a bitmask that
selects which components of HPOS are used for interpolants,
i.e. the FP inputs in COL0 start at index POPCNT(1988[24:28]).
|
| |
| |
| |
| |
| |
| | |
Record interpolation mode for attributes while parsing declarations,
and also remember the indices of FP color inputs and FP depth output,
which has to end up in the highest output register.
|
| |
| |
| |
| |
| |
| |
| | |
We now inspect the TGSI instructions in tx_prep to determine where
temps and FP attrs are last accessed.
This will enable us to reclaim some temporaries early and we also
use it to omit pre-loading FP attributes that aren't used.
|
| |
| |
| |
| |
| | |
We could do even better (like just allocating 1 value in alloc_immd),
but that's fine for now I guess.
|
| | |
|
| |
| |
| |
| |
| | |
According to tgsi-instruction-set.txt, if they are written, z and w
should be set to 0 and 1 respectively in SCS, and w to 1.0 in XPD.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Use the first vertex, not the last.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In spu_tri.c:setup_sort_vertices() triangles are culled after the
vertices are sorted. This patch moves the check a little earlier
and performs the actual check a little faster through intrinsics and
a little trickery.
Reduced code size and less work is done before a triangle is deemed
OK to skip.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It was taking approximately 50 cycles to extract the vertex indices,
calculate the vertex_header pointers and call tri_draw() for each
three vertices - .
Unrolled, it takes less than 100 cycles to extract, unpack,
calculate pointers and call tri_draw() eight times. It does have a
nasty jump-tabled switch. I'm sure that there's a better way...
Code size of spu_render.o gets larger due to the extra constants and
work in the inner loop, there are extra stack saves and loads
because there are more registers in use, and an assert. spu_tri.o
gets a little smaller.
|
| |
| |
| |
| | |
I feel so unclean.
|
| |
| |
| |
| | |
Goddammit. This cannot be the "easy way." :C
|
| | |
|
| |
| |
| |
| | |
Seems like this file is the source of all bad logic. (Pun intended.)
|
| |
| |
| |
| |
| |
| |
| | |
Less briefly... Shaders need to be recompiled if their constantbuf
offsets have changed. However, since we only change them from shaders if
immediates need to be emitted, we shouldn't bother if the shader doesn't
use immediates.
|
| |
| |
| |
| | |
Still not correct, but really I don't care.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Per 74cb2aba on xf86-video-ati.
|
| | |
|
| |
| |
| |
| |
| |
| | |
This fixes some silent problems in current libdrm_radeon.
surface_copy still locks up hard.
|
| | |
|