From: Eric Anholt Date: Wed, 26 Sep 2018 18:33:09 +0000 (-0700) Subject: nir: Be sure to fix deref modes after demoting shader i/o vars to global. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b788ab6d5c8e87743c345ee8c6131db628b87a8e;p=mesa.git 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 --- diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c index 85712a7cb1c..7446bb826f9 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; }