[Mesa-dev] [PATCH 1/2] spirv: add SpvCapabilityFloat16 support
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Apr 12 06:53:35 UTC 2019
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/compiler/shader_info.h | 1 +
src/compiler/spirv/spirv_to_nir.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index 0b67082a732..45ba2982884 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -70,6 +70,7 @@ struct spirv_supported_capabilities {
bool transform_feedback;
bool trinary_minmax;
bool variable_pointers;
+ bool float16;
};
typedef struct shader_info {
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 98205a1b8b2..e7d6aa02379 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -3611,7 +3611,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
case SpvCapabilityLinkage:
case SpvCapabilityVector16:
case SpvCapabilityFloat16Buffer:
- case SpvCapabilityFloat16:
case SpvCapabilitySparseResidency:
vtn_warn("Unsupported SPIR-V capability: %s",
spirv_capability_to_string(cap));
@@ -3781,6 +3780,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
spv_check_supported(derivative_group, cap);
break;
+ case SpvCapabilityFloat16:
+ spv_check_supported(float16, cap);
+ break;
+
default:
vtn_fail("Unhandled capability");
}
--
2.21.0
More information about the mesa-dev
mailing list