vc4/simulator: create GEM BOs in GTT memory for AMD GPUs

As the BOs created in GPU needs to be accessible from the simulator,
create them in GTT memory, with CPU access.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37887>
This commit is contained in:
Juan A. Suarez Romero
2025-10-24 13:48:54 +02:00
committed by Marge Bot
parent 84fa5ecff6
commit 66d715bac3
+3
View File
@@ -204,6 +204,9 @@ vc4_gem_create(int fd, uint64_t size, uint32_t *handle)
{
union drm_amdgpu_gem_create create = { 0 };
create.in.bo_size = size;
create.in.domains = AMDGPU_GEM_DOMAIN_GTT;
create.in.domain_flags =
AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
ret = drmIoctl(fd, DRM_IOCTL_AMDGPU_GEM_CREATE, &create);
*handle = create.out.handle;
break;