Module: Mesa
Branch: master
Commit: eab985d070c94917b743058eedfcc6eedcded418
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=eab985d070c94917b743058eedfcc6eedcded418

Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Apr  1 17:43:50 2021 -0400

zink: fix conditional when assigning tess variable io

this was not copied directly and changed the old conditional, which
was intended to catch only non-patch tess io

fixes tess io with legacy builtins, e.g., spec@!opengl 
2.0@vertex-program-two-side back front2 back2

Fixes: 2d98efd3232 ("zink: pre-populate locations in variables")

Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9996>

---

 src/gallium/drivers/zink/zink_compiler.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_compiler.c 
b/src/gallium/drivers/zink/zink_compiler.c
index 9d3bd3a3bf2..f030483817d 100644
--- a/src/gallium/drivers/zink/zink_compiler.c
+++ b/src/gallium/drivers/zink/zink_compiler.c
@@ -540,11 +540,11 @@ assign_io_locations(nir_shader *nir, unsigned char 
*shader_slot_map,
          if (var->data.patch) {
             assert(var->data.location >= VARYING_SLOT_PATCH0);
             slot = var->data.location - VARYING_SLOT_PATCH0;
-         } else if ((var->data.mode == nir_var_shader_out &&
+         } else if (var->data.location >= VARYING_SLOT_VAR0 &&
+                     ((var->data.mode == nir_var_shader_out &&
                      nir->info.stage == MESA_SHADER_TESS_CTRL) ||
                     (var->data.mode != nir_var_shader_out &&
-                     nir->info.stage == MESA_SHADER_TESS_EVAL)) {
-            assert(var->data.location >= VARYING_SLOT_VAR0);
+                     nir->info.stage == MESA_SHADER_TESS_EVAL))) {
             slot = var->data.location - VARYING_SLOT_VAR0;
          } else {
             if (shader_slot_map[var->data.location] == 0xff) {

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to