kopper: disable color management for wayland surfaces

Otherwise clients cannot use color management themselves.

Signed-off-by: Julian Orth <ju.orth@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37693>
This commit is contained in:
Julian Orth
2025-10-03 21:03:06 +02:00
committed by Marge Bot
parent 90103fe618
commit 9fde755357
2 changed files with 5 additions and 1 deletions
@@ -47,6 +47,7 @@ EXTENSIONS = [
Extension("VK_KHR_wayland_surface"),
Extension("VK_KHR_xcb_surface"),
Extension("VK_KHR_win32_surface"),
Extension("VK_EXT_swapchain_colorspace"),
]
if platform.system() == "Darwin":
+4 -1
View File
@@ -282,7 +282,10 @@ kopper_CreateSwapchain(struct zink_screen *screen, struct kopper_displaytarget *
cswap->scci.surface = cdt->surface;
cswap->scci.flags = zink_kopper_has_srgb(cdt) ? VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR : 0;
cswap->scci.imageFormat = cdt->formats[0];
cswap->scci.imageColorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
if (cdt->type == KOPPER_WAYLAND)
cswap->scci.imageColorSpace = VK_COLOR_SPACE_PASS_THROUGH_EXT;
else
cswap->scci.imageColorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
// TODO: This is where you'd hook up stereo
cswap->scci.imageArrayLayers = 1;
cswap->scci.imageUsage = VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT |