mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-10 01:18:18 +02:00
tu/kgsl: initialize dump bo state in kgsl_bo_init sooner
In kgsl_bo_init(), tu_dump_bo_init() should be called for tu_bo after it's initialized and before it's possibly mapped, since the mapping can fail and cause kgsl_bo_finish() to call tu_dump_bo_del() for tu_bo with an improperly initialized dump_bo_list_idx, leading to crashes. Signed-off-by: Zan Dobersek <zdobersek@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41983>
This commit is contained in:
parent
bed8008c9d
commit
fbdc5814ad
1 changed files with 2 additions and 2 deletions
|
|
@ -298,6 +298,8 @@ kgsl_bo_init(struct tu_device *dev,
|
|||
.base = base,
|
||||
};
|
||||
|
||||
tu_dump_bo_init(dev, bo);
|
||||
|
||||
VkResult result = VK_SUCCESS;
|
||||
|
||||
if (lazy_vma) {
|
||||
|
|
@ -309,8 +311,6 @@ kgsl_bo_init(struct tu_device *dev,
|
|||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
tu_dump_bo_init(dev, bo);
|
||||
|
||||
*out_bo = bo;
|
||||
|
||||
TU_RMV(bo_allocate, dev, bo);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue