va_end(args);
}
+void
+_vtn_fail(struct vtn_builder *b, const char *file, unsigned line,
+ const char *fmt, ...)
+{
+ va_list args;
+
+ va_start(args, fmt);
+ vtn_log_err(b, NIR_SPIRV_DEBUG_LEVEL_ERROR, "SPIR-V parsing FAILED:\n",
+ file, line, fmt, args);
+ va_end(args);
+
+ longjmp(b->fail_jump, 1);
+}
+
struct spec_constant_value {
bool is_double;
union {
b->entry_point_name = entry_point_name;
b->options = options;
+ /* See also _vtn_fail() */
+ if (setjmp(b->fail_jump)) {
+ ralloc_free(b);
+ return NULL;
+ }
+
const uint32_t *word_end = words + word_count;
/* Handle the SPIR-V header (first 4 dwords) */