mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-24 06:36:08 +00:00
Don't lose forced SRGB texture remapping in D3D11/D3D12
This commit is contained in:
@@ -2121,10 +2121,10 @@ void D3D11Replay::GetTextureData(ResourceId tex, const Subresource &sub,
|
||||
{
|
||||
if(params.remap == RemapTexture::RGBA8)
|
||||
{
|
||||
desc.Format = GetTypedFormat(DXGI_FORMAT_R8G8B8A8_TYPELESS, params.typeCast);
|
||||
if((IsSRGBFormat(desc.Format) || wrapTex->m_RealDescriptor) &&
|
||||
params.typeCast == CompType::Typeless)
|
||||
desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
|
||||
desc.Format = GetTypedFormat(DXGI_FORMAT_R8G8B8A8_TYPELESS, params.typeCast);
|
||||
}
|
||||
else if(params.remap == RemapTexture::RGBA16)
|
||||
{
|
||||
|
||||
@@ -3058,9 +3058,9 @@ void D3D12Replay::GetTextureData(ResourceId tex, const Subresource &sub,
|
||||
{
|
||||
if(params.remap == RemapTexture::RGBA8)
|
||||
{
|
||||
copyDesc.Format = GetTypedFormat(DXGI_FORMAT_R8G8B8A8_TYPELESS, params.typeCast);
|
||||
if(IsSRGBFormat(copyDesc.Format) && params.typeCast == CompType::Typeless)
|
||||
copyDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM_SRGB;
|
||||
copyDesc.Format = GetTypedFormat(DXGI_FORMAT_R8G8B8A8_TYPELESS, params.typeCast);
|
||||
}
|
||||
else if(params.remap == RemapTexture::RGBA16)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user