--- src/intel/vulkan/anv_device.c | 11 +++++++++++ src/intel/vulkan/anv_util.c | 4 ---- 2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 79d3f052113..d62bdde078c 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -2053,6 +2053,17 @@ void anv_device_set_lost(struct anv_device *device, const char *msg, ...) { device->_lost = true; + + if (env_var_as_boolean("ANV_ABORT_ON_DEVICE_LOSS", false)) { + intel_loge("Device lost!"); + + va_list ap; + va_start(ap, msg); + intel_loge_v(msg, ap); + va_end(ap); + + abort(); + } } VkResult diff --git a/src/intel/vulkan/anv_util.c b/src/intel/vulkan/anv_util.c index 9082707624c..9963a15ace3 100644 --- a/src/intel/vulkan/anv_util.c +++ b/src/intel/vulkan/anv_util.c @@ -112,9 +112,5 @@ __vk_errorf(struct anv_instance *instance, const void *object, intel_loge("%s", report); - if (error == VK_ERROR_DEVICE_LOST && - env_var_as_boolean("ANV_ABORT_ON_DEVICE_LOSS", false)) - abort(); - return error; } -- 2.19.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev