From 4b9284ed8f12cc778ecf378f3f1d2d1aac99af27 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Mon, 15 Apr 2024 16:51:31 +0100 Subject: [PATCH] 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 --- qrenderdoc/Windows/PixelHistoryView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qrenderdoc/Windows/PixelHistoryView.cpp b/qrenderdoc/Windows/PixelHistoryView.cpp index 5045bc4e3..78e04d9bd 100644 --- a/qrenderdoc/Windows/PixelHistoryView.cpp +++ b/qrenderdoc/Windows/PixelHistoryView.cpp @@ -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) {