Creating a graphics pipeline
Once all the required states and pipeline properties have been gathered and instantiated, creating a graphics pipeline in Vulkan is a straightforward process. This involves populating the VkGraphicsPipelineCreateInfo
structure and calling vkCreateGraphicsPipelines
.
In this recipe, you will learn how to create a graphics pipeline object in Vulkan.
Getting ready
For more information, please refer to the constructor of the VulkanCore::Pipeline
class in the repository.
How to do it…
Populating the structures referenced by VkGraphicsPipelineCreateInfo
is not complicated, but a tedious task.
- Once all structures of all states have been instantiated, all we need to do is create an instance of
VkGraphicsPipelineCreateInfo
and callvkCreateGraphicsPipelines
:const VkGraphicsPipelineCreateInfo pipelineInfo = { .sType=VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, .stageCount = uint32_t...