Skip to content

Fix the missed setting of DescriptorSetLayout in chapter 24/25/26#360

Open
vbtang wants to merge 1 commit intoKhronosGroup:mainfrom
vbtang:FixMissingDescriptorSetLayout
Open

Fix the missed setting of DescriptorSetLayout in chapter 24/25/26#360
vbtang wants to merge 1 commit intoKhronosGroup:mainfrom
vbtang:FixMissingDescriptorSetLayout

Conversation

@vbtang
Copy link
Copy Markdown

@vbtang vbtang commented Apr 27, 2026

While I'm learning the tutorial of vulkan by running the samples one by one, I found some settings of DescriptorSetLayouts are missed. So these samples crashed and printed following logs in the console when I try to run them. And It seems that Chapters 22 and 23 also require the same fix?

validation layer: type { Validation } msg: vkCreateGraphicsPipelines(): pCreateInfos[0].pStages[0] SPIR-V (VK_SHADER_STAGE_VERTEX_BIT) uses descriptor [Set 0, Binding 0, variable "ubo"] but the binding was not declared in the VkPipelineLayoutCreateInfo::pSetLayouts[0].
Possible VkDescriptorType that could be used are: VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC or VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER.
The Vulkan spec states: If a resource variable is declared in a shader and layout is not VK_NULL_HANDLE, the corresponding descriptor set in layout must match the shader stage (https://docs.vulkan.org/spec/latest/chapters/pipelines.html#VUID-VkGraphicsPipelineCreateInfo-layout-07988)
validation layer: type { Validation } msg: vkCmdBindDescriptorSets(): firstSet (0) plus descriptorSetCount (1) is greater than VkPipelineLayoutCreateInfo::setLayoutCount (0) when pipeline layout was created.
The Vulkan spec states: The sum of firstSet and descriptorSetCount must be less than or equal to VkPipelineLayoutCreateInfo::setLayoutCount provided when layout was created (https://docs.vulkan.org/spec/latest/chapters/descriptorsets.html#VUID-vkCmdBindDescriptorSets-firstSet-00360)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant