Bug 1667621: Disable EGL on all default colors depths but 24, r=gfx-reviewers,nical

30bit "Deep Color" is currently broken on EGL on Mesa (patch incoming).
Disable all non-standard depths for the initial EGL roleout to keep
the fallout low.

Bail out of the EGL test early as GLX does handle the 30 bit case
and maybe also works better with 16 bit and similar not officially
supported edge cases.

This fixes HW-WR and WebGL on Xorg configs with `DefaultDepth 30`.

Differential Revision: https://phabricator.services.mozilla.com/D128368
This commit is contained in:
Robert Mader 2021-10-14 10:27:10 +00:00
Родитель f73bb3f591
Коммит cc3ebf9721
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -868,6 +868,15 @@ static bool x11_egltest(int pci_count) {
}
XSetErrorHandler(x_error_handler);
// Bug 1667621: 30bit "Deep Color" is broken on EGL on Mesa (as of 2021/10).
// Disable all non-standard depths for the initial EGL roleout.
int screenCount = ScreenCount(dpy);
for (int idx = 0; idx < screenCount; idx++) {
if (DefaultDepth(dpy, idx) != 24) {
return false;
}
}
// On at least amdgpu open source driver, eglInitialize fails unless
// a valid XDisplay pointer is passed as the native display.
if (!get_egl_status(dpy, true, pci_count != 1)) {