From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/win32u/opengl.c | 9 +++++++++ include/wine/opengl_driver.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/dlls/win32u/opengl.c b/dlls/win32u/opengl.c index 08ddf87dc52..66fc482965a 100644 --- a/dlls/win32u/opengl.c +++ b/dlls/win32u/opengl.c @@ -971,6 +971,7 @@ static void init_egl_devices( struct opengl_funcs *funcs ) #define LOAD_FUNCPTR( func ) \ if (!funcs->p_##func && !(funcs->p_##func = (void *)funcs->p_eglGetProcAddress( #func ))) return LOAD_FUNCPTR( eglQueryDevicesEXT ); + LOAD_FUNCPTR( eglQueryDeviceBinaryEXT ); LOAD_FUNCPTR( eglQueryDeviceStringEXT ); LOAD_FUNCPTR( eglQueryDisplayAttribEXT ); #undef LOAD_FUNCPTR @@ -1091,6 +1092,14 @@ static void init_device_info( struct egl_platform *egl, const struct opengl_func TRACE( " - device_id: %#x\n", egl->device_id ); TRACE( " - vendor_id: %#x\n", egl->vendor_id ); + if (has_extension( extensions, "EGL_EXT_device_persistent_id" )) + { + funcs->p_eglQueryDeviceBinaryEXT( egl->device, EGL_DEVICE_UUID_EXT, sizeof(egl->device_uuid), &egl->device_uuid, &count ); + funcs->p_eglQueryDeviceBinaryEXT( egl->device, EGL_DRIVER_UUID_EXT, sizeof(egl->driver_uuid), &egl->driver_uuid, &count ); + } + TRACE( " - device_uuid: %s\n", debugstr_guid(&egl->device_uuid) ); + TRACE( " - driver_uuid: %s\n", debugstr_guid(&egl->driver_uuid) ); + funcs->p_eglBindAPI( EGL_OPENGL_API ); funcs->p_eglGetConfigs( egl->display, &config, 1, &count ); if (!count) config = EGL_NO_CONFIG_KHR; diff --git a/include/wine/opengl_driver.h b/include/wine/opengl_driver.h index 77d1c818438..b62b65fe638 100644 --- a/include/wine/opengl_driver.h +++ b/include/wine/opengl_driver.h @@ -155,6 +155,8 @@ struct egl_platform UINT video_memory; const char *device_name; const char *vendor_name; + GUID device_uuid; + GUID driver_uuid; }; struct opengl_drawable_funcs -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9676