Descriptor variable count explanation

This commit is contained in:
2026-07-11 20:00:09 +01:00
parent 2cdfcde5a3
commit 19ef14f725
+5
View File
@@ -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 = {};