egl: decouple dmabuf import/export cap from xserver support
multibuffers_available denotes xserver side support for DRI3 and Present protocols which should not affect client side support for dmabuf import/export. This is for xserver with amdgpu DDX in which case multibuffers_available will be false, but dmabuf import/export should be enabled to support applications like mpv which use dmabuf import for vaapi decoded buffer. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
This commit is contained in:
@@ -629,11 +629,8 @@ dri2_setup_screen(_EGLDisplay *disp)
|
||||
|
||||
#ifdef HAVE_LIBDRM
|
||||
unsigned caps = pscreen->caps.dmabuf;
|
||||
/* set if both import and export are suported */
|
||||
if (dri2_dpy->multibuffers_available) {
|
||||
dri2_dpy->has_dmabuf_import = (caps & DRM_PRIME_CAP_IMPORT) > 0;
|
||||
dri2_dpy->has_dmabuf_export = (caps & DRM_PRIME_CAP_EXPORT) > 0;
|
||||
}
|
||||
dri2_dpy->has_dmabuf_import = (caps & DRM_PRIME_CAP_IMPORT) > 0;
|
||||
dri2_dpy->has_dmabuf_export = (caps & DRM_PRIME_CAP_EXPORT) > 0;
|
||||
#endif
|
||||
#ifdef HAVE_ANDROID_PLATFORM
|
||||
dri2_dpy->has_native_fence_fd = pscreen->caps.native_fence_fd;
|
||||
|
||||
Reference in New Issue
Block a user