libs/vkd3d: Duplicate Vulkan descriptors for SRVs and UAVs.

Vulkan has different descriptor types for buffers and textures.
Therefore, we do not know the exact Vulkan descriptor type for D3D12 SRV
and UAV descriptors up front. This information can be extracted from
shaders when creating PSOs but creating incompatible Vulkan descriptor
set layouts for PSOs with the same root signature would introduce a lot
of complexity.

In order to preserve compatibility between resource bindings for PSOs
with the same root signature we duplicate Vulkan descriptors for SRVs
and UAVs (a buffer view and an image view descriptor). This strategy may
be reasonable for small root signatures.
This commit is contained in:
Józef Kucia
2017-08-08 17:09:35 +02:00
parent 1b02322c1d
commit 2665cbe522
4 changed files with 95 additions and 32 deletions

View File

@@ -61,6 +61,7 @@ struct vkd3d_shader_resource_binding
{
enum vkd3d_descriptor_type type;
unsigned int register_index;
bool is_buffer;
uint32_t descriptor_set;
uint32_t binding;