What does `VkDescriptorSetLayoutBinding::descriptorCount` specify?

Having read the docs and done a little looking around I’m still unclear.

The title largely sums up the question, but to ask a more specific question:

Given a shader with a single binding and it’s binding being:

layout(binding = 0) buffer Buffer {
    uint x[];

I know that setting VkDescriptorSetLayoutBinding::descriptorCount = 1 works:

VkDescriptorSetLayoutCreateInfo descriptorSetLayoutCreateInfo = {};
    VkDescriptorSetLayoutBinding binding = {};
        binding.binding = 0;
        binding.descriptorCount = 1; 
        binding.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT;
    descriptorSetLayoutCreateInfo.bindingCount = 1;
    descriptorSetLayoutCreateInfo.pBindings = &binding;

In changing VkDescriptorSetLayoutBinding::descriptorCount to 2 or some other value, what would I need to change?

It specifies the same thing it specified in your Stack Overflow question: the number of array elements in the descriptor.

That answer got recently edited, didn’t get notification (apologies)

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.