egl/wayland: bail on zink init in non-sw mode if extension check fails

cc: mesa-stable

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30479>
(cherry picked from commit d120992e1a)
This commit is contained in:
Mike Blumenkrantz 2024-08-01 15:24:03 -04:00 committed by Eric Engestrom
parent 86c2d6bacd
commit 5168d629fa
2 changed files with 5 additions and 3 deletions

View file

@ -1444,7 +1444,7 @@
"description": "egl/wayland: bail on zink init in non-sw mode if extension check fails",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -2826,8 +2826,10 @@ dri2_initialize_wayland_swrast(_EGLDisplay *disp)
dri2_dpy->formats.num_formats))
goto cleanup;
if (disp->Options.Zink)
dri2_initialize_wayland_drm_extensions(dri2_dpy);
if (disp->Options.Zink) {
if (!dri2_initialize_wayland_drm_extensions(dri2_dpy) && !disp->Options.ForceSoftware)
goto cleanup;
}
dri2_dpy->driver_name = strdup(disp->Options.Zink ? "zink" : "swrast");
if (!dri2_load_driver_swrast(disp))