Error when binding descriptor sets

Hello, newbie to vulkan here. I am stuck at the following error when calling vkCmdBindDescriptorSets,
-----------------------debug msg--------

VUID-vkCmdBindDescriptorSets-pDescriptorSets-00358(ERROR / SPEC): msgNum: 0 - descriptorSet #0 being bound is not compatible with overlapping descriptorSetLayout at index 0 of
VkPipelineLayout 0x170000000017[] due to: VkPipelineLayout 0x170000000017[]) only contains 0 setLayouts corresponding to sets 0-18446744073709551615, but you’re attempting to bind set to index 0. The Vulkan spec states: Each element of pDescriptorSets must have been allocated with a VkDescriptorSetLayout that matches (is the same as, or identically defined as) the VkDescriptorSetLayout at set n in layout, where n is the sum of firstSet and the index into pDescriptorSets (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkCmdBindDescriptorSets-pDescriptorSets-00358)

*** Objects: 1***
*** [0] 0x1f000000001f, type: 23, name: NULL***
`
--------debug msg end--------
my descriptor sets where constructed following the tutorial with layers[] = {layout,layout,layout}, where layout was created as in the tutorial (in C):

VkDescriptorSetLayoutBinding uboLayoutBinding = {};
uboLayoutBinding.binding = 0;
uboLayoutBinding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
uboLayoutBinding.descriptorCount = 1;
uboLayoutBinding.stageFlags = VK_SHADER_STAGE_VERTEX_BIT;
uboLayoutBinding.pImmutableSamplers = NULL;

VkDescriptorSetLayoutCreateInfo layoutInfo = {};
layoutInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
layoutInfo.bindingCount = 1;
layoutInfo.pBindings = &uboLayoutBinding;
vkCreateDescriptorSetLayout( device, &layoutInfo, NULL,&layout);

Any pointers you may provide me with will be appreciated. Thanks!

That error message refers to your pipeline layout. Could you add that part of your code too? Maybe you’re creating the pipeline layout with a different descriptor set laout.

Thank you Sascha, spot on!

I had the setLayoutCount member of the pipeline layout set to a different number for my own “debug” but forgot all about it.

Cheers!

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