summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/anv_util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_util.c b/src/intel/vulkan/anv_util.c
index ba91733d82b..4b916e27f2c 100644
--- a/src/intel/vulkan/anv_util.c
+++ b/src/intel/vulkan/anv_util.c
@@ -30,6 +30,7 @@
#include "anv_private.h"
#include "vk_enum_to_str.h"
+#include "util/debug.h"
/** Log an error message. */
void anv_printflike(1, 2)
@@ -95,5 +96,9 @@ __vk_errorf(VkResult error, const char *file, int line, const char *format, ...)
fprintf(stderr, "%s:%d: %s\n", file, line, error_str);
}
+ if (error == VK_ERROR_DEVICE_LOST &&
+ env_var_as_boolean("ANV_ABORT_ON_DEVICE_LOSS", false))
+ abort();
+
return error;
}