spirv: check support for SPV_KHR_float_controls capabilities
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Thu, 31 May 2018 09:50:54 +0000 (11:50 +0200)
committerAndres Gomez <agomez@igalia.com>
Tue, 17 Sep 2019 20:39:18 +0000 (23:39 +0300)
v2:
- Correct extension name (Caio).
- Rename supported capabilities member (Andres).

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com> [v1]
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/compiler/shader_info.h
src/compiler/spirv/spirv_to_nir.c

index bd5d2fa0b6ca75d34e230f356a42ac41df9ea549..ae894f3082b6913b457d831c0ac577206581d87f 100644 (file)
@@ -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;
index f46af1e42db3a0bafdeff55083d683031ecc8a1e..acf73ee19529e737e83b89d24948441497ac4e31 100644 (file)
@@ -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: