mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-17 16:50:34 +01:00
egl: fix sw fallback rejection in non-sw EGL_PLATFORM=device
previously progress could still be made during sw fallback here, which would lead to unpredictable results with driver loading e.g., crashing cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34609>
This commit is contained in:
parent
4d8146befb
commit
8a339cdebc
1 changed files with 15 additions and 10 deletions
|
|
@ -282,16 +282,21 @@ device_probe_device(_EGLDisplay *disp)
|
||||||
if (!dri2_dpy->driver_name)
|
if (!dri2_dpy->driver_name)
|
||||||
goto err_name;
|
goto err_name;
|
||||||
|
|
||||||
/* When doing software rendering, some times user still want to explicitly
|
/* this is software fallback */
|
||||||
* choose the render node device since cross node import doesn't work between
|
if (disp->Options.ForceSoftware && !request_software) {
|
||||||
* vgem/virtio_gpu yet. It would be nice to have a new EXTENSION for this.
|
/* When doing software rendering, some times user still want to explicitly
|
||||||
* For now, just fallback to kms_swrast. */
|
* choose the render node device since cross node import doesn't work between
|
||||||
if (disp->Options.ForceSoftware && !request_software &&
|
* vgem/virtio_gpu yet. It would be nice to have a new EXTENSION for this.
|
||||||
(strcmp(dri2_dpy->driver_name, "vgem") == 0 ||
|
* For now, just fallback to kms_swrast. */
|
||||||
strcmp(dri2_dpy->driver_name, "virtio_gpu") == 0)) {
|
if (strcmp(dri2_dpy->driver_name, "vgem") == 0 ||
|
||||||
free(dri2_dpy->driver_name);
|
strcmp(dri2_dpy->driver_name, "virtio_gpu") == 0) {
|
||||||
_eglLog(_EGL_WARNING, "NEEDS EXTENSION: falling back to kms_swrast");
|
free(dri2_dpy->driver_name);
|
||||||
dri2_dpy->driver_name = strdup("kms_swrast");
|
_eglLog(_EGL_WARNING, "NEEDS EXTENSION: falling back to kms_swrast");
|
||||||
|
dri2_dpy->driver_name = strdup("kms_swrast");
|
||||||
|
} else if (strcmp(dri2_dpy->driver_name, "vmwgfx")) {
|
||||||
|
/* this is software fallback; deny progress since a hardware device was requested */
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dri2_detect_swrast(disp);
|
dri2_detect_swrast(disp);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue