spirv: enable SpvCapabilityFloat64 only to supported platforms
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 4 Jan 2017 08:35:36 +0000 (09:35 +0100)
committerJuan A. Suarez Romero <jasuarez@igalia.com>
Mon, 9 Jan 2017 09:44:07 +0000 (10:44 +0100)
v2 (Jason):
- Use nir_spirv_supported_extensions to check if the feature is enabled.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/spirv/nir_spirv.h
src/compiler/spirv/spirv_to_nir.c

index 116b0a374cd64f300819308642c822b20fea0bb8..2850e91e8b85c958377c3d070f832b416bb294ba 100644 (file)
@@ -45,6 +45,7 @@ struct nir_spirv_specialization {
 };
 
 struct nir_spirv_supported_extensions {
+   bool float64;
    bool image_ms_array;
 };
 
index b67189e07a68ca29ad2e599fb69b92ecd508a766..befee1a4b9b860e789ed2f003607a46136ec47b2 100644 (file)
@@ -2609,7 +2609,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:
@@ -2626,6 +2625,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
                   spirv_capability_to_string(cap));
          break;
 
+      case SpvCapabilityFloat64:
+         spv_check_supported(float64, cap);
+         break;
+
       case SpvCapabilityAddresses:
       case SpvCapabilityKernel:
       case SpvCapabilityImageBasic: