mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
winsys/amdgpu: keep has_local_buffers true for userq
In case of userqueue, kernel bo kms_handle will not hold fences for non shared bo. Non shared bo fences are taken care within mesa. Hence need to copy the data to another shared buffer for export. Keeping has_local_buffers true for userq will make non shared bo to be copied to shared bo for export in si_texture_get_handle(). Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
This commit is contained in:
parent
8447cb563f
commit
f0d31eda25
1 changed files with 4 additions and 4 deletions
|
|
@ -39,10 +39,6 @@ static bool do_winsys_init(struct amdgpu_winsys *aws,
|
|||
if (!ac_query_gpu_info(fd, aws->dev, &aws->info, false))
|
||||
goto fail;
|
||||
|
||||
/* TODO: Enable this once the kernel handles it efficiently. */
|
||||
if (aws->info.has_dedicated_vram)
|
||||
aws->info.has_local_buffers = false;
|
||||
|
||||
aws->addrlib = ac_addrlib_create(&aws->info, &aws->info.max_alignment);
|
||||
if (!aws->addrlib) {
|
||||
fprintf(stderr, "amdgpu: Cannot create addrlib.\n");
|
||||
|
|
@ -65,6 +61,10 @@ static bool do_winsys_init(struct amdgpu_winsys *aws,
|
|||
for (unsigned i = 0; i < ARRAY_SIZE(aws->queues); i++)
|
||||
simple_mtx_init(&aws->queues[i].userq.lock, mtx_plain);
|
||||
|
||||
/* TODO: Enable this once the kernel handles it efficiently. */
|
||||
if (aws->info.has_dedicated_vram && !aws->info.use_userq)
|
||||
aws->info.has_local_buffers = false;
|
||||
|
||||
return true;
|
||||
|
||||
fail:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue