- removed limitation on number of descriptor set layout bindings

https://forum.zdoom.org/viewtopic.php?t=70955
This commit is contained in:
alexey.lysiuk 2021-01-01 14:46:24 +02:00
parent 0dda8733db
commit 499df03821

View file

@ -144,7 +144,7 @@ public:
private: private:
VkDescriptorSetLayoutCreateInfo layoutInfo = {}; VkDescriptorSetLayoutCreateInfo layoutInfo = {};
FixedSizeVector<VkDescriptorSetLayoutBinding, 8> bindings; TArray<VkDescriptorSetLayoutBinding> bindings;
}; };
class DescriptorPoolBuilder class DescriptorPoolBuilder
@ -636,10 +636,10 @@ inline void DescriptorSetLayoutBuilder::addBinding(int index, VkDescriptorType t
binding.descriptorCount = arrayCount; binding.descriptorCount = arrayCount;
binding.stageFlags = stageFlags; binding.stageFlags = stageFlags;
binding.pImmutableSamplers = nullptr; binding.pImmutableSamplers = nullptr;
bindings.push_back(binding); bindings.Push(binding);
layoutInfo.bindingCount = (uint32_t)bindings.size(); layoutInfo.bindingCount = (uint32_t)bindings.Size();
layoutInfo.pBindings = bindings.data(); layoutInfo.pBindings = &bindings[0];
} }
inline std::unique_ptr<VulkanDescriptorSetLayout> DescriptorSetLayoutBuilder::create(VulkanDevice *device) inline std::unique_ptr<VulkanDescriptorSetLayout> DescriptorSetLayoutBuilder::create(VulkanDevice *device)