nir: Be sure to fix deref modes after demoting shader i/o vars to global.
authorEric Anholt <eric@anholt.net>
Wed, 26 Sep 2018 18:33:09 +0000 (11:33 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 16 Oct 2018 00:16:44 +0000 (17:16 -0700)
Fixes assertion failures when calling nir_remove_unused_varyings() or
nir_remove_unused_io_vars().

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/nir/nir_linking_helpers.c

index 85712a7cb1c2a1247b9d13aafc13e4c34de6ac6d..7446bb826f97be28791c14f2c68b2b17f4f9a400 100644 (file)
@@ -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;
 }