mesa/src/gallium/include
Karol Herbst 8658529e88 gallium: new VM interfaces for SVM
The old interfaces added back in clover's time were modeled after a very
bindful resource model.

However SVM (shared virtual memory) requires us to be way more flexible.

The new interfaces allow frontends to create a cut-out in the GPU's vm and
to assign addresses themselves. This gives us the following benefits:
 - The frontend is empowered to synchronize resource addresses between
   several devices. cl_mem objects in OpenCL span across a set of multiple
   devices and SVM requires them to have the same VMA across all of them.
 - Coarse grain SVM can be implemented without bothering drivers too much
   as the frontend can be responsible to make sure a host allocation with
   a specific VMA matches a GPU allocation with the identical VMA.
 - Support for Global variables in the CrossWorkgroup storage class
   Initializers. Those can depend on addresses of CrossWorkgroup memory,
   if the frontend can just assign a VMA, this address can be passed as a
   constant to spirv_to_nir and folded without the need to support
   spilling of constant initializers.

Drivers not able to give us a vm-cutout are left with implementing
cl_ext_buffer_device_address instead.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32942>
2025-05-28 19:21:46 +00:00
..
frontend gallium: drop dynamic pipe-loader leftovers 2025-05-27 21:44:31 +00:00
pipe gallium: new VM interfaces for SVM 2025-05-28 19:21:46 +00:00
winsys winsys/amdgpu: pass PIPE_CONTEXT_* flags to ctx_create 2025-05-28 10:23:15 +00:00
mesa_interface.h mesa_interface: fix legacy dri2 compatibility 2025-04-16 20:19:14 +00:00