From: Samuel Iglesias Gonsálvez Date: Thu, 31 May 2018 09:50:54 +0000 (+0200) Subject: spirv: check support for SPV_KHR_float_controls capabilities X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=420ad0a1a3d90cf158a4b53c244efb7f4d5610de;p=mesa.git spirv: check support for SPV_KHR_float_controls capabilities 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 --- 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: