nir: Remove deref chain support from opt_undef
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 2 Apr 2018 23:44:40 +0000 (16:44 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 23 Jun 2018 03:54:00 +0000 (20:54 -0700)
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/nir/nir_opt_undef.c

index e42a9af2bdf1439714c747e81fff667728c25a8a..428a1f26599a146c34455f7b27b248a46949605a 100644 (file)
@@ -112,7 +112,6 @@ opt_undef_store(nir_intrinsic_instr *intrin)
    case nir_intrinsic_store_deref:
       arg_index = 1;
       break;
-   case nir_intrinsic_store_var:
    case nir_intrinsic_store_output:
    case nir_intrinsic_store_per_vertex_output:
    case nir_intrinsic_store_ssbo:
@@ -138,6 +137,8 @@ nir_opt_undef(nir_shader *shader)
    nir_builder b;
    bool progress = false;
 
+   nir_assert_unlowered_derefs(shader, nir_lower_load_store_derefs);
+
    nir_foreach_function(function, shader) {
       if (function->impl) {
          nir_builder_init(&b, function->impl);