From bbe8febd93e1f2b1641ee23d7dd8d5032daede4a Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 12 Apr 2019 08:53:35 +0200 Subject: [PATCH] spirv: add SpvCapabilityFloat16 support Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- 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 ef12e21eaa6..99bf649e57e 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -3561,7 +3561,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)); @@ -3731,6 +3730,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.30.2