Commit Graph

27 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 eacb8da9f7 [dxvk] Tweak descriptor pool numbers
Increases the descriptor pool size on 64-bit, but also makes
significantly better use of descriptor pool memory in situations
with very high draw counts and many UBO descriptor set updates.
2023-01-20 14:34:46 +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 9f9324c421
[dxvk] Use existing bit mask iterator for descriptor set allocation 2022-08-16 15:24:39 +02:00
Philip Rebohle a76b5693f3
[dxvk] Clean up remaining object creation code 2022-07-18 14:52:12 +02:00
Philip Rebohle 5e1569593a
[dxvk] Create full pipeline layout with INDEPENDENT_SETS_BIT
And use it to link pipelines as well as descriptor binding.
Should fix issues related to descriptors.
2022-07-09 13:41:07 +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 8dde72da06
[dxvk] Do not allocate descriptor set space for dynamic UBOs 2022-06-28 14:35:57 +02:00
Philip Rebohle d8c3002b92
[dxvk] Don't use dynamic storage buffers
Doesn't really help in pracrice, but getting rid of them reduces
the number of dynamic offsets we have to update per draw/dispatch.
2019-10-11 14:33:45 +02:00
Philip Rebohle ddde5ee6c2
[dxvk] Support combined image sampler descriptors in the backend 2019-04-03 17:40:05 +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
Philip Rebohle eb7a5da975
[dxvk] Rebalance descriptor set allocation
This should more closely reflect what applications actually use.
The basic idea here is that it is better for apps to run out of
descriptors before running out of sets and thus reduce the
overall memory footprint of the application.
2018-11-27 10:04:16 +01:00
Philip Rebohle c3470f6cbf
[dxvk] Allocate descriptor sets with dynamic descriptor support 2018-06-22 00:31:11 +02:00
Philip Rebohle 30eb43a284 [dxvk] Minor memory management tweaks 2018-01-11 19:06:58 +01:00
Philip Rebohle 32078033c6 [d3d11] Fixed UAV counter buffer binding 2018-01-11 17:12:39 +01:00
Philip Rebohle 3419d55dee [dxvk] Tweaked descriptor allocation 2018-01-09 20:04:50 +01: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 d2b676b551 [dxvk] Fixed descriptor pool leak 2017-12-20 00:16:59 +01:00
Philip Rebohle f924931d2d [general] Removed TRACE calls for now 2017-11-26 14:01:41 +01:00
Philip Rebohle 745466652c [dxvk] Removed shader resource slots for now, needs work 2017-11-18 10:42:27 +01:00
Philip Rebohle 2c3674190a [dxvk] Implemented proper resource binding 2017-10-15 19:23:10 +02:00