Mesa (master): nir: Be sure to fix deref modes after demoting shader i/o vars to global.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 16 00:17:42 UTC 2018


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

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Sep 26 11:33:09 2018 -0700

nir: Be sure to fix deref modes after demoting shader i/o vars to global.

Fixes assertion failures when calling nir_remove_unused_varyings() or
nir_remove_unused_io_vars().

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

---

 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 85712a7cb1..7446bb826f 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;
 }
 




More information about the mesa-commit mailing list