diff options
author | Alejandro Piñeiro <[email protected]> | 2017-10-28 10:57:35 +0200 |
---|---|---|
committer | Alejandro Piñeiro <[email protected]> | 2018-07-03 12:41:46 +0200 |
commit | 54d7fca077d051af0b91f0684cdfa0055915b917 (patch) | |
tree | 18fd9f87f9fa92e84efbb77419f1f5cf5ed132ba /src | |
parent | 12301766def1a5eb159644d9afa402ac187d9a01 (diff) |
spirv/nir: add capability check for SpvCapabilityAtomicStorage
Capability that informs if atomic counters are supported. From SPIR-V
1.0 spec, section 3.7, "Storage Class", item 10 from table:
(Column "Storage Class"):
"AtomicCounter For holding atomic counters. Visible across all
functions of the current invocation. Atomic counter-specific
memory."
(Column "Required Capability"):
"AtomicStorage"
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/shader_info.h | 1 | ||||
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h index 208235d8158..8c58ee285ec 100644 --- a/src/compiler/shader_info.h +++ b/src/compiler/shader_info.h @@ -57,6 +57,7 @@ struct spirv_supported_capabilities { bool descriptor_array_dynamic_indexing; bool runtime_descriptor_array; bool stencil_export; + bool atomic_storage; }; typedef struct shader_info { diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 270f263d047..9d2f57cef94 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -3389,7 +3389,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, case SpvCapabilityFloat16Buffer: case SpvCapabilityFloat16: case SpvCapabilityInt64Atomics: - case SpvCapabilityAtomicStorage: case SpvCapabilityStorageImageMultisample: case SpvCapabilityInt8: case SpvCapabilitySparseResidency: @@ -3399,6 +3398,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, spirv_capability_to_string(cap)); break; + case SpvCapabilityAtomicStorage: + spv_check_supported(atomic_storage, cap); + break; + case SpvCapabilityFloat64: spv_check_supported(float64, cap); break; |