We can avoid adding the buffer in the non-local case, this will
avoid all the overhead of the indirect call.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
struct radeon_winsys_bo {
uint64_t va;
+ bool is_local;
};
struct radv_winsys_sem_counts {
uint32_t syncobj_count;
struct radeon_winsys_bo *bo,
uint8_t priority)
{
+ if (bo->is_local)
+ return;
+
ws->cs_add_buffer(cs, bo, priority);
}
if (!(flags & RADEON_FLAG_IMPLICIT_SYNC) && ws->info.drm_minor >= 22)
request.flags |= AMDGPU_GEM_CREATE_EXPLICIT_SYNC;
if (flags & RADEON_FLAG_NO_INTERPROCESS_SHARING && ws->info.drm_minor >= 20) {
- bo->is_local = true;
+ bo->base.is_local = true;
request.flags |= AMDGPU_GEM_CREATE_VM_ALWAYS_VALID;
}
uint64_t size;
struct radv_amdgpu_winsys *ws;
bool is_virtual;
- bool is_local;
int ref_count;
union {
return;
}
- if (bo->is_local)
+ if (bo->base.is_local)
return;
radv_amdgpu_cs_add_buffer_internal(cs, bo->bo, priority);