From 88591c35fdf22f36ffb7fde6ca7574713cee7f25 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 8 Jul 2020 13:56:35 +0100 Subject: [PATCH] Collapse large arrays if no dynamic use information is available --- qrenderdoc/Windows/TextureViewer.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qrenderdoc/Windows/TextureViewer.cpp b/qrenderdoc/Windows/TextureViewer.cpp index ff616a269..f12353673 100644 --- a/qrenderdoc/Windows/TextureViewer.cpp +++ b/qrenderdoc/Windows/TextureViewer.cpp @@ -2336,13 +2336,10 @@ void TextureViewer::InitStageResourcePreviews(ShaderStage stage, dynamicallyUsedResCount = ResList[residx].dynamicallyUsedCount; } - const bool collapseArray = dynamicallyUsedResCount > 20; - int arrayLen = resArray != NULL ? resArray->count() : 1; - // Too many resources to draw can cause a full-OS hang. - // For now, limit the number displayed per resource array. - arrayLen = qMin(arrayLen, 8); + const bool collapseArray = + (dynamicallyUsedResCount > 20) || (dynamicallyUsedResCount == 0 && arrayLen > 8); for(int arrayIdx = 0; arrayIdx < arrayLen; arrayIdx++) {