spirv: atomic_counter_read_deref is not vectorized
authorRob Clark <robdclark@chromium.org>
Tue, 16 Jun 2020 18:21:29 +0000 (11:21 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 18 Jun 2020 03:40:54 +0000 (03:40 +0000)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3141
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5505>

src/compiler/spirv/spirv_to_nir.c

index b222e2b67a05c7fa1a0d906ca6516cfbb6ea8dce..6fac715136c432a675967dbc90817c5dcb013d32 100644 (file)
@@ -3127,15 +3127,12 @@ vtn_handle_atomics(struct vtn_builder *b, SpvOp opcode,
        */
 
       switch (opcode) {
-      case SpvOpAtomicLoad:
-         atomic->num_components = glsl_get_vector_elements(deref_type);
-         break;
-
       case SpvOpAtomicStore:
          atomic->num_components = glsl_get_vector_elements(deref_type);
          nir_intrinsic_set_write_mask(atomic, (1 << atomic->num_components) - 1);
          break;
 
+      case SpvOpAtomicLoad:
       case SpvOpAtomicExchange:
       case SpvOpAtomicCompareExchange:
       case SpvOpAtomicCompareExchangeWeak: