spirv/nir: SpvStorageClassAtomicCounter support on vtn_storage_class_to_mode
authorAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 27 Oct 2017 10:40:35 +0000 (12:40 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 3 Jul 2018 10:37:32 +0000 (12:37 +0200)
Atomic Counters are uniforms per spec.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/spirv/vtn_variables.c

index 574f422ceabf2d63e7f41b3a08a680dd3fe09db2..6a2144ceabb4d005e03fb48603d615fdb4e78ad3 100644 (file)
@@ -1481,9 +1481,12 @@ vtn_storage_class_to_mode(struct vtn_builder *b,
       mode = vtn_variable_mode_workgroup;
       nir_mode = nir_var_shared;
       break;
+   case SpvStorageClassAtomicCounter:
+      mode = vtn_variable_mode_uniform;
+      nir_mode = nir_var_uniform;
+      break;
    case SpvStorageClassCrossWorkgroup:
    case SpvStorageClassGeneric:
-   case SpvStorageClassAtomicCounter:
    default:
       vtn_fail("Unhandled variable storage class");
    }