Fix washed out colors in Vulkan HDR mode

This commit is contained in:
Magnus Norddahl 2022-10-10 23:56:19 +02:00 committed by Christoph Oelckers
commit 37039721bd
2 changed files with 9 additions and 14 deletions

View file

@ -250,7 +250,7 @@ void VulkanSwapChain::CreateViews()
bool VulkanSwapChain::IsHdrModeActive() const
{
return swapChainFormat.colorSpace == VK_COLOR_SPACE_HDR10_ST2084_EXT || swapChainFormat.colorSpace == VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT;
return swapChainFormat.colorSpace == VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT;
}
void VulkanSwapChain::SelectFormat()
@ -276,16 +276,6 @@ void VulkanSwapChain::SelectFormat()
return;
}
}
// For older drivers that reported the wrong colorspace
for (const auto &format : surfaceFormats)
{
if (format.format == VK_FORMAT_R16G16B16A16_SFLOAT && format.colorSpace == VK_COLOR_SPACE_HDR10_ST2084_EXT)
{
swapChainFormat = format;
return;
}
}
}
for (const auto &format : surfaceFormats)