2 Commits
Author SHA1 Message Date
Gjon Gojcevic 4e27d8d753 fix(videoout): keep the output SDR on hosts without a monitor HDR report
A Vulkan surface can offer HDR10 formats while the display is not in
HDR (KDE Wayland with RADV lists them with the output's HDR disabled),
so on hosts other than Windows the probe now reports an SDR monitor and
HDR output stays off until an output-state signal exists. A probe test
checks that a window without a Windows monitor report reads as SDR with
an HDR10 surface.

The HDR10 present test now also changes the monitor's luminance while
presenting HDR10, and the presenter logs the HDR metadata it sets.

AI-assisted: yes
2026-10-14 08:55:18 -04:00
Gjon Gojcevic c9ba43bfb7 feat(videoout): present PQ display buffers through an HDR10 swapchain
Detect HDR output on the host: on Windows the monitor showing the window
must run in HDR10 (DXGI IDXGIOutput6), and on every host the window's
Vulkan surface must offer a 10-bit VK_COLOR_SPACE_HDR10_ST2084_EXT
swapchain with VK_EXT_swapchain_colorspace and VK_EXT_hdr_metadata. The
monitor's luminance comes from DXGI; hosts that report none get 1000
nits peak and full frame, 0 nits black.

While HDR output is available, sceVideoOutGetOutputStatus reports
dynamic range 2 and flag bit 0, sceSystemServiceGetHdrToneMapLuminance
reports the monitor's luminance, and every open port's output mode
event fires when that changes. PQ display buffers are presented
unchanged through an HDR10 swapchain with HDR metadata; any other
display buffer switches back to the SDR swapchain. Without HDR output
the PQ to SDR conversion uses the peak the title was last told as its
white level.

AI-assisted: yes
2026-10-14 02:55:21 -04:00