From 7ff5841885fa219e1339dcdbc4f4a57fdaed6e2d Mon Sep 17 00:00:00 2001 From: Steve Karolewics Date: Tue, 9 Jul 2019 21:03:52 -0700 Subject: [PATCH] Check type hint for auto fit range button in texture viewer. --- qrenderdoc/Windows/TextureViewer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qrenderdoc/Windows/TextureViewer.cpp b/qrenderdoc/Windows/TextureViewer.cpp index c366589dd..301e2313e 100644 --- a/qrenderdoc/Windows/TextureViewer.cpp +++ b/qrenderdoc/Windows/TextureViewer.cpp @@ -3277,6 +3277,10 @@ void TextureViewer::AutoFitRange() { fmt.compType = CompType::Float; } + if(fmt.compType == CompType::Typeless && m_TexDisplay.typeHint == CompType::UInt) + fmt.compType = CompType::UInt; + if(fmt.compType == CompType::Typeless && m_TexDisplay.typeHint == CompType::SInt) + fmt.compType = CompType::SInt; for(int i = 0; i < 4; i++) {