http://bugs.winehq.org/show_bug.cgi?id=59436 Bug ID: 59436 Summary: Wayland/EGL: Washed-out colors caused by double sRGB conversion on default framebuffer (GL_FRAMEBUFFER_SRGB) Product: Wine Version: 11.3 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winewayland Assignee: wine-bugs@list.winehq.org Reporter: tpaniaki@protonmail.com Distribution: --- Created attachment 80417 --> http://bugs.winehq.org/attachment.cgi?id=80417 Patch Fixes https://bugs.winehq.org/show_bug.cgi?id=59073 Summary When running Wine with the Wayland driver (winewayland.drv) using EGL, colors may appear washed out / desaturated in OpenGL applications. The issue is caused by GL_FRAMEBUFFER_SRGB remaining enabled while rendering to the default framebuffer (FBO 0), leading to a double gamma/sRGB conversion in some Wayland/EGL pipelines. Disabling GL_FRAMEBUFFER_SRGB only when rendering to the default framebuffer fixes the color output. Environment Wine: wine-git (tested on 11.x, reproducible on current master) Backend: winewayland.drv (Wayland native, not XWayland) GPU: AMD (Mesa) Compositor: wlroots-based (qtile Wayland) EGL backend in use Application tested: Roon (Chromium/CEF-based UI, OpenGL rendering) Observed behavior Colors appear faded / washed out Gamma looks incorrect (as if double sRGB conversion occurs) Issue only occurs under Wayland/EGL Colors are correct: Under X11/XWayland Or if GL_FRAMEBUFFER_SRGB is manually disabled for FBO 0 Root cause hypothesis Some Wayland/EGL compositors already perform colorspace handling for the window surface. If GL_FRAMEBUFFER_SRGB remains enabled when rendering to the default framebuffer, the pipeline applies sRGB conversion twice: App → GL_FRAMEBUFFER_SRGB → EGL/Compositor colorspace → Display This results in desaturated output. Minimal fix Disable GL_FRAMEBUFFER_SRGB only when binding the default framebuffer (FBO 0), while preserving the application's requested sRGB state for non-default FBOs. Example patch (conceptual) Inside framebuffer binding path: if (!framebuffer && gl_info->supported[ARB_FRAMEBUFFER_SRGB]) { TRACE("glBindFramebuffer disabling GL_FRAMEBUFFER_SRGB on default framebuffer\n"); glDisable(GL_FRAMEBUFFER_SRGB); } else if (framebuffer && app_framebuffer_srgb_enabled) { TRACE("glBindFramebuffer restoring GL_FRAMEBUFFER_SRGB on non-default framebuffer\n"); glEnable(GL_FRAMEBUFFER_SRGB); } Results Colors become correct under Wayland/EGL No regression observed in tested OpenGL apps Behavior matches X11 output sRGB still works correctly for offscreen FBO rendering -- 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.