spirv: handle AMD_gcn_shader extended instructions

Co-authored-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Schürmann <daniel.schuermann@campus.tu-berlin.de>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Daniel Schürmann
2018-02-23 13:54:59 +01:00
committed by Bas Nieuwenhuizen
parent a1a2a8dfda
commit 68a6a3b51a
6 changed files with 70 additions and 0 deletions

View File

@@ -373,6 +373,9 @@ vtn_handle_extension(struct vtn_builder *b, SpvOp opcode,
struct vtn_value *val = vtn_push_value(b, w[1], vtn_value_type_extension);
if (strcmp((const char *)&w[2], "GLSL.std.450") == 0) {
val->ext_handler = vtn_handle_glsl450_instruction;
} else if ((strcmp((const char *)&w[2], "SPV_AMD_gcn_shader") == 0)
&& (b->options && b->options->exts.AMD_gcn_shader)) {
val->ext_handler = vtn_handle_amd_gcn_shader_instruction;
} else {
vtn_fail("Unsupported extension");
}