Hi, I recently found time to visit Vulkan again so I started the usual way - vulkan-tutorial.com. I am using VulkanHpp and separating the code into multiple objects to use later.
After implementing both pages for "Uniform buffers", I could not run the app due to
Validation Error: [ VUID-VkGraphicsPipelineCreateInfo-layout-07991 ] Object 0: handle = 0x1e000000001e, type = VK_OBJECT_TYPE_SHADER_MODULE; Object 1: handle = 0x210000000021, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0xe2ab823d | vkCreateGraphicsPipelines(): pCreateInfos[0] Set 0 Binding 0 in shader (VK_SHADER_STAGE_VERTEX_BIT) expects at least 1 descriptors, but only 0 provided The Vulkan spec states: If a resource variables is declared in a shader as an array, a descriptor slot in layout must match the descriptor count (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-layout-07991)
I went through the code and my implementation few times but cannot find anything wrong.
I have the layout(binding = 0) uniform in vertex shader and am compiling and loading it.
The binding is:
vk::DescriptorSetLayoutBinding uboLayoutBinding(
0, // binding
vk::DescriptorType::eUniformBuffer, // descriptor type
vk::ShaderStageFlagBits::eVertex, // stage flags
{} // immutable samplers
);
I don't know where else to look.
Cannot share the code right now as there is just too much code around and I do not have time to create "minimum sample" (well, it is what I am trying to make as a whole).