From 15f8657d74aedf6f671d4151fffd6ea565ee25fd Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Wed, 5 Jun 2024 00:33:10 +1000 Subject: [PATCH] vkd3d: Create a descriptor pool for static samplers when Vulkan-backed heaps are used. Static samplers may be allocated from these pools. --- libs/vkd3d/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 2bbc1705..ff3e41e6 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -2563,7 +2563,9 @@ static void device_init_descriptor_pool_sizes(struct d3d12_device *device) VKD3D_MAX_UAV_CLEAR_DESCRIPTORS_PER_TYPE); pool_sizes[1].type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE; pool_sizes[1].descriptorCount = pool_sizes[0].descriptorCount; - device->vk_pool_count = 2; + pool_sizes[2].type = VK_DESCRIPTOR_TYPE_SAMPLER; + pool_sizes[2].descriptorCount = min(limits->sampler_max_descriptors, D3D12_MAX_LIVE_STATIC_SAMPLERS); + device->vk_pool_count = 3; return; }