summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_batch_chain.c
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2017-03-06 12:04:19 +0100
committerIago Toral Quiroga <[email protected]>2017-03-16 11:40:05 +0100
commitfb9d563fb9b6e63a79dc4b8aa1faee58faec4f5a (patch)
treeeb61969ec5a20b2e74725ccfaf428e6cb609c7f6 /src/intel/vulkan/anv_batch_chain.c
parentc04dbd6b3e8b13fbf89338c79bccf4c06e6ff5aa (diff)
anv: handle memory allocation errors during queue submissions
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_batch_chain.c')
-rw-r--r--src/intel/vulkan/anv_batch_chain.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c
index abd0c171aaa..655182db260 100644
--- a/src/intel/vulkan/anv_batch_chain.c
+++ b/src/intel/vulkan/anv_batch_chain.c
@@ -1259,8 +1259,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.
@@ -1376,7 +1379,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);