mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 13:00:32 +00:00
Account for format-based checks when displaying casted typeless textures
This commit is contained in:
@@ -57,7 +57,7 @@ struct TextureShaderDetails
|
||||
{
|
||||
TextureShaderDetails()
|
||||
{
|
||||
texFmt = DXGI_FORMAT_UNKNOWN;
|
||||
texFmt = srvFormat = DXGI_FORMAT_UNKNOWN;
|
||||
texWidth = 0;
|
||||
texHeight = 0;
|
||||
texDepth = 0;
|
||||
@@ -75,7 +75,7 @@ struct TextureShaderDetails
|
||||
RDCEraseEl(srv);
|
||||
}
|
||||
|
||||
DXGI_FORMAT texFmt;
|
||||
DXGI_FORMAT texFmt, srvFormat;
|
||||
UINT texWidth;
|
||||
UINT texHeight;
|
||||
UINT texDepth;
|
||||
|
||||
@@ -151,7 +151,8 @@ TextureShaderDetails D3D11DebugManager::GetShaderDetails(ResourceId id, CompType
|
||||
details.texType = eTexType_2DMS;
|
||||
}
|
||||
|
||||
if(mode == TEXDISPLAY_DEPTH_TARGET || IsDepthFormat(details.texFmt))
|
||||
if(mode == TEXDISPLAY_DEPTH_TARGET || IsDepthFormat(details.texFmt) ||
|
||||
IsDepthFormat(GetTypedFormat(details.texFmt, typeHint)))
|
||||
{
|
||||
details.texType = eTexType_Depth;
|
||||
details.texFmt = GetTypedFormat(details.texFmt, typeHint);
|
||||
@@ -390,6 +391,7 @@ TextureShaderDetails D3D11DebugManager::GetShaderDetails(ResourceId id, CompType
|
||||
RDCERR("Failed to create cache SRV 0, type %d HRESULT: %s", details.texType, ToStr(hr).c_str());
|
||||
}
|
||||
|
||||
details.srvFormat = srvFormat;
|
||||
details.srv[details.texType] = cache.srv[0];
|
||||
|
||||
if(IsYUVFormat(srvFormat))
|
||||
@@ -759,7 +761,7 @@ bool D3D11Replay::RenderTextureInternal(TextureDisplay cfg, bool blendAlpha)
|
||||
pixelData.OutputDisplayFormat |= TEXDISPLAY_SINT_TEX;
|
||||
srvOffset = 20;
|
||||
}
|
||||
if(!IsSRGBFormat(details.texFmt) && cfg.linearDisplayAsGamma)
|
||||
if(!IsSRGBFormat(details.texFmt) && !IsSRGBFormat(details.srvFormat) && cfg.linearDisplayAsGamma)
|
||||
{
|
||||
pixelData.OutputDisplayFormat |= TEXDISPLAY_GAMMA_CURVE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user