nir/opt_undef: Handle a couple more normal store intrinsics.
authorEric Anholt <eric@anholt.net>
Thu, 23 Jul 2020 20:39:56 +0000 (13:39 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 20 Aug 2020 16:44:08 +0000 (16:44 +0000)
They've got the value in the same slot as the others, and the same undef
behavior should be fine.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6054>

src/compiler/nir/nir_opt_undef.c

index 0edd7ae6ee0af8776aab42607fac3db588c2336e..e03e5b88efc6bb2629fddcd63c2b799f05d58291 100644 (file)
@@ -112,6 +112,8 @@ opt_undef_store(nir_intrinsic_instr *intrin)
    case nir_intrinsic_store_per_vertex_output:
    case nir_intrinsic_store_ssbo:
    case nir_intrinsic_store_shared:
+   case nir_intrinsic_store_global:
+   case nir_intrinsic_store_scratch:
       arg_index =  0;
       break;
    default: