gallium: Modify default path for DMABUF to use DRM

Modify the code path taken in `u_pipe_screen_get_param_defaults`
to call DRM to check if `PIPE_CAP_DMABUF` is supported. This is
required for overriding the behavior in `dri2_init_screen_extensions`
to support importing DMA bufs on drivers that don't support DRM, by
simply changing how `PIPE_CAP_DMABUF` is handled in their driver.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
This commit is contained in:
Lucas Fryzek
2023-03-02 07:38:50 -05:00
committed by Marge Bot
parent 59efea9f63
commit cffa67af01
3 changed files with 32 additions and 20 deletions

View File

@@ -565,6 +565,11 @@ The integer capabilities:
execution. 0 = throttling is disabled.
* ``PIPE_CAP_DMABUF``: Whether Linux DMABUF handles are supported by
resource_from_handle and resource_get_handle.
Possible bit field values:
1. ``DRM_PRIME_CAP_IMPORT``: resource_from_handle is supported
2. ``DRM_PRIME_CAP_EXPORT``: resource_get_handle is supported
* ``PIPE_CAP_PREFER_COMPUTE_FOR_MULTIMEDIA``: Whether VDPAU, VAAPI, and
OpenMAX should use a compute-based blit instead of pipe_context::blit and compute pipeline for compositing images.
* ``PIPE_CAP_FRAGMENT_SHADER_INTERLOCK``: True if fragment shader interlock