aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2020-01-03 11:49:24 +0100
committerSamuel Pitoiset <[email protected]>2020-01-09 07:58:33 +0100
commit37bfd854c71be8ace37080fbca36d0a1ef68fb8a (patch)
tree046ad26e25db2be12852baba9292abb5f0b779dc /src
parent1e29ff7b3dab02aa8cf87144e38b10d2c9e19813 (diff)
spirv: add SpvCapabilityImageReadWriteLodAMD
New SPIR-V capability for SPV_AMD_shader_image_load_store_lod. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/shader_info.h1
-rw-r--r--src/compiler/spirv/spirv_to_nir.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index 8e7b81a13ab..7c12dadd1ce 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -81,6 +81,7 @@ struct spirv_supported_capabilities {
bool amd_gcn_shader;
bool amd_shader_ballot;
bool amd_trinary_minmax;
+ bool amd_image_read_write_lod;
};
typedef struct shader_info {
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 63a165d5b84..a4b09a404df 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -4048,6 +4048,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
spv_check_supported(vk_memory_model_device_scope, cap);
break;
+ case SpvCapabilityImageReadWriteLodAMD:
+ spv_check_supported(amd_image_read_write_lod, cap);
+ break;
+
default:
vtn_fail("Unhandled capability: %s (%u)",
spirv_capability_to_string(cap), cap);