From: Samuel Pitoiset Date: Fri, 12 Apr 2019 06:53:35 +0000 (+0200) Subject: spirv: add SpvCapabilityFloat16 support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bbe8febd93e1f2b1641ee23d7dd8d5032daede4a;p=mesa.git spirv: add SpvCapabilityFloat16 support Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- 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"); }