Overv / VulkanTutorial

Tutorial for the Vulkan graphics and compute API
https://vulkan-tutorial.com
Creative Commons Attribution Share Alike 4.0 International
3.06k stars 511 forks source link

Example 22 segfaults #340

Open rwa opened 1 year ago

rwa commented 1 year ago

I have successfully compiled and run most of the examples, until I get to example 22.

Then I get: validation layer: Validation Error: [ VUID-vkCmdDrawIndexed-None-02697 ] Object 0: handle = 0x130000000013, type = VK_OBJECT_TYPE_PIPELINE; Object 1: handle = 0x120000000012, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; Object 2: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0x9888fef3 | vkCmdDrawIndexed(): VkPipeline 0x130000000013[] defined with VkPipelineLayout 0x120000000012[] is not compatible for maximum set statically used 0 with bound descriptor sets, last bound with VkPipelineLayout 0x0[] The Vulkan spec states: For each set n that is statically used by the VkPipeline bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-None-02697) validation layer: Validation Error: [ UNASSIGNED-CoreValidation-DrawState-DescriptorSetNotBound ] Object 0: handle = 0x5558ff83f1c0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xcde11083 | vkCmdDrawIndexed(): VkPipeline 0x130000000013[] uses set #0 but that set is not bound. Segmentation fault (core dumped)

I have copied and pasted the example fresh from the repo, so I'm not sure what's going on here. I tried to interpret this error message but didn't make much headway. This is on an Ubuntu linux system.

chuigda commented 9 months ago

This should be the expected behaviour. In chapater 22 the descriptor set layout get specified in the pipeline, but with actually no descriptor set provided. Chapater 23 would fix this problem.