frontend/nine: Fix ff ps key
The stage index, rather than the texture coord index was used. Cc: mesa-stable Signed-off-by: Axel Davy <davyaxel0@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28232>
This commit is contained in:

committed by
David Heidelberg

parent
750b2af4d9
commit
9063d554f3
@@ -88,20 +88,21 @@ nine_ff_get_projected_key(struct nine_context *context, unsigned num_stages)
|
||||
for (s = 0; s < num_stages; ++s) {
|
||||
unsigned gen = (context->ff.tex_stage[s][D3DTSS_TEXCOORDINDEX] >> 16) + 1;
|
||||
unsigned dim = context->ff.tex_stage[s][D3DTSS_TEXTURETRANSFORMFLAGS] & 0x7;
|
||||
unsigned idx = context->ff.tex_stage[s][D3DTSS_TEXCOORDINDEX] & 7;
|
||||
unsigned proj = !!(context->ff.tex_stage[s][D3DTSS_TEXTURETRANSFORMFLAGS] & D3DTTFF_PROJECTED);
|
||||
|
||||
if (!context->vs) {
|
||||
if (dim > 4)
|
||||
dim = input_texture_coord[s];
|
||||
dim = input_texture_coord[idx];
|
||||
|
||||
if (!dim && gen == NINED3DTSS_TCI_PASSTHRU)
|
||||
dim = input_texture_coord[s];
|
||||
dim = input_texture_coord[idx];
|
||||
else if (!dim)
|
||||
dim = 4;
|
||||
|
||||
if (dim == 1) /* NV behaviour */
|
||||
proj = 0;
|
||||
if (dim > input_texture_coord[s] && gen == NINED3DTSS_TCI_PASSTHRU)
|
||||
if (dim > input_texture_coord[idx] && gen == NINED3DTSS_TCI_PASSTHRU)
|
||||
proj = 0;
|
||||
} else {
|
||||
dim = 4;
|
||||
|
Reference in New Issue
Block a user