vkd3d/libs
Conor McCarthy 2b71ea406f vkd3d: Back descriptor heaps with Vulkan descriptor sets if descriptor indexing is available.
The existing implementation using virtual descriptor heaps, where Vk
descriptor sets are created for the bindings in the root descriptor tables,
is inefficient when multiple command lists are used with large descriptor
heaps. It also cannot support updating a descriptor set after it is bound.

This patch creates Vk sets for each D3D12 heap. Because D3D12 heaps
can contain CBV, SRV and UAV descriptors in the same heap, multiple Vk sets
are needed for each heap, however the total number of populated descriptors
is never more than (heap size + UAV counter count).

A new 'virtual_heaps' config option is introduced to make the old
implementation available when needed. It's not always possible to determine
if this is necessary when the device is created.

Up to nine Vk descriptor sets may be used. It's theoretically possible to
reduce this to eight by placing immutable samplers in the push descriptor
set layout, but contradictions in earlier versions of the Vulkan spec made
driver support inconsistent. The documentation was corrected in version
1.2.203.

This patch also adds support for UAV counter descriptor arrays. It's not
practical to add this in a separate patch due to complications with
combining the old UAV counter implementation with the new descriptor heap
implementation.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47713
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47154
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-18 12:38:53 +01:00
..
vkd3d vkd3d: Back descriptor heaps with Vulkan descriptor sets if descriptor indexing is available. 2022-03-18 12:38:53 +01:00
vkd3d-common vkd3d-shader/sm1: Introduce a parser for the legacy D3D byte-code format. 2021-10-06 18:35:44 +02:00
vkd3d-shader vkd3d-shader/sm4: Recognise the msad opcode. 2022-03-14 18:31:08 +01:00
vkd3d-utils vkd3d-utils: Simplify handling of shader messages a bit. 2022-03-07 16:30:44 +01:00
.gitignore libs/vkd3d: Trace build version. 2018-06-27 22:43:49 +02:00