r300: fix vs output register indexing
Vertex shaders were writing TEXCOORDs before GENERICS, however
fragment shaders were reading it the opposite way, so this caused
problems for shaders that used both TEXCOORD and GENERIC varyings.
Fixes: d4b8e8a481
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10489
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27469>
This commit is contained in:
committed by
Marge Bot
parent
e4ccfde123
commit
0ac6801970
@@ -366,7 +366,6 @@ KHR-GLES2.texture_3d.filtering.sizes.63x63x63_nearest_mipmap_nearest,Fail
|
||||
shaders@glsl-arb-fragment-coord-conventions,Fail
|
||||
shaders@glsl-bug-110796,Fail
|
||||
shaders@glsl-fwidth,Fail
|
||||
shaders@glsl-orangebook-ch06-bump,Fail
|
||||
shaders@glsl-uniform-interstage-limits@subdivide 5,Fail
|
||||
shaders@glsl-uniform-interstage-limits@subdivide 5- statechanges,Fail
|
||||
|
||||
|
||||
@@ -158,13 +158,6 @@ static void set_vertex_inputs_outputs(struct r300_vertex_program_compiler * c)
|
||||
}
|
||||
}
|
||||
|
||||
/* Texture coordinates. */
|
||||
for (i = 0; i < ATTR_TEXCOORD_COUNT; i++) {
|
||||
if (outputs->texcoord[i] != ATTR_UNUSED) {
|
||||
c->code->outputs[outputs->texcoord[i]] = reg++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Generics. */
|
||||
for (i = 0; i < ATTR_GENERIC_COUNT; i++) {
|
||||
if (outputs->generic[i] != ATTR_UNUSED) {
|
||||
@@ -172,6 +165,13 @@ static void set_vertex_inputs_outputs(struct r300_vertex_program_compiler * c)
|
||||
}
|
||||
}
|
||||
|
||||
/* Texture coordinates. */
|
||||
for (i = 0; i < ATTR_TEXCOORD_COUNT; i++) {
|
||||
if (outputs->texcoord[i] != ATTR_UNUSED) {
|
||||
c->code->outputs[outputs->texcoord[i]] = reg++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Fog coordinates. */
|
||||
if (outputs->fog != ATTR_UNUSED) {
|
||||
c->code->outputs[outputs->fog] = reg++;
|
||||
|
||||
Reference in New Issue
Block a user