Collapse large arrays if no dynamic use information is available

This commit is contained in:
baldurk
2020-07-12 10:52:10 +01:00
parent 37612a426d
commit 88591c35fd
+2 -5
View File
@@ -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++)
{