On Mon Feb 16 22:58:48 2026 +0000, Jacek Caban wrote:
The problem is that it's only compat mode there and you depend on it for every context (even if for core contexts, that dependency is about particular error behavior). Also, it's not always the same. IIRC, things like MESA_EXTENSION_MAX_YEAR affect only legacy API. Well this is mostly a dependency on the host GL implementation being spec compliant.
If we can't assume spec compliance there's no reason to make decisions based on spec (like using `glGetStringi` iff version is >= 3) and we should try calling both legacy and core functions just in case either one works. But then there's also not much reason to call core function if we already got an extension list from the legacy code path, which we need to call anyway to be able to decide whether to expose the legacy extension list or not. If Mesa only filters the legacy extension list with MESA_EXTENSION_MAX_YEAR, it's a GL spec violation and a Mesa bug. Making sure that this variable (and the other Mesa extension control variables) affect both the extension enumeration functions at once is actually a useful feature, and controlling only the legacy contexts isn't so useful. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10019#note_129788