diff options
author | Rob Clark <[email protected]> | 2018-02-23 15:56:03 -0500 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2018-07-12 13:09:00 +0200 |
commit | d4280561f582f79559d98467650c805e1824b21d (patch) | |
tree | ccd4e715cd6c6c42ecf0d4b2506097467b3b4e8a /src | |
parent | 9ce0360f7623309ba756f189b8cdd16310a2355f (diff) |
nir/spirv: print extension name in fail msg
Reviewed-by: Karol Herbst <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Signed-off-by: Karol Herbst <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index aad4c713f9e..413fbf481c1 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -383,19 +383,20 @@ static void vtn_handle_extension(struct vtn_builder *b, SpvOp opcode, const uint32_t *w, unsigned count) { + const char *ext = (const char *)&w[2]; switch (opcode) { case SpvOpExtInstImport: { struct vtn_value *val = vtn_push_value(b, w[1], vtn_value_type_extension); - if (strcmp((const char *)&w[2], "GLSL.std.450") == 0) { + if (strcmp(ext, "GLSL.std.450") == 0) { val->ext_handler = vtn_handle_glsl450_instruction; - } else if ((strcmp((const char *)&w[2], "SPV_AMD_gcn_shader") == 0) + } else if ((strcmp(ext, "SPV_AMD_gcn_shader") == 0) && (b->options && b->options->caps.gcn_shader)) { val->ext_handler = vtn_handle_amd_gcn_shader_instruction; - } else if ((strcmp((const char *)&w[2], "SPV_AMD_shader_trinary_minmax") == 0) + } else if ((strcmp(ext, "SPV_AMD_shader_trinary_minmax") == 0) && (b->options && b->options->caps.trinary_minmax)) { val->ext_handler = vtn_handle_amd_shader_trinary_minmax_instruction; } else { - vtn_fail("Unsupported extension"); + vtn_fail("Unsupported extension: %s", ext); } break; } |