VkGraphicsPipelineCreateInfo
expects assignment of a VkRenderPass
to .renderPass
property. I don't really understand why a pipeline must be coupled with render pass. I mean, VkGraphicsPipelineCreateInfo
doesn't directly "talks" to render pass related content, like FBOs and their attachments. I may want to use same pipeline with more than one render pass, like in case where I want to render same set of objects in different scenes, so do I have to create another one with exactly the same setup?
Just to add that creating VkPipeline
with .renderPass = nullptr
fails with validation error:
vkCreateGraphicsPipelines: required parameter pCreateInfos[0].renderPass specified as VK_NULL_HANDLE.Invalid VkRenderPass Object 0x0. The Vulkan spec states: renderPass must be a valid VkRenderPass handle (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkGraphicsPipelineCreateInfo-renderPass-parameter)
VkRenderPass
object that gets used. And as far as multisampling is concerned... well, stop doing that. Pick a sample count and stick with it. – Nicol Bolas