[Mesa-dev] [PATCH 1/2] nir: Be sure to fix deref modes after demoting shader i/o vars to global.

Eric Anholt eric at anholt.net
Fri Sep 28 19:52:43 UTC 2018


Fixes assertion failures when calling nir_remove_unused_varyings() or
nir_remove_unused_io_vars().
---
 src/compiler/nir/nir_linking_helpers.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c
index 85712a7cb1c2..7446bb826f97 100644
--- a/src/compiler/nir/nir_linking_helpers.c
+++ b/src/compiler/nir/nir_linking_helpers.c
@@ -126,6 +126,9 @@ remove_unused_io_vars(nir_shader *shader, struct exec_list *var_list,
       }
    }
 
+   if (progress)
+      nir_fixup_deref_modes(shader);
+
    return progress;
 }
 
-- 
2.18.0



More information about the mesa-dev mailing list