nir: Handle vec8/16 in nir_shrink_array_vars
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 30 Mar 2020 17:14:48 +0000 (12:14 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 31 Mar 2020 00:18:05 +0000 (00:18 +0000)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4365>

src/compiler/nir/nir_split_vars.c

index 80536ac543a58bf6bb37c768970d8ad32a99b7af..5b46d072a7abe73918413fa4ae9f883deac1c8a8 100644 (file)
@@ -1166,9 +1166,7 @@ get_non_self_referential_store_comps(nir_intrinsic_instr *store)
                comps &= ~(1u << i);
          }
       }
-   } else if (src_alu->op == nir_op_vec2 ||
-              src_alu->op == nir_op_vec3 ||
-              src_alu->op == nir_op_vec4) {
+   } else if (nir_op_is_vec(src_alu->op)) {
       /* If it's a vec, discount any channels that are just loads from the
        * same deref put in the same spot.
        */