Wayland+Vulkan: missing surface format VK_FORMAT_B8G8R8A8_SRGB

When connected to a Wayland server (such as a wlroots-based compositor) it appears that the surface format VK_FORMAT_B8G8R8A8_SRGB is not advertised as one of the available swapchain formats.

The net effect of this is that some clients will refuse to work, and others may fall back to the first (and only) available format of VK_FORMAT_B8G8R8A8_UNORM. When this happens, the window contents are much darker than they should be because the compositor is still expecting the pixels to be in a non-linear sRGB color space.

This can be confirmed by running vulkaninfo and observing that VK_FORMAT_B8G8R8A8_UNORM is the only available surface format for surface type VK_KHR_wayland_surface. By contrast, X11 surfaces advertise both formats. This was tested with driver version 530.41.03.

I was wondering if there were any plans to add support for VK_FORMAT_B8G8R8A8_SRGB to the driver for Wayland surfaces.

Thank you!

1 Like

Can confirm that this is still busted…for me it returns VK_FORMAT_B8G8R8A8_UNORM as the format and VK_COLOR_SPACE_SRGB_NONLINEAR_KHR as the color space which an odd pairing.