From 19ef14f725980fb588ccdb22dd110a1e5fe0727c Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sat, 11 Jul 2026 20:00:09 +0100 Subject: [PATCH] Descriptor variable count explanation --- main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.cpp b/main.cpp index 6e3651e..0ac5dec 100644 --- a/main.cpp +++ b/main.cpp @@ -850,6 +850,11 @@ int main() { // Create a single binding with variable number of descriptors u32 texture_count = (u32)wapp_array_count(textures); + // VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT specifies that this is a variable-sized + // descriptor binding whose size will be specified when a descriptor set is allocated using this + // layout. The value of descriptorCount is treated as an upper bound on the size of the binding. + // This must only be used for the last binding in the descriptor set layout (i.e. the binding with + // the largest value of binding). VkDescriptorBindingFlags desc_variable_flag = VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT; VkDescriptorSetLayoutBindingFlagsCreateInfo desc_binding_flags = {};