HDR Support for DRM/KMS?
AMD's libdrm driver has supported HDR for years actually, Intel and Nvidia too in theory, not sure how do implementations differ. While support for HDR in compositors like Mutter is still in progress, applications using DRM directly can have working HDR, like this MPV PR or Kodi. Gamescope can directly use DRM/KMS, so it in theory could do what MPV does too, to output HDR data. I know it would also need support in Proton too. HDR in games is an important feature, that got quite mature on Windows. Could it be considered for gamescope to experiment with support for it, standards can get more mature once other compositors implement it?
Yes, I plan to experiment with HDR support soon.
I started the work on the vkd3d side recently: https://github.com/HansKristian-Work/vkd3d-proton/pull/1227
On driver support, RADV (mesa-git) seems to be missing VK_EXT_hdr_metadata. Is this a known issue, or should I report this to the Mesa tracker?
This is not needed, as it is implemented by the Gamescope WSI layer.
It's required by mpv though correct? Nothing to do with your work of course though, so I'll leave it at that.
The Gamescope WSI layer implements VK_EXT_hdr_metadata which can be used by MPV.
MPV does work with it.
Gotcha, I meant independent of gamescope. It does work but only through my primary card (I get a black screen on the secondary) and doesn't seem to have control over resolution or refresh rate (although perhaps --generate-drm-mode would cover me there). Whereas mpv's displayvk context works for everything, except the key point of HDR support, which I assume requires that extension.
You can use eg. -O "DP-1,*" to specify a display output. You can pick a Vulkan device with --prefer-vk-device too.
The actual signal does go to my secondary gpu/display, and the display detects HDR, it just doesn't show any output, just a black screen. And it actually defaults to the secondary GPU and display, so even when forcing them through --prefer-output and --prefer-vk-device the problem persists.
However, no problem with either of my HDR supporting displays if they are connected to the primary GPU.