[Mesa-dev] [PATCH 02/28] spirv: check support for SPV_KHR_shader_float_controls capabilities

Samuel Iglesias Gonsálvez siglesias at igalia.com
Wed Dec 5 15:55:17 UTC 2018


Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
---
 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 e745cc15fc5..21c3d371a63 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -47,6 +47,7 @@ struct spirv_supported_capabilities {
    bool int16;
    bool float16;
    bool int8;
+   bool shader_float_controls;
    bool shader_viewport_index_layer;
    bool subgroup_arithmetic;
    bool subgroup_ballot;
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 47b11b6ddc3..100fcd8e298 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -3559,6 +3559,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(shader_float_controls, cap);
          break;
 
       default:
-- 
2.19.1



More information about the mesa-dev mailing list