From 4ebae3da32d100a3ce3d12362a352b4e831b818e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tur=C3=A1nszki=20J=C3=A1nos?= Date: Thu, 29 Jan 2026 12:04:38 +0100 Subject: [PATCH] validation fix --- WickedEngine/wiGraphicsDevice_Vulkan.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/WickedEngine/wiGraphicsDevice_Vulkan.h b/WickedEngine/wiGraphicsDevice_Vulkan.h index c5ebac72b..27f4b74ed 100644 --- a/WickedEngine/wiGraphicsDevice_Vulkan.h +++ b/WickedEngine/wiGraphicsDevice_Vulkan.h @@ -670,11 +670,17 @@ namespace wi::graphics vulkan_check(vkCreateDescriptorSetLayout(device->device, &layoutInfo, nullptr, &descriptorSetLayout)); + VkDescriptorSetVariableDescriptorCountAllocateInfo count_allocation_info = {}; + count_allocation_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO; + count_allocation_info.descriptorSetCount = 1; + count_allocation_info.pDescriptorCounts = &descriptorCount; + VkDescriptorSetAllocateInfo allocInfo = {}; allocInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; allocInfo.descriptorPool = descriptorPool; allocInfo.descriptorSetCount = 1; allocInfo.pSetLayouts = &descriptorSetLayout; + allocInfo.pNext = &count_allocation_info; vulkan_check(vkAllocateDescriptorSets(device->device, &allocInfo, &descriptorSet)); for (int i = 0; i < (int)descriptorCount; ++i)