Mesa (master): st/nir: Fix assigning PointCoord location with !PIPE_CAP_TEXCOORD
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Apr 25 16:09:55 UTC 2020
Module: Mesa
Branch: master
Commit: 662e9c180176e906406c65871b4c090702ed4c99
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=662e9c180176e906406c65871b4c090702ed4c99
Author: Connor Abbott <cwabbott0 at gmail.com>
Date: Thu Apr 23 16:08:21 2020 +0200
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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4732>
---
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;
More information about the mesa-commit
mailing list