[Mesa-dev] [PATCH v3 07/19] nir/vtn: print extension name in fail msg
Karol Herbst
kherbst at redhat.com
Fri Mar 23 19:33:44 UTC 2018
From: Rob Clark <robdclark at gmail.com>
Signed-off-by: Rob Clark <robdclark at gmail.com>
Signed-off-by: Karol Herbst <kherbst at redhat.com>
---
src/compiler/spirv/spirv_to_nir.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index d58a68f80ef..3acb3fc0b42 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -370,16 +370,17 @@ 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)
&& (b->options && b->options->caps.gcn_shader)) {
val->ext_handler = vtn_handle_amd_gcn_shader_instruction;
} else {
- vtn_fail("Unsupported extension");
+ vtn_fail("Unsupported extension: %s", ext);
}
break;
}
--
2.14.3
More information about the mesa-dev
mailing list