Skip to content

swapchain: refactor/add colorspace hinting API

Niklas Haas requested to merge swapchain_hint into master

Rather than only being able to set prefer_hdr on swapchain creation, this API allows updating the swapchain colorspace hint at runtime. Deprecate prefer_hdr, and also remove surface_format entirely as it was getting very much in the way of this functionality (and also made little sense apart from debugging use cases).

This allows dynamically turning on and off HDR mode, and also allows picking the best output mode depending on the content even in the absence of HDR metadata.

Currently only implemented for Vulkan, and only for drivers supporting VK_EXT_swapchain_colorspace.

Partially addresses #152 (closed)
Supersedes !163 (closed)

Edited by Niklas Haas

Merge request reports