From c26b2ade1d485dd80290c4acfeafcd16bd276357 Mon Sep 17 00:00:00 2001 From: Eric Sullivan Date: Tue, 23 Jul 2024 17:47:06 +0000 Subject: [PATCH] [dxvk] Update shouldSubmit to correctly handle descriptorPoolOverallocation Currently shouldSubmit will force the dxvk context to be flushed when too many descriptor pools have been allocated. This heuristic does not work when VK_NV_descriptor_pool_overallocation is in use because there will only ever be a single pool. This change updates the heuristic to use the number of allocated sets when VK_NV_descriptor_pool_overallocation is in use. --- src/dxvk/dxvk_descriptor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dxvk/dxvk_descriptor.cpp b/src/dxvk/dxvk_descriptor.cpp index 3e36aed9b..c33de22f9 100644 --- a/src/dxvk/dxvk_descriptor.cpp +++ b/src/dxvk/dxvk_descriptor.cpp @@ -72,7 +72,9 @@ namespace dxvk { // memory bloat. This may be necessary for off-screen // rendering applications, or in situations where games // pre-render a lot of images without presenting in between. - return m_descriptorPools.size() > MaxDesiredPoolCount; + return m_device->features().nvDescriptorPoolOverallocation.descriptorPoolOverallocation ? + m_setsAllocated > MaxDesiredPoolCount * m_manager->getMaxSetCount() : + m_descriptorPools.size() > MaxDesiredPoolCount; }