Specifying a pipeline tessellation state
Tessellation shaders are one of the optional, additional programmable shader stages that can be enabled in a graphics pipeline. But when we want to activate them, we also need to prepare a pipeline tessellation state.
How to do it...
- Create a variable of type
VkPipelineTessellationStateCreateInfo
namedtessellation_state_create_info
. Use the following to initialize its members:VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
value forsType
nullptr
value forpNext
0
value forflags
- The number of control points (vertices) which form a patch for
patchControlPoints
How it works...
To use tessellation shaders in our application, we need to enable a tessellationShader
feature during a logical device creation, we need to write a source code for both tessellation control and evaluation shaders, we need to create a shader module (or two) for them, and we also need to prepare a pipeline tessellation state represented by a variable of type VkPipelineTessellationStateCreateInfo...