KhronosGroup / KhronosGroup/Vulkan-Docs

Color management on the Vulkan Wayland platform

Open
#2,307 6 comments 6 reactions 1 assignee Claimed by @linyaa-kiwi View on GitHub
System Integration
Dominant language
JavaScript
Stars
3.3k
Forks
549
Avg merge
5d 5h
Merged PRs (30d)
2

Description

We are developing [a color-management Wayland protocol extension](https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/14), and expect Vulkan WSI implementations to use it on behalf of the application, because Vulkan already defines the extensions to do so. We need to [define the rules](https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/14#note_2276149) how that works in `VK_KHR_wayland_surface`.

The main driver of color-management information is `VkColorSpaceKHR` enumeration. Other Vulkan extension may add more, e.g. `VK_EXT_hdr_metadata`. These values shall be converted into Wayland color-management extension protocol by a WSI.

We need to define how exactly the protocol values are derived from Vulkan values. We also need to define when Vulkan WSI shall not instantiate a `wp_color_management_surface_v1` for a `wl_surface`. The latter is needed to allow applications drive color-management protocol themselves, because the protocol allows things not exposed in Vulkan API. The use of ICC profile files is one such feature.

Presumably `VK_COLOR_SPACE_PASS_THROUGH_EXT` would be the value to guarantee that no `wp_color_management_surface_v1` is created.

How to handle `VK_COLOR_SPACE_SRGB_NONLINEAR_KHR` is an open question. There are two possibilities:
- Define that color-management communicates explicit sRGB primaries, white point, SDR, and transfer function.
- Define that no `wp_color_management_surface_v1` is created, leaving the Wayland image description unspecified.

By Vulkan definition, `VK_COLOR_SPACE_SRGB_NONLINEAR_KHR` is sRGB. However, window systems have probably relayed such pixel data as-is to all (SDR) displays, meaning that its presentation may not have been sRGB. If its presentation is now changed to sRGB, it might appear visually different. On the other hand, if no image description is set for `VK_COLOR_SPACE_SRGB_NONLINEAR_KHR`, Wayland compositors may continue presenting the content like they always have, or the presentation may differ from previous, and the presentation may differ from content that is explicitly sRGB. All this is up to the policy of each Wayland compositor implementation, what their users want.

We need to document how Vulkan WSI must use Wayland color-management extension.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.