nir: Remove deref chain support from lower_alpha_test
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 27 Mar 2018 00:06:51 +0000 (17:06 -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_lower_alpha_test.c

index 776655a52a74ec95a1554b2d917cc001c5809ae8..8dc2fc7e75676f291a455fff263bd83e85d2780f 100644 (file)
@@ -41,6 +41,8 @@ nir_lower_alpha_test(nir_shader *shader, enum compare_func func,
 {
    assert(shader->info.stage == MESA_SHADER_FRAGMENT);
 
+   nir_assert_unlowered_derefs(shader, nir_lower_load_store_derefs);
+
    nir_foreach_function(function, shader) {
       nir_function_impl *impl = function->impl;
       nir_builder b;
@@ -55,9 +57,6 @@ nir_lower_alpha_test(nir_shader *shader, enum compare_func func,
                nir_variable *out = NULL;
 
                switch (intr->intrinsic) {
-               case nir_intrinsic_store_var:
-                  out = intr->variables[0]->var;
-                  break;
                case nir_intrinsic_store_deref:
                   out = nir_deref_instr_get_variable(nir_src_as_deref(intr->src[0]));
                   break;