[03/16] spirv/nir: SpvStorageClassAtomicCounter support on vtn_storage_class_to_mode

Submitted by apinheiro on July 2, 2018, 2:58 p.m.

Details

Message ID 20180702145845.23557-4-apinheiro@igalia.com
State New
Headers show
Series "ARB_gl_spirv series 3 v2: support for atomic counters" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

apinheiro July 2, 2018, 2:58 p.m.
Atomic Counters are uniforms per spec.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
---
 src/compiler/spirv/vtn_variables.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index 574f422ceab..6a2144ceabb 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -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");
    }