spirv: add SpvCapabilityFloat16 support

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Samuel Pitoiset
2019-04-12 08:53:35 +02:00
parent 8bf9b7b5b6
commit bbe8febd93
2 changed files with 5 additions and 1 deletions

View File

@@ -70,6 +70,7 @@ struct spirv_supported_capabilities {
bool transform_feedback;
bool trinary_minmax;
bool variable_pointers;
bool float16;
};
typedef struct shader_info {

View File

@@ -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");
}