Ensure resources viewed as sRGB with D3D12 display as sRGB

This commit is contained in:
Steve Karolewics
2020-01-07 15:40:43 -08:00
committed by Baldur Karlsson
parent 5255db7966
commit 38117e08e4
@@ -476,7 +476,9 @@ bool D3D12Replay::RenderTextureInternal(D3D12_CPU_DESCRIPTOR_HANDLE rtv, Texture
else if(IsIntFormat(resourceDesc.Format))
pixelData.OutputDisplayFormat |= TEXDISPLAY_SINT_TEX;
if(!IsSRGBFormat(resourceDesc.Format) && cfg.linearDisplayAsGamma)
// Check both the resource format and view format for sRGB
if(!IsSRGBFormat(resourceDesc.Format) && cfg.typeCast != CompType::UNormSRGB &&
cfg.linearDisplayAsGamma)
pixelData.OutputDisplayFormat |= TEXDISPLAY_GAMMA_CURVE;
Vec4u YUVDownsampleRate = {}, YUVAChannels = {};