egl: Clear modifiers if we clear use_flags
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

zink assumes that we won't pass modifiers without PIPE_BIND_SHARED

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13439
Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36008>
This commit is contained in:
Mel Henning 2025-07-08 14:20:48 -04:00 committed by Marge Bot
parent 0f6a8283ca
commit 295768c13e

View file

@ -1109,10 +1109,15 @@ create_dri_image(struct dri2_egl_surface *dri2_surf,
modifiers = NULL;
}
if (dri2_dpy->fd_render_gpu != dri2_dpy->fd_display_gpu) {
use_flags = 0;
modifiers = NULL;
num_modifiers = 0;
}
dri2_surf->back->dri_image = dri_create_image_with_modifiers(
dri2_dpy->dri_screen_render_gpu, dri2_surf->base.Width,
dri2_surf->base.Height, pipe_format,
(dri2_dpy->fd_render_gpu != dri2_dpy->fd_display_gpu) ? 0 : use_flags,
dri2_surf->base.Height, pipe_format, use_flags,
modifiers, num_modifiers, NULL);
if (surf_modifiers_count > 0) {