diff --git a/src/dxgi/dxgi_swapchain.cpp b/src/dxgi/dxgi_swapchain.cpp index 3f41df68..e7cd7651 100644 --- a/src/dxgi/dxgi_swapchain.cpp +++ b/src/dxgi/dxgi_swapchain.cpp @@ -523,6 +523,17 @@ namespace dxvk { if (!pColorSpaceSupport) return E_INVALIDARG; + // Don't expose any color spaces other than standard + // sRGB if the enableHDR option is not set. + // + // If we ever have a use for the non-SRGB non-HDR colorspaces + // some day, we may want to revisit this. + if (ColorSpace != DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 + && !m_factory->GetOptions()->enableHDR) { + *pColorSpaceSupport = 0; + return S_OK; + } + UINT support = m_presenter->CheckColorSpaceSupport(ColorSpace); *pColorSpaceSupport = support; return S_OK;