Jacek Caban (@jacek) commented about dlls/opengl32/unix_wgl.c:
- { - client->extensions[GL_EXT_memory_object_win32] = 1; - extensions[count++] = "GL_EXT_memory_object_win32"; - } - if (funcs->p_glImportSemaphoreWin32HandleEXT) - { - client->extensions[GL_EXT_semaphore_win32] = 1; - extensions[count++] = "GL_EXT_semaphore_win32"; - } - - for (i = 0; legacy_extensions[i]; i++) extensions[count++] = legacy_extensions[i]; - qsort( extensions, count, sizeof(*extensions), string_array_cmp ); - ctx->extension_array = extensions; - ctx->extension_count = count; + if (funcs->p_glImportMemoryWin32HandleEXT) client->extensions[GL_EXT_memory_object_win32] = 1; + if (funcs->p_glImportSemaphoreWin32HandleEXT) client->extensions[GL_EXT_semaphore_win32] = 1; It suffers from the same issue as other uses of funcs as a cache: wglGetProcAddress is context-specific, whereas the host GL counterparts are not. The fact that `glImportMemoryWin32HandleEXT` is supported by the loader does not mean that it is available for the current context. Technically, we should check for the corresponding extensions instead.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10019#note_130234