diff options
author | Jason Ekstrand <[email protected]> | 2016-10-31 16:33:43 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-11-01 07:54:52 -0700 |
commit | c41ec1679f02d6705ceda49d9ad966d0d0833824 (patch) | |
tree | 97ce2443e5773072e0235cac7f850ad3b097008c | |
parent | 61a8a55f557784c8ec17fb1758775c6f18252201 (diff) |
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 <[email protected]>
Cc: "13.0" <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
-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 c995630f152..37615ef1225 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"); } } |