mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-27 23:08:12 +02:00
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:d4b8e8a481Closes: 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> (cherry picked from commit0ac6801970)
This commit is contained in:
parent
4e1e1c2580
commit
1954f62fad
2 changed files with 8 additions and 8 deletions
|
|
@ -2844,7 +2844,7 @@
|
|||
"description": "r300: fix vs output register indexing",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "d4b8e8a48144f4b899d48c271558f0dc613632cb",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue