[Bug 60492] New: winemac.drv: wglCreateContextAttribsARB fails for WGL_CONTEXT_OPENGL_NO_ERROR_ARB and for 3.2+ core profiles without the forward-compatible bit
http://bugs.winehq.org/show_bug.cgi?id=60492 Bug ID: 60492 Summary: winemac.drv: wglCreateContextAttribsARB fails for WGL_CONTEXT_OPENGL_NO_ERROR_ARB and for 3.2+ core profiles without the forward-compatible bit Product: Wine Version: 11.18 Hardware: x86-64 OS: MacOS Status: UNCONFIRMED Severity: normal Priority: P2 Component: winemac.drv Assignee: wine-bugs@list.winehq.org Reporter: alice.easterdevelops@gmail.com Target Milestone: --- **Wine:** 11.18 (Gcenx build) · **macOS:** 27.0.1, M1 **Symptom:** Idle Colony (Steam 2843640) asserts `m_glContext` (Render/Window.cpp:38) because `wglCreateContextAttribsARB(hdc, NULL, {MAJOR 3, MINOR 3, PROFILE_MASK CORE, 0x31B3 (NO_ERROR) 0})` returns NULL. Windows drivers (and winex11, which maps the attribute to GLX) accept it. Two separate refusals in `macdrv_context_create` (dlls/winemac.drv/opengl.c): 1. `WGL_CONTEXT_OPENGL_NO_ERROR_ARB` hits `default:` → "Unknown attribute", ERROR_INVALID_PARAMETER. CGL has no no-error mode; the attribute is a hint (KHR_no_error allows reporting errors anyway), so it can be accepted and ignored. 2. Once past that, "OS X only supports forward-compatible 3.2+ contexts": a 3.2–4.1 **core** profile request without WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB is refused. A macOS core context is what the app gets either way, and Windows drivers grant it; only compatibility profiles 3.2+ really can't be created. **Patch:** https://github.com/codeWonderland/neutron/blob/main/tools/wine-dxmt/winemac-... (accept/ignore 0x31B3; require the FC bit only for non-core profiles). **Repro:** `d3dprobe glcore` (https://github.com/codeWonderland/neutron/tree/main/tools/d3dprobe) creates exactly that context: "FAILED (error 87)" on stock 11.18 in 32- and 64-bit, "created" (GL 4.1 Metal) with the patch. (Related, but a compatibility shim rather than a bug: macOS core contexts reject GLSL `#version 130`/`140`, which Windows core contexts compile; Dear ImGui's OpenGL3 backend uses 130. Neutron raises them to 150 in opengl32's glShaderSource for core contexts: tools/wine-dxmt/opengl32-glsl-version.patch.) (Analysis and testing were done with AI assistance; the measurements are from my own Mac. Patches are linked for reference.) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla