Jacek Caban (@jacek) commented about dlls/opengl32/unix_wgl.c:
ctx->extension_count = j; }
- if (TRACE_ON(opengl)) for (i = 0; i < count; i++) TRACE( "++ %s\n", extensions[i] ); + dump_extensions( "Client", client->extensions ); + + ptr = client->compat_extensions; + for (enum opengl_extension *ext = parsed_extensions; *ext != GL_EXTENSION_COUNT; ext++) + if (client->extensions[*ext]) *ptr++ = *ext; + *ptr = GL_EXTENSION_COUNT;
Here, you use `glGetStringi` ordering for newer contexts and then later reinterpret it as legacy string ordering. Those sortings are different on real drivers. To me, postponing construction of the legacy string until it is first queried seems like the simplest way to handle this. That said, the idea of storing those indices in the context for `glGetStringi` is interesting. It would be nice to avoid having that loop there. Maybe we could repurpose `compat_extensions` for that purpose? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10019#note_129235