mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 06:30:11 +01:00
anv: check return value of anv_execbuf_add_bo
CID: 1405919 (Error handling issues) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
parent
6247b8b413
commit
e3a5ab2d66
1 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue