Creating a compute pipeline
A compute pipeline is the second type of pipeline available in the Vulkan API. It is used for dispatching compute shaders, which can perform any mathematical operations. And as the compute pipeline is much simpler than the graphics pipeline, we create it by providing far fewer parameters.
How to do it...
- Take the handle of a logical device and initialize a variable of type
VkDevice
namedlogical_device
with it. - Create a variable of a bitfield type
VkPipelineCreateFlags
namedadditional_options
. Initialize it with any combination of these additional pipeline creation options:- Disable optimization: specifies that the created pipeline won't be optimized, but the creation process may be faster
- Allow derivatives: specifies that other pipelines may be created from it
- Derivative: specifies that this pipeline will be created based on another, already created pipeline
- Create a variable of type
VkPipelineShaderStageCreateInfo
namedcompute_shader_stage
through which specify a...