mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 16:00:08 +01:00
iris: assert(bo->deps) after realloc()
Iris in general doesn't really like checking the return value of its
allocations, but in some places it does assert that those pointers are
non-NULL. We've recently investigated a bug that could have been
coming from a failed bo->deps realloc(), so add the assert() here to
help give us more confidence over things the next time we're debugging
issues.
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
(cherry picked from commit 7c538b5ad8)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25404>
This commit is contained in:
parent
2e4c04864a
commit
0f28940fea
1 changed files with 1 additions and 0 deletions
|
|
@ -750,6 +750,7 @@ update_bo_syncobjs(struct iris_batch *batch, struct iris_bo *bo, bool write)
|
|||
if (screen->id >= bo->deps_size) {
|
||||
int new_size = screen->id + 1;
|
||||
bo->deps = realloc(bo->deps, new_size * sizeof(bo->deps[0]));
|
||||
assert(bo->deps);
|
||||
memset(&bo->deps[bo->deps_size], 0,
|
||||
sizeof(bo->deps[0]) * (new_size - bo->deps_size));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue