From 420ad0a1a3d90cf158a4b53c244efb7f4d5610de Mon Sep 17 00:00:00 2001 From: =?utf8?q?Samuel=20Iglesias=20Gons=C3=A1lvez?= Date: Thu, 31 May 2018 11:50:54 +0200 Subject: [PATCH] spirv: check support for SPV_KHR_float_controls capabilities MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit v2: - Correct extension name (Caio). - Rename supported capabilities member (Andres). Signed-off-by: Samuel Iglesias Gonsálvez Reviewed-by: Connor Abbott [v1] Reviewed-by: Caio Marcelo de Oliveira Filho --- src/compiler/shader_info.h | 1 + src/compiler/spirv/spirv_to_nir.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h index bd5d2fa0b6c..ae894f3082b 100644 --- a/src/compiler/shader_info.h +++ b/src/compiler/shader_info.h @@ -59,6 +59,7 @@ struct spirv_supported_capabilities { bool physical_storage_buffer_address; bool post_depth_coverage; bool runtime_descriptor_array; + bool float_controls; bool shader_viewport_index_layer; bool stencil_export; bool storage_8bit; diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index f46af1e42db..acf73ee1952 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -3615,6 +3615,13 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, case SpvCapabilitySampleMaskPostDepthCoverage: spv_check_supported(post_depth_coverage, cap); + + case SpvCapabilityDenormFlushToZero: + case SpvCapabilityDenormPreserve: + case SpvCapabilitySignedZeroInfNanPreserve: + case SpvCapabilityRoundingModeRTE: + case SpvCapabilityRoundingModeRTZ: + spv_check_supported(float_controls, cap); break; case SpvCapabilityPhysicalStorageBufferAddressesEXT: -- 2.30.2