Commit Graph

16 Commits

Author SHA1 Message Date
Philip Rebohle 44695f9311 [dxvk] Adjust desciptor pool reset heuristic
Drastically limits the amount of descriptor memory we allocate in situations
where an application renders without presenting anything to a swap chain.

The new limit is a bit tight for some real-world use cases (e.g. Ashes of the Singularity),
but at worst we will start calling vkAllocateDescriptorSets once per set and draw.
2024-04-08 15:40:25 +02:00
Philip Rebohle 0af5ececa6 [dxvk] Also reset descriptor pool when only one pool is in use
This way we can often avoid allocating additional descriptor pools.
2023-01-20 15:23:25 +01:00
Philip Rebohle e0af668f6c
[dxvk] Use DxvkBindingLayoutObjects for set lookup directly
Avoids pointer dereferencing on a really hot code path. This is also
safe since there's a 1:1 mapping between the VkPipelineLayout and the
given ovbject type.
2022-08-16 15:35:57 +02:00
Philip Rebohle d4a3b823a2
[dxvk] Add stat counters for descriptor sets and pools 2022-06-28 14:35:58 +02:00
Philip Rebohle d4d87123b4
[dxvk] Add safety mechanism to submit large descriptor pools 2022-06-28 14:35:58 +02:00
Philip Rebohle cfc06405d2
[dxvk] Recycle Vulkan descriptor pools as well
Reduces the number of expensive reallocations when large descriptor
pools get reset and repopulated.
2022-06-28 14:35:58 +02:00
Philip Rebohle eea5c9f0da
[dxvk] Rename new descriptor pool implementation to DxvkDescriptorPool 2022-06-28 14:35:58 +02:00
Philip Rebohle 6aeed40af2
[dxvk] Remove old descriptor pool implementation 2022-06-28 14:35:58 +02:00
Philip Rebohle 9b0b1edf74
[dxvk] Introduce persistent descriptor pool 2022-06-28 14:35:57 +02:00
Philip Rebohle ab0c15ea54
[dxvk] Introduce DxvkContextType 2022-06-28 14:35:57 +02:00
Philip Rebohle 4057937d2d
[dxvk] Refactor descriptor set allocation
With this new approach, descriptor pools are decoupled from the
command list they are used with. Instead, the DXVK context takes
ownership of a single descriptor pool until it runs out of memory.

This reduces the amount of memory wasted for under-utilized pools
and should this reduce an application's memory footprint.
2018-11-27 11:42:13 +01:00
Jacek Caban b7bdd9de38 [dxvk] Include vector inheaders that use it.
Fixes winelib compilation after recent changes.
2018-07-28 15:09:31 +02:00
Philip Rebohle 2ed2d892d6 [dxvk] Optimized resource binding
Fixes a few bottlenecks that were encountered in the Cascading Shadow
Maps demo from the Microsoft SDK. Performance is now slightly better
than wined3d with CSMT, MESA_NO_ERROR and mesa_glthread enabled.
2017-12-20 12:13:08 +01:00
Philip Rebohle b5d068366d [dxvk] Implemented shader resource binding 2017-12-03 20:23:26 +01:00
Philip Rebohle a6bf7659b0 [dxvk] Refactored shader binding, client APIs must now create pipelines and pipeline layouts 2017-12-03 00:40:58 +01:00
Philip Rebohle 2c3674190a [dxvk] Implemented proper resource binding 2017-10-15 19:23:10 +02:00