[Mesa-dev] [PATCH 11/16] anv: handle out of memory situations during queue submissions
Iago Toral Quiroga
itoral at igalia.com
Tue Mar 7 07:15:56 UTC 2017
---
src/intel/vulkan/anv_batch_chain.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c
index d0a1b03..aae5f78 100644
--- a/src/intel/vulkan/anv_batch_chain.c
+++ b/src/intel/vulkan/anv_batch_chain.c
@@ -1244,8 +1244,11 @@ anv_cmd_buffer_execbuf(struct anv_device *device,
adjust_relocations_from_state_pool(ss_pool, &cmd_buffer->surface_relocs,
cmd_buffer->last_ss_pool_center);
- anv_execbuf_add_bo(&execbuf, &ss_pool->bo, &cmd_buffer->surface_relocs,
- &cmd_buffer->pool->alloc);
+ VkResult result =
+ anv_execbuf_add_bo(&execbuf, &ss_pool->bo, &cmd_buffer->surface_relocs,
+ &cmd_buffer->pool->alloc);
+ if (result != VK_SUCCESS)
+ return result;
/* First, we walk over all of the bos we've seen and add them and their
* relocations to the validate list.
@@ -1361,7 +1364,7 @@ anv_cmd_buffer_execbuf(struct anv_device *device,
cmd_buffer->surface_relocs.relocs[i].presumed_offset = -1;
}
- VkResult result = anv_device_execbuf(device, &execbuf.execbuf, execbuf.bos);
+ result = anv_device_execbuf(device, &execbuf.execbuf, execbuf.bos);
anv_execbuf_finish(&execbuf, &cmd_buffer->pool->alloc);
--
2.7.4
More information about the mesa-dev
mailing list