diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2016-10-31 16:33:43 -0700 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-11-09 12:48:39 +0000 |
commit | 2f8b48d274bd51613e95a5ca09fd767e431d85a2 (patch) | |
tree | a46086f1d9247bbf786a78709413ef7508c661c2 | |
parent | 405dd26860719d800ed6134f8f985f1525f25502 (diff) | |
download | external_mesa3d-2f8b48d274bd51613e95a5ca09fd767e431d85a2.zip external_mesa3d-2f8b48d274bd51613e95a5ca09fd767e431d85a2.tar.gz external_mesa3d-2f8b48d274bd51613e95a5ca09fd767e431d85a2.tar.bz2 |
anv/device: Return DEVICE_LOST if execbuf2 fails
This makes more sense than OUT_OF_HOST_MEMORY. Technically, you can
recover from a failed execbuf2 but the batch you just submitted didn't
fully execute so things are in an ill-defined state. The app doesn't want
to continue from that point anyway.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit c41ec1679f02d6705ceda49d9ad966d0d0833824)
-rw-r--r-- | src/intel/vulkan/anv_device.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index c995630..37615ef 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -812,7 +812,7 @@ anv_device_submit_simple_batch(struct anv_device *device, ret = anv_gem_execbuffer(device, &execbuf); if (ret != 0) { /* We don't know the real error. */ - result = vk_errorf(VK_ERROR_OUT_OF_DEVICE_MEMORY, "execbuf2 failed: %m"); + result = vk_errorf(VK_ERROR_DEVICE_LOST, "execbuf2 failed: %m"); goto fail; } @@ -820,7 +820,7 @@ anv_device_submit_simple_batch(struct anv_device *device, ret = anv_gem_wait(device, bo.gem_handle, &timeout); if (ret != 0) { /* We don't know the real error. */ - result = vk_errorf(VK_ERROR_OUT_OF_DEVICE_MEMORY, "execbuf2 failed: %m"); + result = vk_errorf(VK_ERROR_DEVICE_LOST, "execbuf2 failed: %m"); goto fail; } @@ -1090,8 +1090,7 @@ VkResult anv_QueueSubmit( ret = anv_gem_execbuffer(device, &cmd_buffer->execbuf2.execbuf); if (ret != 0) { /* We don't know the real error. */ - return vk_errorf(VK_ERROR_OUT_OF_DEVICE_MEMORY, - "execbuf2 failed: %m"); + return vk_errorf(VK_ERROR_DEVICE_LOST, "execbuf2 failed: %m"); } for (uint32_t k = 0; k < cmd_buffer->execbuf2.bo_count; k++) @@ -1103,8 +1102,7 @@ VkResult anv_QueueSubmit( ret = anv_gem_execbuffer(device, &fence->execbuf); if (ret != 0) { /* We don't know the real error. */ - return vk_errorf(VK_ERROR_OUT_OF_DEVICE_MEMORY, - "execbuf2 failed: %m"); + return vk_errorf(VK_ERROR_DEVICE_LOST, "execbuf2 failed: %m"); } } |