Skip to content
Snippets Groups Projects
Commit 0ac68019 authored by Pavel Ondračka's avatar Pavel Ondračka Committed by Marge Bot
Browse files

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: d4b8e8a4
Closes: mesa/mesa#10489


Signed-off-by: Pavel Ondračka's avatarPavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: default avatarFilip Gawin <filip.gawin@collabora.com>
Part-of: <mesa/mesa!27469>
parent e4ccfde1
No related branches found
No related tags found
No related merge requests found
......@@ -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++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment