PixelHistory UI: improve detection of depth targets

Use the same logic as TextureViewer to determine if the target is a depth target
Fixes issue of pixel history on typeless target cast to UNORM and used as depth i.e. shadow map
This commit is contained in:
Jake Turner
2024-04-15 16:51:31 +01:00
parent ade34bb59d
commit 4b9284ed8f
+2 -2
View File
@@ -58,8 +58,8 @@ public:
m_IsSint = (compType == CompType::SInt);
m_IsFloat = (!m_IsUint && !m_IsSint);
if(compType == CompType::Depth)
m_IsDepth = true;
m_IsDepth =
(m_Tex->creationFlags & TextureCategory::DepthTarget) || (compType == CompType::Depth);
switch(m_Tex->format.type)
{