mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 11:08:03 +02:00
anv: check the return value of anv_execbuf_add_bo_bitset()
Because anv_execbuf_add_bo_bitset() calls anv_execbuf_add_bo(), which
can fail if its memory allocations fail.
I have seen dEQP tests exercising memory allocation failures during
anv_execbuf_add_bo(), but I don't think the path coming from
add_bo_biset() was specifically exercised. Anyway, add the error check
just in case.
v2: Rebase.
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20703>
(cherry picked from commit 3d37950fd9)
This commit is contained in:
parent
f2aaa18997
commit
9098d83fb3
2 changed files with 6 additions and 4 deletions
|
|
@ -3253,7 +3253,7 @@
|
|||
"description": "anv: check the return value of anv_execbuf_add_bo_bitset()",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1364,9 +1364,11 @@ setup_execbuf_for_cmd_buffer(struct anv_execbuf *execbuf,
|
|||
{
|
||||
VkResult result;
|
||||
/* Add surface dependencies (BOs) to the execbuf */
|
||||
anv_execbuf_add_bo_bitset(cmd_buffer->device, execbuf,
|
||||
cmd_buffer->surface_relocs.dep_words,
|
||||
cmd_buffer->surface_relocs.deps, 0);
|
||||
result = anv_execbuf_add_bo_bitset(cmd_buffer->device, execbuf,
|
||||
cmd_buffer->surface_relocs.dep_words,
|
||||
cmd_buffer->surface_relocs.deps, 0);
|
||||
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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue