Class VkGraphicsPipelineCreateInfo

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VkGraphicsPipelineCreateInfo extends Struct<VkGraphicsPipelineCreateInfo> implements NativeResource
Structure specifying parameters of a newly created graphics pipeline.
Description

The parameters basePipelineHandle and basePipelineIndex are described in more detail in Pipeline Derivatives.

If any shader stage fails to compile, the compile log will be reported back to the application, and ERROR_INVALID_SHADER_NV will be generated.

Note

With VK_EXT_extended_dynamic_state3, it is possible that many of the VkGraphicsPipelineCreateInfo members above can be NULL because all their state is dynamic and therefore ignored. This is optional so the application can still use a valid pointer if it needs to set the pNext or flags fields to specify state for other extensions.

The state required for a graphics pipeline is divided into vertex input state, pre-rasterization shader state, fragment shader state, and fragment output state.

Vertex input state is defined by:

If this pipeline specifies pre-rasterization state either directly or by including it as a pipeline library and its pStages includes a vertex shader, this state must be specified to create a complete graphics pipeline.

If a pipeline includes GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT in VkGraphicsPipelineLibraryCreateInfoEXT::flags either explicitly or as a default, and either the conditions requiring this state for a complete graphics pipeline are met or this pipeline does not specify pre-rasterization state in any way, that pipeline must specify this state directly.

Pre-rasterization shader state is defined by:

This state must be specified to create a complete graphics pipeline.

If either the pNext chain includes a VkGraphicsPipelineLibraryCreateInfoEXT structure with GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT included in flags, or it is not specified and would default to include that value, this state must be specified in the pipeline.

Fragment shader state is defined by:

If a pipeline specifies pre-rasterization state either directly or by including it as a pipeline library and rasterizerDiscardEnable is set to FALSE or DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE is used, this state must be specified to create a complete graphics pipeline.

If a pipeline includes GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT in VkGraphicsPipelineLibraryCreateInfoEXT::flags either explicitly or as a default, and either the conditions requiring this state for a complete graphics pipeline are met or this pipeline does not specify pre-rasterization state in any way, that pipeline must specify this state directly.

Fragment output state is defined by:

If a pipeline specifies pre-rasterization state either directly or by including it as a pipeline library and rasterizerDiscardEnable is set to FALSE or DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE is used, this state must be specified to create a complete graphics pipeline.

If a pipeline includes GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT in VkGraphicsPipelineLibraryCreateInfoEXT::flags either explicitly or as a default, and either the conditions requiring this state for a complete graphics pipeline are met or this pipeline does not specify pre-rasterization state in any way, that pipeline must specify this state directly.

Dynamic state values set via pDynamicState must be ignored if the state they correspond to is not otherwise statically set by one of the state subsets used to create the pipeline. Additionally, setting dynamic state values must not modify whether state in a linked library is static or dynamic; this is set and unchangeable when the library is created. For example, if a pipeline only included pre-rasterization shader state, then any dynamic state value corresponding to depth or stencil testing has no effect. Any linked library that has dynamic state enabled that same dynamic state must also be enabled in all the other linked libraries to which that dynamic state applies.

A complete graphics pipeline always includes pre-rasterization shader state, with other subsets included depending on that state as specified in the above sections.

If different subsets are linked together with pipeline layouts created with PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, the final effective pipeline layout is effectively the union of the linked pipeline layouts. When binding descriptor sets for this pipeline, the pipeline layout used must be compatible with this union. This pipeline layout can be overridden when linking with PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT by providing a VkPipelineLayout that is compatible with this union other than PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT, or when linking without PIPELINE_CREATE_LINK_TIME_OPTIMIZATION_BIT_EXT by providing a VkPipelineLayout that is fully compatible with this union.

If a VkPipelineCreateFlags2CreateInfoKHR structure is present in the pNext chain, VkPipelineCreateFlags2CreateInfoKHR::flags from that structure is used instead of flags from this structure.

Valid Usage
Valid Usage (Implicit)
See Also

VkPipelineColorBlendStateCreateInfo, VkPipelineDepthStencilStateCreateInfo, VkPipelineDynamicStateCreateInfo, VkPipelineInputAssemblyStateCreateInfo, VkPipelineMultisampleStateCreateInfo, VkPipelineRasterizationStateCreateInfo, VkPipelineShaderStageCreateInfo, VkPipelineTessellationStateCreateInfo, VkPipelineVertexInputStateCreateInfo, VkPipelineViewportStateCreateInfo, CreateGraphicsPipelines

Layout


 struct VkGraphicsPipelineCreateInfo {
     VkStructureType sType();
     void const * pNext();
     VkPipelineCreateFlags flags();
     uint32_t stageCount();
     VkPipelineShaderStageCreateInfo const * pStages();
     VkPipelineVertexInputStateCreateInfo const * pVertexInputState();
     VkPipelineInputAssemblyStateCreateInfo const * pInputAssemblyState();
     VkPipelineTessellationStateCreateInfo const * pTessellationState();
     VkPipelineViewportStateCreateInfo const * pViewportState();
     VkPipelineRasterizationStateCreateInfo const * pRasterizationState();
     VkPipelineMultisampleStateCreateInfo const * pMultisampleState();
     VkPipelineDepthStencilStateCreateInfo const * pDepthStencilState();
     VkPipelineColorBlendStateCreateInfo const * pColorBlendState();
     VkPipelineDynamicStateCreateInfo const * pDynamicState();
     VkPipelineLayout layout();
     VkRenderPass renderPass();
     uint32_t subpass();
     VkPipeline basePipelineHandle();
     int32_t basePipelineIndex();
 }