From dea29b3818ecd813f5b96d44d54d0d3966af1665 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 16 May 2019 12:25:40 +0200 Subject: [PATCH] spirv: add SpvCapabilityFragmentMaskAMD This new capability is for SPV_AMD_shader_fragment_mask. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- 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 cbc22d24636..4aa138943a7 100644 --- a/src/compiler/shader_info.h +++ b/src/compiler/shader_info.h @@ -79,6 +79,7 @@ struct spirv_supported_capabilities { bool vk_memory_model; bool vk_memory_model_device_scope; bool float16; + bool amd_fragment_mask; bool amd_gcn_shader; bool amd_shader_ballot; bool amd_trinary_minmax; diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 6df936b44f9..5e2ed6c27eb 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -4123,6 +4123,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, spv_check_supported(integer_functions2, cap); break; + case SpvCapabilityFragmentMaskAMD: + spv_check_supported(amd_fragment_mask, cap); + break; + default: vtn_fail("Unhandled capability: %s (%u)", spirv_capability_to_string(cap), cap); -- 2.30.2