diff options
Diffstat (limited to 'src/compiler/spirv/vtn_private.h')
-rw-r--r-- | src/compiler/spirv/vtn_private.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index dd3c328b3a7..f21bb5bd10c 100644 --- a/src/compiler/spirv/vtn_private.h +++ b/src/compiler/spirv/vtn_private.h @@ -88,6 +88,12 @@ _vtn_fail(struct vtn_builder *b, const char *file, unsigned line, vtn_fail(__VA_ARGS__); \ } while (0) +#define _vtn_fail_with(t, msg, v) \ + vtn_fail("%s: %s (%u)\n", msg, spirv_ ## t ## _to_string(v), v) + +#define vtn_fail_with_decoration(msg, v) _vtn_fail_with(decoration, msg, v) +#define vtn_fail_with_opcode(msg, v) _vtn_fail_with(op, msg, v) + /** Assert that a condition is true and, if it isn't, vtn_fail * * This macro is transitional only and should not be used in new code. Use |