1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[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.
This commit is contained in:
Eric Sullivan 2024-07-23 17:47:06 +00:00 committed by Philip Rebohle
parent 10ab85c3ba
commit c26b2ade1d

View File

@ -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;
}