aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_alu.c
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-04-10 11:13:40 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-04-16 11:11:10 -0700
commita0dae78e720c980a311c6c3cfd8ddcef70102bfe (patch)
tree582bb284fdd515269af1553a9a1db041618c8d52 /src/compiler/spirv/vtn_alu.c
parent0ccfe741b106efea2f2c5d526d50f4bce61d701e (diff)
spirv: Tell which opcode or value is unhandled when failing
v2: When available, include the opcode name too. (Karol) v3: Use more to_string helpers. (Karol) Include the wrong bit_size in those failures. Include the capability number in spv_check_supported. Provide vtn_fail_with_* macros to avoid noise in the call sites. v4: Provide macros only for opcode and decoration, which have enough usages to justify them. (Jason) Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_alu.c')
-rw-r--r--src/compiler/spirv/vtn_alu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/spirv/vtn_alu.c b/src/compiler/spirv/vtn_alu.c
index f93e336fb8b..0c0e87e0e6f 100644
--- a/src/compiler/spirv/vtn_alu.c
+++ b/src/compiler/spirv/vtn_alu.c
@@ -23,6 +23,7 @@
#include <math.h>
#include "vtn_private.h"
+#include "spirv_info.h"
/*
* Normally, column vectors in SPIR-V correspond to a single NIR SSA
@@ -207,7 +208,7 @@ vtn_handle_matrix_alu(struct vtn_builder *b, SpvOp opcode,
}
break;
- default: vtn_fail("unknown matrix opcode");
+ default: vtn_fail_with_opcode("unknown matrix opcode", opcode);
}
}