mesa/st: Don't bump locations of patch vars for !PIPE_CAP_TEXCOORD.

There's no need to reserve the bottom 9 VARYING_SLOT_PATCH*, since
VARYING_SLOT_TEXCOORD won't be mapped there.  This helps us match up with
nir_to_tgsi, which wasn't shifting down by 9 for patch.

Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800>
This commit is contained in:
Emma Anholt
2021-09-08 16:24:02 -07:00
committed by Marge Bot
parent 2f6debfd6d
commit ba6368b54d
+1 -1
View File
@@ -74,7 +74,7 @@ st_nir_fixup_varying_slots(struct st_context *st, nir_shader *shader,
assert(!st->allow_st_finalize_nir_twice);
nir_foreach_variable_with_modes(var, shader, mode) {
if (var->data.location >= VARYING_SLOT_VAR0) {
if (var->data.location >= VARYING_SLOT_VAR0 && var->data.location < VARYING_SLOT_PATCH0) {
var->data.location += 9;
} else if (var->data.location == VARYING_SLOT_PNTC) {
var->data.location = VARYING_SLOT_VAR8;