mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
kdrive/fbdev/fb_glamor.c: Check for egl extensions properly
See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14715 Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
committed by
Enrico Weigelt
parent
1f89bcfbdc
commit
49800f024d
@@ -145,8 +145,9 @@ fbdev_glamor_query_devices_ext(EGLDeviceEXT **devices, EGLint *num_devices)
|
||||
*devices = NULL;
|
||||
*num_devices = 0;
|
||||
|
||||
if (!epoxy_has_egl_extension(NULL, "EGL_EXT_device_query") ||
|
||||
!epoxy_has_egl_extension(NULL, "EGL_EXT_device_enumeration")) {
|
||||
if (!epoxy_has_egl_extension(NULL, "EGL_EXT_device_base") &&
|
||||
!(epoxy_has_egl_extension(NULL, "EGL_EXT_device_query") &&
|
||||
epoxy_has_egl_extension(NULL, "EGL_EXT_device_enumeration"))) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -195,7 +196,9 @@ fbdev_glamor_egl_device_matches_config(EGLDeviceEXT device, int strict)
|
||||
#define EGL_DRIVER_NAME_EXT 0x335E
|
||||
#endif
|
||||
|
||||
const char *driver_name = eglQueryDeviceStringEXT(device, EGL_DRIVER_NAME_EXT);
|
||||
const char *dev_ext = eglQueryDeviceStringEXT(device, EGL_EXTENSIONS);
|
||||
const char *driver_name = (dev_ext && strstr(dev_ext, "EGL_EXT_device_persistent_id")) ?
|
||||
eglQueryDeviceStringEXT(device, EGL_DRIVER_NAME_EXT) : NULL;
|
||||
if (!driver_name) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user