summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsálvez <[email protected]>2017-01-04 09:35:36 +0100
committerJuan A. Suarez Romero <[email protected]>2017-01-09 10:44:07 +0100
commit88c8121ec9e591fee53bdd416247997eef47b40f (patch)
treedda65f6ce3d628c391b4e87ec9b2438b82e4ea26 /src/compiler/spirv
parentc2acf97fcc9b32eaa9778771282758e5652a8ad4 (diff)
spirv: enable SpvCapabilityFloat64 only to supported platforms
v2 (Jason): - Use nir_spirv_supported_extensions to check if the feature is enabled. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/spirv')
-rw-r--r--src/compiler/spirv/nir_spirv.h1
-rw-r--r--src/compiler/spirv/spirv_to_nir.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/spirv/nir_spirv.h b/src/compiler/spirv/nir_spirv.h
index 116b0a374cd..2850e91e8b8 100644
--- a/src/compiler/spirv/nir_spirv.h
+++ b/src/compiler/spirv/nir_spirv.h
@@ -45,6 +45,7 @@ struct nir_spirv_specialization {
};
struct nir_spirv_supported_extensions {
+ bool float64;
bool image_ms_array;
};
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index b67189e07a6..befee1a4b9b 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -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: