Skip to content

22_descriptor_layout fails with VVL error and crash #354

@asuessenbach

Description

@asuessenbach

In my environment (Win11, VS 2022), 22_descriptor_layout fails to run, calling the debugCallback with the following error:

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)

Subsequently, it crashes with an Access violation reading location 0x0000000000000028 in drawIndexed.

Is that the expected behaviour? The corresponding docu 00_Descriptor_set_layout_and_buffer.adoc does not mention it.

Should that be fixed, even though it might need some parts introduced with 23_descriptor_sets?
Or should we just use the 19_shader_vertexbuffer again, instead of the 22_shader_ubo?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions