1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[dxgi] Only allow colorspace punting if we started in sRGB

This commit is contained in:
Joshua Ashton 2023-01-16 02:47:48 +00:00 committed by Philip Rebohle
parent 28ee6867be
commit 132bc529c3

View File

@ -72,6 +72,13 @@ namespace dxvk {
void STDMETHODCALLTYPE DxgiMonitorInfo::PuntColorSpace(DXGI_COLOR_SPACE_TYPE ColorSpace) {
// Only allow punting if we started from sRGB.
// That way we can go from sRGB -> HDR10 or HDR10 -> sRGB if we started in sRGB.
// But if we started off by advertising HDR10 to the game, don't allow us to go back.
// This mirrors the behaviour of the global Windows HDR toggle more closely.
if (DefaultColorSpace() != DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709)
return;
m_globalColorSpace = ColorSpace;
}