From 662e9c180176e906406c65871b4c090702ed4c99 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Thu, 23 Apr 2020 16:08:21 +0200 Subject: [PATCH] st/nir: Fix assigning PointCoord location with !PIPE_CAP_TEXCOORD This was trying to emulate the effect of mapping GL -> TGSI -> NIR, but failed to handle VARYING_SLOT_PNTC which led to a kludgy workaround in freedreno. Part-of: --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index cf27da7e0c7..d7277f7f5c5 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -71,6 +71,8 @@ st_nir_fixup_varying_slots(struct st_context *st, struct exec_list *var_list) nir_foreach_variable(var, var_list) { if (var->data.location >= VARYING_SLOT_VAR0) { var->data.location += 9; + } else if (var->data.location == VARYING_SLOT_PNTC) { + var->data.location = VARYING_SLOT_VAR8; } else if ((var->data.location >= VARYING_SLOT_TEX0) && (var->data.location <= VARYING_SLOT_TEX7)) { var->data.location += VARYING_SLOT_VAR0 - VARYING_SLOT_TEX0; -- 2.30.2