diff options
author | Samuel Pitoiset <[email protected]> | 2019-04-12 08:53:35 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-04-15 10:43:52 +0200 |
commit | bbe8febd93e1f2b1641ee23d7dd8d5032daede4a (patch) | |
tree | 831a922ba568ce73b27ce02d455dacc9317846d7 /src | |
parent | 8bf9b7b5b6e28aad7c0635fab7aa611f86be8d79 (diff) |
spirv: add SpvCapabilityFloat16 support
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/shader_info.h | 1 | ||||
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 5 |
2 files changed, 5 insertions, 1 deletions
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"); } |