summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2017-05-08 09:01:56 +0100
committerLionel Landwerlin <[email protected]>2017-05-08 14:38:27 +0100
commite3a5ab2d66563174455683d1dcd53aaaba9cd299 (patch)
tree2a36aeced042b21fe356ccd180745845d9394ef0 /src/intel
parent6247b8b41321087a8931becc812819a76fcaebbb (diff)
anv: check return value of anv_execbuf_add_bo
CID: 1405919 (Error handling issues) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_batch_chain.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c
index 6d6babadea1..9def174b429 100644
--- a/src/intel/vulkan/anv_batch_chain.c
+++ b/src/intel/vulkan/anv_batch_chain.c
@@ -1048,10 +1048,15 @@ anv_execbuf_add_bo(struct anv_execbuf *exec,
obj->relocs_ptr = (uintptr_t) relocs->relocs;
for (size_t i = 0; i < relocs->num_relocs; i++) {
+ VkResult result;
+
/* A quick sanity check on relocations */
assert(relocs->relocs[i].offset < bo->size);
- anv_execbuf_add_bo(exec, relocs->reloc_bos[i], NULL,
- extra_flags, alloc);
+ result = anv_execbuf_add_bo(exec, relocs->reloc_bos[i], NULL,
+ extra_flags, alloc);
+
+ if (result != VK_SUCCESS)
+ return result;
}
}