Skip to content

Commit

Permalink
[dxvk] Update shouldSubmit to correctly handle descriptorPoolOverallo…
Browse files Browse the repository at this point in the history
…cation

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.
  • Loading branch information
esullivan-nvidia authored and doitsujin committed Jul 25, 2024
1 parent 10ab85c commit c26b2ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dxvk/dxvk_descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down

0 comments on commit c26b2ad

Please sign in to comment.