[Bug 59587] New: win32u: Native Vulkan float16 swapchains not implicitly treated as scRGB
http://bugs.winehq.org/show_bug.cgi?id=59587 Bug ID: 59587 Summary: win32u: Native Vulkan float16 swapchains not implicitly treated as scRGB Product: Wine Version: 11.5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: win32u Assignee: wine-bugs@list.winehq.org Reporter: cwooperm@gmail.com Distribution: --- Native Vulkan games that create swapchains with VK_FORMAT_R16G16B16A16_SFLOAT and VK_COLOR_SPACE_SRGB_NONLINEAR_KHR expect Windows DWM behavior where this combination is implicitly treated as scRGB (linear Rec.709 with extended range). On Linux, some compositors take the sRGB tag literally (e.g., Mutter), resulting in blown-out oversaturated colors. Microsoft documents this behavior explicitly: https://learn.microsoft.com/en-us/windows/win32/direct3darticles/high-dynami... "By default, a swap chain created with a floating point pixel format is treated as if it uses the DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 color space." DXVK already handles this for D3D11 games by remapping the color space in PR #3911: https://github.com/doitsujin/dxvk/pull/3911 However, games using native Vulkan renderers (e.g. Hunt: Showdown / CryEngine) bypass DXVK entirely and go through win32u's Vulkan layer, which does not perform this remapping. Affected game: Hunt: Showdown 1896 (AppID 594650, CryEngine native Vulkan renderer) The game creates swapchains with: - imageFormat = VK_FORMAT_R16G16B16A16_SFLOAT (97) - imageColorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR (0) With HDR enabled, this results in completely oversaturated/blown-out colors because the compositor interprets the HDR pixel values (> 1.0) as sRGB. I tested a prototype fix in win32u_vkCreateSwapchainKHR that remaps SRGB_NONLINEAR to EXTENDED_SRGB_LINEAR when the format is R16G16B16A16_SFLOAT (mirroring DXVK). This fixes the oversaturation and produces correct colors and contrast. Full tone mapping of highlights depends on compositor scRGB support (KDE KWin supports this, GNOME Mutter does not yet). Tested on: Fedora 44, Linux 6.19, GNOME 50, Mesa 26.0.3, AMD RX 9070 XT. -- 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