[Mesa-dev] [PATCH v2 23/25] spirv: enable SpvCapabilityFloat64 only to supported platforms

Juan A. Suarez Romero jasuarez at igalia.com
Fri Dec 16 14:49:09 UTC 2016


From: Samuel Iglesias Gonsálvez <siglesias at igalia.com>

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
---
 src/compiler/spirv/spirv_to_nir.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 11f6248..f4bf3b4 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -2525,6 +2525,13 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
       case SpvCapabilityInputAttachment:
          break;
 
+      case SpvCapabilityFloat64:
+         if (!b->nir_options->native_float64) {
+            vtn_warn("Unsupported SPIR-V capability: %s",
+                     spirv_capability_to_string(cap));
+         }
+         break;
+
       case SpvCapabilityGeometryStreams:
       case SpvCapabilityTessellation:
       case SpvCapabilityTessellationPointSize:
@@ -2532,7 +2539,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
       case SpvCapabilityVector16:
       case SpvCapabilityFloat16Buffer:
       case SpvCapabilityFloat16:
-      case SpvCapabilityFloat64:
       case SpvCapabilityInt64:
       case SpvCapabilityInt64Atomics:
       case SpvCapabilityAtomicStorage:
-- 
2.9.3



More information about the mesa-dev mailing list