mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
radv/winsys: set use_global_list to avoid adding a BO twice
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8868>
This commit is contained in:
parent
3235ff5cf4
commit
16abc82ef0
1 changed files with 2 additions and 0 deletions
|
|
@ -341,6 +341,7 @@ static int radv_amdgpu_global_bo_list_add(struct radv_amdgpu_winsys *ws,
|
|||
|
||||
ws->global_bo_list.bos[ws->global_bo_list.count++] = bo;
|
||||
u_rwlock_wrunlock(&ws->global_bo_list.lock);
|
||||
bo->base.use_global_list = true;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
@ -352,6 +353,7 @@ static void radv_amdgpu_global_bo_list_del(struct radv_amdgpu_winsys *ws,
|
|||
if (ws->global_bo_list.bos[i] == bo) {
|
||||
ws->global_bo_list.bos[i] = ws->global_bo_list.bos[ws->global_bo_list.count - 1];
|
||||
--ws->global_bo_list.count;
|
||||
bo->base.use_global_list = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue