From 37bfd854c71be8ace37080fbca36d0a1ef68fb8a Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 3 Jan 2020 11:49:24 +0100 Subject: [PATCH] spirv: add SpvCapabilityImageReadWriteLodAMD New SPIR-V capability for SPV_AMD_shader_image_load_store_lod. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/compiler/shader_info.h | 1 + src/compiler/spirv/spirv_to_nir.c | 4 ++++ 2 files changed, 5 insertions(+) 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); -- 2.30.2