This will allow us to use the global BO list even without
RADEON_FLAG_PREFER_LOCAL_BO which can cause a lot of troubles
on APUs.
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/8779>
}
bo_list->list.bos[bo_list->list.count++] = bo;
+ bo->use_global_list = true;
u_rwlock_wrunlock(&bo_list->rwlock);
return VK_SUCCESS;
}
for(unsigned i = bo_list->list.count; i-- > 0;) {
if (bo_list->list.bos[i] == bo) {
bo_list->list.bos[i] = bo_list->list.bos[bo_list->list.count - 1];
+ bo->use_global_list = false;
--bo_list->list.count;
break;
}
uint64_t va;
bool is_local;
bool vram_no_cpu_access;
+ bool use_global_list;
enum radeon_bo_domain initial_domain;
};
struct radv_winsys_sem_counts {
struct radeon_cmdbuf *cs,
struct radeon_winsys_bo *bo)
{
- if (bo->is_local)
+ if (bo->use_global_list)
return;
ws->cs_add_buffer(cs, bo);
bo->bo = buf_handle;
bo->base.initial_domain = initial_domain;
+ bo->base.use_global_list = bo->base.is_local;
bo->is_shared = false;
bo->priority = priority;
bo->ref_count = 1;
bo->bo = buf_handle;
bo->base.initial_domain = RADEON_DOMAIN_GTT;
+ bo->base.use_global_list = false;
bo->priority = priority;
ASSERTED int r = amdgpu_bo_export(buf_handle, amdgpu_bo_handle_type_kms, &bo->bo_handle);
bo->base.va = va;
bo->va_handle = va_handle;
bo->base.initial_domain = initial;
+ bo->base.use_global_list = false;
bo->size = result.alloc_size;
bo->is_shared = true;
bo->priority = priority;