[Mesa-dev] [PATCH v2 44/53] compiler/spirv: add support for Float16 and Int8 capabilities
Iago Toral Quiroga
itoral at igalia.com
Wed Dec 19 11:51:12 UTC 2018
v2:
- Merge Float16 and Int8 capabilities into a single patch
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net> (v1)
---
src/compiler/shader_info.h | 2 ++
src/compiler/spirv/spirv_to_nir.c | 8 ++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index b21db3e60f0..b4bc95912a5 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -46,6 +46,8 @@ struct spirv_supported_capabilities {
bool variable_pointers;
bool storage_16bit;
bool int16;
+ bool float16;
+ bool int8;
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 7dc6bc914d6..dbfd800c945 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -3431,9 +3431,7 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
case SpvCapabilityLinkage:
case SpvCapabilityVector16:
case SpvCapabilityFloat16Buffer:
- case SpvCapabilityFloat16:
case SpvCapabilityStorageImageMultisample:
- case SpvCapabilityInt8:
case SpvCapabilitySparseResidency:
vtn_warn("Unsupported SPIR-V capability: %s",
spirv_capability_to_string(cap));
@@ -3450,12 +3448,18 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
case SpvCapabilityFloat64:
spv_check_supported(float64, cap);
break;
+ case SpvCapabilityFloat16:
+ spv_check_supported(float16, cap);
+ break;
case SpvCapabilityInt64:
spv_check_supported(int64, cap);
break;
case SpvCapabilityInt16:
spv_check_supported(int16, cap);
break;
+ case SpvCapabilityInt8:
+ spv_check_supported(int8, cap);
+ break;
case SpvCapabilityTransformFeedback:
spv_check_supported(transform_feedback, cap);
--
2.17.1
More information about the mesa-dev
mailing list