egl: Fix surfaceless + modifiers

Modifiers are not restricted to dri3.

Fixes: d86f39e7cf ("egl: swap DRI_IMAGE checks for dmabuf/modifier support for driver check")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30579>
This commit is contained in:
Rob Clark 2024-08-08 15:08:58 -07:00 committed by Marge Bot
parent 48acf9d358
commit 19d44313a4

View file

@ -626,7 +626,6 @@ dri2_setup_screen(_EGLDisplay *disp)
struct pipe_screen *pscreen = screen->base.screen;
unsigned int api_mask = screen->api_mask;
#ifdef HAVE_DRI3
bool has_modifiers = true;
if (disp->Platform == _EGL_PLATFORM_X11 ||
disp->Platform == _EGL_PLATFORM_XCB)
@ -635,7 +634,6 @@ dri2_setup_screen(_EGLDisplay *disp)
/* set if both import and export are suported */
dri2_dpy->has_modifiers = has_modifiers && util_bitcount(caps) == 2;
dri2_dpy->has_dmabuf_import = has_modifiers && caps & DRM_PRIME_CAP_IMPORT;
#endif
#ifdef HAVE_ANDROID_PLATFORM
dri2_dpy->has_native_fence_fd = dri_get_screen_param(dri2_dpy->dri_screen_render_gpu, PIPE_CAP_NATIVE_FENCE_FD);
#endif