C Specification

The VkGraphicsPipelineCreateInfo structure is defined as:

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

Members

  • sType is a VkStructureType value identifying this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

  • flags is a bitmask of VkPipelineCreateFlagBits specifying how the pipeline will be generated.

  • stageCount is the number of entries in the pStages array.

  • pStages is a pointer to an array of stageCount VkPipelineShaderStageCreateInfo structures describing the set of the shader stages to be included in the graphics pipeline.

  • pVertexInputState is a pointer to a VkPipelineVertexInputStateCreateInfo structure. It can be NULL if the pipeline is created with the VK_DYNAMIC_STATE_VERTEX_INPUT_EXT dynamic state set.

  • pInputAssemblyState is a pointer to a VkPipelineInputAssemblyStateCreateInfo structure which determines input assembly behavior for vertex shading, as described in Drawing Commands.

  • pTessellationState is a pointer to a VkPipelineTessellationStateCreateInfo structure defining tessellation state used by tessellation shaders. It can be NULL if the pipeline is created with the VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT dynamic state set.

  • pViewportState is a pointer to a VkPipelineViewportStateCreateInfo structure defining viewport state used when rasterization is enabled.

  • pRasterizationState is a pointer to a VkPipelineRasterizationStateCreateInfo structure defining rasterization state.

  • pMultisampleState is a pointer to a VkPipelineMultisampleStateCreateInfo structure defining multisample state used when rasterization is enabled.

  • pDepthStencilState is a pointer to a VkPipelineDepthStencilStateCreateInfo structure defining depth/stencil state used when rasterization is enabled for depth or stencil attachments accessed during rendering.

  • pColorBlendState is a pointer to a VkPipelineColorBlendStateCreateInfo structure defining color blend state used when rasterization is enabled for any color attachments accessed during rendering.

  • pDynamicState is a pointer to a VkPipelineDynamicStateCreateInfo structure defining which properties of the pipeline state object are dynamic and can be changed independently of the pipeline state. This can be NULL, which means no state in the pipeline is considered dynamic.

  • layout is the description of binding locations used by both the pipeline and descriptor sets used with the pipeline.

  • renderPass is a handle to a render pass object describing the environment in which the pipeline will be used. The pipeline must only be used with a render pass instance compatible with the one provided. See Render Pass Compatibility for more information.

  • subpass is the index of the subpass in the render pass where this pipeline will be used.

  • basePipelineHandle is a pipeline to derive from. This is not used in Vulkan SC https://registry.khronos.org/vulkansc/specs/1.0-extensions/html/vkspec.html#SCID-8.

  • basePipelineIndex is an index into the pCreateInfos parameter to use as a pipeline to derive from. This is not used in Vulkan SC https://registry.khronos.org/vulkansc/specs/1.0-extensions/html/vkspec.html#SCID-8.

Description

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

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

Vertex input state is defined by:

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

Pre-Rasterization Shader State

Pre-rasterization shader state is defined by:

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

Fragment Shader State

Fragment shader state is defined by:

If rasterizerDiscardEnable is set to VK_FALSE or VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE is used, this state must be specified to create a complete graphics pipeline.

Fragment Output State

Fragment output state is defined by:

If rasterizerDiscardEnable is set to VK_FALSE or VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE is used, this state must be specified to create a complete graphics pipeline.

Dynamic State

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. 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.

Complete Graphics Pipelines

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

In Vulkan SC, the pipeline compilation process occurs offline and the pStages are not needed at runtime and may be omitted. If omitted, stageCount must be set to 0 and pStages must be NULL. If provided, the values must match the values specified to the offline compiler.

Valid Usage
  • VUID-VkGraphicsPipelineCreateInfo-basePipelineHandle-05024
    basePipelineHandle must be VK_NULL_HANDLE

  • VUID-VkGraphicsPipelineCreateInfo-basePipelineIndex-05025
    basePipelineIndex must be zero

  • VUID-VkGraphicsPipelineCreateInfo-layout-07987
    If a push constant block is declared in a shader, a push constant range in layout must match both the shader stage and range

  • VUID-VkGraphicsPipelineCreateInfo-layout-07988
    If a resource variables is declared in a shader, a descriptor slot in layout must match the shader stage

  • VUID-VkGraphicsPipelineCreateInfo-layout-07990
    If a resource variables is declared in a shader, a descriptor slot in layout must match the descriptor type

  • VUID-VkGraphicsPipelineCreateInfo-layout-07991
    If a resource variables is declared in a shader as an array, a descriptor slot in layout must match the descriptor count

  • VUID-VkGraphicsPipelineCreateInfo-stage-02096
    If the pipeline requires pre-rasterization shader state the stage member of one element of pStages must be VK_SHADER_STAGE_VERTEX_BIT

  • VUID-VkGraphicsPipelineCreateInfo-pStages-00729
    If the pipeline requires pre-rasterization shader state and pStages includes a tessellation control shader stage, it must include a tessellation evaluation shader stage

  • VUID-VkGraphicsPipelineCreateInfo-pStages-00730
    If the pipeline requires pre-rasterization shader state and pStages includes a tessellation evaluation shader stage, it must include a tessellation control shader stage

  • VUID-VkGraphicsPipelineCreateInfo-pStages-09022
    If the pipeline requires pre-rasterization shader state and pStages includes a tessellation control shader stage, pTessellationState must be a valid pointer to a valid VkPipelineTessellationStateCreateInfo structure

  • VUID-VkGraphicsPipelineCreateInfo-pStages-00732
    If the pipeline requires pre-rasterization shader state and pStages includes tessellation shader stages, the shader code of at least one stage must contain an OpExecutionMode instruction specifying the type of subdivision in the pipeline

  • VUID-VkGraphicsPipelineCreateInfo-pStages-00733
    If the pipeline requires pre-rasterization shader state and pStages includes tessellation shader stages, and the shader code of both stages contain an OpExecutionMode instruction specifying the type of subdivision in the pipeline, they must both specify the same subdivision mode

  • VUID-VkGraphicsPipelineCreateInfo-pStages-00734
    If the pipeline requires pre-rasterization shader state and pStages includes tessellation shader stages, the shader code of at least one stage must contain an OpExecutionMode instruction specifying the output patch size in the pipeline

  • VUID-VkGraphicsPipelineCreateInfo-pStages-00735
    If the pipeline requires pre-rasterization shader state and pStages includes tessellation shader stages, and the shader code of both contain an OpExecutionMode instruction specifying the out patch size in the pipeline, they must both specify the same patch size

  • VUID-VkGraphicsPipelineCreateInfo-pStages-08888
    If the pipeline is being created with pre-rasterization shader state and vertex input state and pStages includes tessellation shader stages, the topology member of pInputAssembly must be VK_PRIMITIVE_TOPOLOGY_PATCH_LIST

  • VUID-VkGraphicsPipelineCreateInfo-topology-08889
    If the pipeline is being created with pre-rasterization shader state and vertex input state and the topology member of pInputAssembly is VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, then pStages must include tessellation shader stages

  • VUID-VkGraphicsPipelineCreateInfo-TessellationEvaluation-07723
    If the pipeline is being created with a TessellationEvaluation Execution Model, no Geometry Execution Model, uses the PointMode Execution Mode, and shaderTessellationAndGeometryPointSize is enabled, a PointSize decorated variable must be written to

  • VUID-VkGraphicsPipelineCreateInfo-topology-08773
    If the pipeline is being created with a Vertex Execution Model and no TessellationEvaluation or Geometry Execution Model, and the topology member of pInputAssembly is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, a PointSize decorated variable must be written to

  • VUID-VkGraphicsPipelineCreateInfo-TessellationEvaluation-07724
    If the pipeline is being created with a TessellationEvaluation Execution Model, no Geometry Execution Model, uses the PointMode Execution Mode, and shaderTessellationAndGeometryPointSize is not enabled, a PointSize decorated variable must not be written to

  • VUID-VkGraphicsPipelineCreateInfo-shaderTessellationAndGeometryPointSize-08776
    If the pipeline is being created with a Geometry Execution Model, uses the OutputPoints Execution Mode, and shaderTessellationAndGeometryPointSize is enabled, a PointSize decorated variable must be written to for every vertex emitted

  • VUID-VkGraphicsPipelineCreateInfo-Geometry-07726
    If the pipeline is being created with a Geometry Execution Model, uses the OutputPoints Execution Mode, and shaderTessellationAndGeometryPointSize is not enabled, a PointSize decorated variable must not be written to

  • VUID-VkGraphicsPipelineCreateInfo-pStages-00738
    If the pipeline requires pre-rasterization shader state and pStages includes a geometry shader stage, and does not include any tessellation shader stages, its shader code must contain an OpExecutionMode instruction specifying an input primitive type that is compatible with the primitive topology specified in pInputAssembly

  • VUID-VkGraphicsPipelineCreateInfo-pStages-00739
    If the pipeline requires pre-rasterization shader state and pStages includes a geometry shader stage, and also includes tessellation shader stages, its shader code must contain an OpExecutionMode instruction specifying an input primitive type that is compatible with the primitive topology that is output by the tessellation stages

  • VUID-VkGraphicsPipelineCreateInfo-pStages-00740
    If the pipeline requires pre-rasterization shader state and fragment shader state, it includes both a fragment shader and a geometry shader, and the fragment shader code reads from an input variable that is decorated with PrimitiveId, then the geometry shader code must write to a matching output variable, decorated with PrimitiveId, in all execution paths

  • VUID-VkGraphicsPipelineCreateInfo-renderPass-06038
    If renderPass is not VK_NULL_HANDLE and the pipeline is being created with fragment shader state the fragment shader must not read from any input attachment that is defined as VK_ATTACHMENT_UNUSED in subpass

  • VUID-VkGraphicsPipelineCreateInfo-pStages-00742
    If the pipeline requires pre-rasterization shader state and multiple pre-rasterization shader stages are included in pStages, the shader code for the entry points identified by those pStages and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter

  • VUID-VkGraphicsPipelineCreateInfo-None-04889
    If the pipeline requires pre-rasterization shader state and fragment shader state, the fragment shader and last pre-rasterization shader stage and any relevant state must adhere to the pipeline linking rules described in the Shader Interfaces chapter

  • VUID-VkGraphicsPipelineCreateInfo-renderPass-06041
    If renderPass is not VK_NULL_HANDLE, and the pipeline is being created with fragment output interface state, then for each color attachment in the subpass, if the potential format features of the format of the corresponding attachment description do not contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then the blendEnable member of the corresponding element of the pAttachments member of pColorBlendState must be VK_FALSE

  • VUID-VkGraphicsPipelineCreateInfo-renderPass-07609
    If renderPass is not VK_NULL_HANDLE, and the pipeline is being created with fragment output interface state, and the pColorBlendState pointer is not NULL, and the subpass uses color attachments, the attachmentCount member of pColorBlendState must be equal to the colorAttachmentCount used to create subpass

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04130
    If the pipeline requires pre-rasterization shader state, and pViewportState->pViewports is not dynamic, then pViewportState->pViewports must be a valid pointer to an array of pViewportState->viewportCount valid VkViewport structures

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04131
    If the pipeline requires pre-rasterization shader state, and pViewportState->pScissors is not dynamic, then pViewportState->pScissors must be a valid pointer to an array of pViewportState->scissorCount VkRect2D structures

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749
    If the pipeline requires pre-rasterization shader state, and the wideLines feature is not enabled, and no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_LINE_WIDTH, the lineWidth member of pRasterizationState must be 1.0

  • VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-09024
    If the pipeline requires pre-rasterization shader state, and the VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE dynamic state is enabled or the rasterizerDiscardEnable member of pRasterizationState is VK_FALSE, pViewportState must be a valid pointer to a valid VkPipelineViewportStateCreateInfo structure

  • VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-09026
    If the pipeline requires fragment output interface state, pMultisampleState must be a valid pointer to a valid VkPipelineMultisampleStateCreateInfo structure

  • VUID-VkGraphicsPipelineCreateInfo-pMultisampleState-09027
    If pMultisampleState is not NULL is must be a valid pointer to a valid VkPipelineMultisampleStateCreateInfo structure

  • VUID-VkGraphicsPipelineCreateInfo-alphaToCoverageEnable-08891
    If the pipeline is being created with fragment shader state, the VkPipelineMultisampleStateCreateInfo::alphaToCoverageEnable is not ignored and is VK_TRUE, then the Fragment Output Interface must contain a variable for the alpha Component word in Location 0 at Index 0

  • VUID-VkGraphicsPipelineCreateInfo-renderPass-09028
    If renderPass is not VK_NULL_HANDLE, the pipeline is being created with fragment shader state, and subpass uses a depth/stencil attachment, and pDepthStencilState must be a valid pointer to a valid VkPipelineDepthStencilStateCreateInfo structure

  • VUID-VkGraphicsPipelineCreateInfo-pDepthStencilState-09029
    If pDepthStencilState is not NULL it must be a valid pointer to a valid VkPipelineDepthStencilStateCreateInfo structure

  • VUID-VkGraphicsPipelineCreateInfo-renderPass-09030
    If renderPass is not VK_NULL_HANDLE, the pipeline is being created with fragment output interface state, and subpass uses color attachments, pColorBlendState must be a valid pointer to a valid VkPipelineColorBlendStateCreateInfo structure

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754
    If the pipeline requires pre-rasterization shader state, the depthBiasClamp feature is not enabled, no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DEPTH_BIAS, and the depthBiasEnable member of pRasterizationState is VK_TRUE, the depthBiasClamp member of pRasterizationState must be 0.0

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-02510
    If the pipeline requires fragment shader state, the VK_EXT_depth_range_unrestricted extension is not enabled and no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DEPTH_BOUNDS, and the depthBoundsTestEnable member of pDepthStencilState is VK_TRUE, the minDepthBounds and maxDepthBounds members of pDepthStencilState must be between 0.0 and 1.0, inclusive

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07610
    If the pipeline requires fragment shader state or fragment output interface state, and rasterizationSamples and sampleLocationsInfo are not dynamic, and VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable included in the pNext chain of pMultisampleState is VK_TRUE, sampleLocationsInfo.sampleLocationGridSize.width must evenly divide VkMultisamplePropertiesEXT::sampleLocationGridSize.width as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a samples parameter equaling rasterizationSamples

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07611
    If the pipeline requires fragment shader state or fragment output interface state, and rasterizationSamples and sampleLocationsInfo are not dynamic, and VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable the included in the pNext chain of pMultisampleState is VK_TRUE or VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT is used, sampleLocationsInfo.sampleLocationGridSize.height must evenly divide VkMultisamplePropertiesEXT::sampleLocationGridSize.height as returned by vkGetPhysicalDeviceMultisamplePropertiesEXT with a samples parameter equaling rasterizationSamples

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07612
    If the pipeline requires fragment shader state or fragment output interface state, and rasterizationSamples and sampleLocationsInfo are not dynamic, and VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable included in the pNext chain of pMultisampleState is VK_TRUE or VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_ENABLE_EXT is used, sampleLocationsInfo.sampleLocationsPerPixel must equal rasterizationSamples

  • VUID-VkGraphicsPipelineCreateInfo-sampleLocationsEnable-01524
    If the pipeline requires fragment shader state, and the sampleLocationsEnable member of a VkPipelineSampleLocationsStateCreateInfoEXT structure included in the pNext chain of pMultisampleState is VK_TRUE, the fragment shader code must not statically use the extended instruction InterpolateAtSample

  • VUID-VkGraphicsPipelineCreateInfo-subpass-00758
    If the pipeline requires fragment output interface state, rasterizationSamples is not dynamic, and subpass does not use any color and/or depth/stencil attachments, then the rasterizationSamples member of pMultisampleState must follow the rules for a zero-attachment subpass

  • VUID-VkGraphicsPipelineCreateInfo-renderPass-06046
    If renderPass is not VK_NULL_HANDLE, subpass must be a valid subpass within renderPass

  • VUID-VkGraphicsPipelineCreateInfo-renderPass-06047
    If renderPass is not VK_NULL_HANDLE, the pipeline is being created with pre-rasterization shader state, subpass viewMask is not 0, and multiviewTessellationShader is not enabled, then pStages must not include tessellation shaders

  • VUID-VkGraphicsPipelineCreateInfo-renderPass-06048
    If renderPass is not VK_NULL_HANDLE, the pipeline is being created with pre-rasterization shader state, subpass viewMask is not 0, and multiviewGeometryShader is not enabled, then pStages must not include a geometry shader

  • VUID-VkGraphicsPipelineCreateInfo-renderPass-06049
    If renderPass is not VK_NULL_HANDLE, the pipeline is being created with pre-rasterization shader state, and subpass viewMask is not 0, all of the shaders in the pipeline must not write to the Layer built-in output

  • VUID-VkGraphicsPipelineCreateInfo-renderPass-06050
    If renderPass is not VK_NULL_HANDLE and the pipeline is being created with pre-rasterization shader state, and subpass viewMask is not 0, then all of the shaders in the pipeline must not include variables decorated with the Layer built-in decoration in their interfaces

  • VUID-VkGraphicsPipelineCreateInfo-renderPass-07717
    If renderPass is not VK_NULL_HANDLE and the pipeline is being created with pre-rasterization shader state, and subpass viewMask is not 0, then all of the shaders in the pipeline must not include variables decorated with the ViewMask built-in decoration in their interfaces

  • VUID-VkGraphicsPipelineCreateInfo-flags-00764
    flags must not contain the VK_PIPELINE_CREATE_DISPATCH_BASE flag

  • VUID-VkGraphicsPipelineCreateInfo-pStages-01565
    If the pipeline requires fragment shader state and an input attachment was referenced by an aspectMask at renderPass creation time, the fragment shader must only read from the aspects that were specified for that input attachment

  • VUID-VkGraphicsPipelineCreateInfo-layout-01688
    The number of resources in layout accessible to each shader stage that is used by the pipeline must be less than or equal to VkPhysicalDeviceLimits::maxPerStageResources

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04058
    If the pipeline requires pre-rasterization shader state, and no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT, and if pNext chain includes a VkPipelineDiscardRectangleStateCreateInfoEXT structure, and if its discardRectangleCount member is not 0, then its pDiscardRectangles member must be a valid pointer to an array of discardRectangleCount VkRect2D structures

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07855
    If VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT is included in the pDynamicStates array then the implementation must support at least specVersion 2 of the VK_EXT_discard_rectangles extension

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07856
    If VK_DYNAMIC_STATE_DISCARD_RECTANGLE_MODE_EXT is included in the pDynamicStates array then the implementation must support at least specVersion 2 of the VK_EXT_discard_rectangles extension

  • VUID-VkGraphicsPipelineCreateInfo-pStages-02097
    If the pipeline requires vertex input state, and pVertexInputState is not dynamic, then pVertexInputState must be a valid pointer to a valid VkPipelineVertexInputStateCreateInfo structure

  • VUID-VkGraphicsPipelineCreateInfo-Input-07904
    If the pipeline is being created with vertex input state and pVertexInputState is not dynamic, then all variables with the Input storage class decorated with Location in the Vertex Execution Model OpEntryPoint must contain a location in VkVertexInputAttributeDescription::location

  • VUID-VkGraphicsPipelineCreateInfo-Input-08733
    If the pipeline requires vertex input state and pVertexInputState is not dynamic, then the numeric type associated with all Input variables of the corresponding Location in the Vertex Execution Model OpEntryPoint must be the same as VkVertexInputAttributeDescription::format

  • VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-08929
    If the pipeline is being created with vertex input state and pVertexInputState is not dynamic, and VkVertexInputAttributeDescription::format has a 64-bit component, then the scalar width associated with all Input variables of the corresponding Location in the Vertex Execution Model OpEntryPoint must be 64-bit

  • VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-08930
    If the pipeline is being created with vertex input state and pVertexInputState is not dynamic, and the scalar width associated with a Location decorated Input variable in the Vertex Execution Model OpEntryPoint is 64-bit, then the corresponding VkVertexInputAttributeDescription::format must have a 64-bit component

  • VUID-VkGraphicsPipelineCreateInfo-pVertexInputState-09198
    If the pipeline is being created with vertex input state and pVertexInputState is not dynamic, and VkVertexInputAttributeDescription::format has a 64-bit component, then all Input variables at the corresponding Location in the Vertex Execution Model OpEntryPoint must not use components that are not present in the format

  • VUID-VkGraphicsPipelineCreateInfo-dynamicPrimitiveTopologyUnrestricted-09031
    If the pipeline requires vertex input state, pInputAssemblyState must be a valid pointer to a valid VkPipelineInputAssemblyStateCreateInfo structure

  • VUID-VkGraphicsPipelineCreateInfo-pInputAssemblyState-09032
    If pInputAssemblyState is not NULL it must be a valid pointer to a valid VkPipelineInputAssemblyStateCreateInfo structure

  • VUID-VkGraphicsPipelineCreateInfo-lineRasterizationMode-02766
    If the pipeline requires pre-rasterization shader state and at least one of fragment output interface state or fragment shader state, and pMultisampleState is not NULL, the lineRasterizationMode member of a VkPipelineRasterizationLineStateCreateInfoEXT structure included in the pNext chain of pRasterizationState is VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT or VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT, then the alphaToCoverageEnable, alphaToOneEnable, and sampleShadingEnable members of pMultisampleState must all be VK_FALSE

  • VUID-VkGraphicsPipelineCreateInfo-stippledLineEnable-02767
    If the pipeline requires pre-rasterization shader state, the stippledLineEnable member of VkPipelineRasterizationLineStateCreateInfoEXT is VK_TRUE, and no element of the pDynamicStates member of pDynamicState is VK_DYNAMIC_STATE_LINE_STIPPLE_EXT, then the lineStippleFactor member of VkPipelineRasterizationLineStateCreateInfoEXT must be in the range [1,256]

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03378
    If the extendedDynamicState feature is not enabled, there must be no element of the pDynamicStates member of pDynamicState set to VK_DYNAMIC_STATE_CULL_MODE, VK_DYNAMIC_STATE_FRONT_FACE, VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY, VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT, VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT, VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE, VK_DYNAMIC_STATE_DEPTH_TEST_ENABLE, VK_DYNAMIC_STATE_DEPTH_WRITE_ENABLE, VK_DYNAMIC_STATE_DEPTH_COMPARE_OP, VK_DYNAMIC_STATE_DEPTH_BOUNDS_TEST_ENABLE, VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE, or VK_DYNAMIC_STATE_STENCIL_OP

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03379
    If the pipeline requires pre-rasterization shader state, and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT is included in the pDynamicStates array then viewportCount must be zero

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-03380
    If the pipeline requires pre-rasterization shader state, and VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT is included in the pDynamicStates array then scissorCount must be zero

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04132
    If the pipeline requires pre-rasterization shader state, and VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT is included in the pDynamicStates array then VK_DYNAMIC_STATE_VIEWPORT must not be present

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04133
    If the pipeline requires pre-rasterization shader state, and VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT is included in the pDynamicStates array then VK_DYNAMIC_STATE_SCISSOR must not be present

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04868
    If the extendedDynamicState2 feature is not enabled, there must be no element of the pDynamicStates member of pDynamicState set to VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE, VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, or VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04869
    If the extendedDynamicState2LogicOp feature is not enabled, there must be no element of the pDynamicStates member of pDynamicState set to VK_DYNAMIC_STATE_LOGIC_OP_EXT

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04870
    If the extendedDynamicState2PatchControlPoints feature is not enabled, there must be no element of the pDynamicStates member of pDynamicState set to VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04494
    If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in pDynamicState->pDynamicStates, VkPipelineFragmentShadingRateStateCreateInfoKHR::fragmentSize.width must be greater than or equal to 1

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04495
    If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in pDynamicState->pDynamicStates, VkPipelineFragmentShadingRateStateCreateInfoKHR::fragmentSize.height must be greater than or equal to 1

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04496
    If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in pDynamicState->pDynamicStates, VkPipelineFragmentShadingRateStateCreateInfoKHR::fragmentSize.width must be a power-of-two value

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04497
    If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in pDynamicState->pDynamicStates, VkPipelineFragmentShadingRateStateCreateInfoKHR::fragmentSize.height must be a power-of-two value

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04498
    If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in pDynamicState->pDynamicStates, VkPipelineFragmentShadingRateStateCreateInfoKHR::fragmentSize.width must be less than or equal to 4

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04499
    If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in pDynamicState->pDynamicStates, VkPipelineFragmentShadingRateStateCreateInfoKHR::fragmentSize.height must be less than or equal to 4

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04500
    If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in pDynamicState->pDynamicStates, and the pipelineFragmentShadingRate feature is not enabled, VkPipelineFragmentShadingRateStateCreateInfoKHR::fragmentSize.width and VkPipelineFragmentShadingRateStateCreateInfoKHR::fragmentSize.height must both be equal to 1

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06567
    If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in pDynamicState->pDynamicStates, VkPipelineFragmentShadingRateStateCreateInfoKHR::combinerOps[0] must be a valid VkFragmentShadingRateCombinerOpKHR value

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicState-06568
    If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in pDynamicState->pDynamicStates, VkPipelineFragmentShadingRateStateCreateInfoKHR::combinerOps[1] must be a valid VkFragmentShadingRateCombinerOpKHR value

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04501
    If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in pDynamicState->pDynamicStates, and the primitiveFragmentShadingRate feature is not enabled, VkPipelineFragmentShadingRateStateCreateInfoKHR::combinerOps[0] must be VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicState-04502
    If the pipeline requires pre-rasterization shader state or fragment shader state and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in pDynamicState->pDynamicStates, and the attachmentFragmentShadingRate feature is not enabled, VkPipelineFragmentShadingRateStateCreateInfoKHR::combinerOps[1] must be VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR

  • VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04503
    If the pipeline requires pre-rasterization shader state and the primitiveFragmentShadingRateWithMultipleViewports limit is not supported, VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT is not included in pDynamicState->pDynamicStates, and VkPipelineViewportStateCreateInfo::viewportCount is greater than 1, entry points specified in pStages must not write to the PrimitiveShadingRateKHR built-in

  • VUID-VkGraphicsPipelineCreateInfo-primitiveFragmentShadingRateWithMultipleViewports-04504
    If the pipeline requires pre-rasterization shader state and the primitiveFragmentShadingRateWithMultipleViewports limit is not supported, and entry points specified in pStages write to the ViewportIndex built-in, they must not also write to the PrimitiveShadingRateKHR built-in

  • VUID-VkGraphicsPipelineCreateInfo-fragmentShadingRateNonTrivialCombinerOps-04506
    If the pipeline requires pre-rasterization shader state or fragment shader state, the fragmentShadingRateNonTrivialCombinerOps limit is not supported, and VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR is not included in pDynamicState->pDynamicStates, elements of VkPipelineFragmentShadingRateStateCreateInfoKHR::combinerOps must be VK_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_KHR or VK_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_KHR

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04807
    If the pipeline requires pre-rasterization shader state and the vertexInputDynamicState feature is not enabled, there must be no element of the pDynamicStates member of pDynamicState set to VK_DYNAMIC_STATE_VERTEX_INPUT_EXT

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-04800
    If the colorWriteEnable feature is not enabled, there must be no element of the pDynamicStates member of pDynamicState set to VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT

  • VUID-VkGraphicsPipelineCreateInfo-pStages-06600
    If the pipeline requires pre-rasterization shader state or fragment shader state, pStages must be a valid pointer to an array of stageCount valid VkPipelineShaderStageCreateInfo structures

  • VUID-VkGraphicsPipelineCreateInfo-pRasterizationState-06601
    If the pipeline requires pre-rasterization shader state, pRasterizationState must be a valid pointer to a valid VkPipelineRasterizationStateCreateInfo structure

  • VUID-VkGraphicsPipelineCreateInfo-layout-06602
    If the pipeline requires fragment shader state or pre-rasterization shader state, layout must be a valid VkPipelineLayout handle

  • VUID-VkGraphicsPipelineCreateInfo-renderPass-06603
    If pre-rasterization shader state, fragment shader state, or fragment output state, renderPass must be a valid VkRenderPass handle

  • VUID-VkGraphicsPipelineCreateInfo-stageCount-06604
    If the pipeline requires pre-rasterization shader state or fragment shader state, stageCount must be greater than 0

  • VUID-VkGraphicsPipelineCreateInfo-graphicsPipelineLibrary-06606
    flags must not include VK_PIPELINE_CREATE_LIBRARY_BIT_KHR

  • VUID-VkGraphicsPipelineCreateInfo-conservativePointAndLineRasterization-08892
    If conservativePointAndLineRasterization is not supported; the pipeline is being created with vertex input state and pre-rasterization shader state; the pipeline does not include a geometry shader; and the value of VkPipelineInputAssemblyStateCreateInfo::topology is VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, or VK_PRIMITIVE_TOPOLOGY_LINE_STRIP, then VkPipelineRasterizationConservativeStateCreateInfoEXT::conservativeRasterizationMode must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

  • VUID-VkGraphicsPipelineCreateInfo-conservativePointAndLineRasterization-06760
    If conservativePointAndLineRasterization is not supported, the pipeline requires pre-rasterization shader state, and the pipeline includes a geometry shader with either the OutputPoints or OutputLineStrip execution modes, VkPipelineRasterizationConservativeStateCreateInfoEXT::conservativeRasterizationMode must be VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT

  • VUID-VkGraphicsPipelineCreateInfo-pStages-06894
    If the pipeline requires pre-rasterization shader state but not fragment shader state, elements of pStages must not have stage set to VK_SHADER_STAGE_FRAGMENT_BIT

  • VUID-VkGraphicsPipelineCreateInfo-pStages-06895
    If the pipeline requires fragment shader state but not pre-rasterization shader state, elements of pStages must not have stage set to a shader stage which participates in pre-rasterization

  • VUID-VkGraphicsPipelineCreateInfo-pStages-06896
    If the pipeline requires pre-rasterization shader state, all elements of pStages must have a stage set to a shader stage which participates in fragment shader state or pre-rasterization shader state

  • VUID-VkGraphicsPipelineCreateInfo-stage-06897
    If the pipeline requires fragment shader state and/or pre-rasterization shader state, any value of stage must not be set in more than one element of pStages

  • VUID-VkGraphicsPipelineCreateInfo-None-08893
    The pipeline must be created with pre-rasterization shader state

  • VUID-VkGraphicsPipelineCreateInfo-pStages-08894
    If pStages includes a vertex shader stage, the pipeline must be created with vertex input state

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicState-08896
    If pDynamicState->pDynamicStates includes VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE, or if it does not and pRasterizationState->rasterizerDiscardEnable is VK_FALSE, the pipeline must be created with fragment shader state and fragment output interface state

  • VUID-VkGraphicsPipelineCreateInfo-None-09043
    If the format of any color attachment is VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, the colorWriteMask member of the corresponding element of pColorBlendState->pAttachments must either include all of VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, and VK_COLOR_COMPONENT_B_BIT, or none of them

Valid Usage (Implicit)
  • VUID-VkGraphicsPipelineCreateInfo-sType-sType
    sType must be VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO

  • VUID-VkGraphicsPipelineCreateInfo-pNext-pNext
    Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkPipelineDiscardRectangleStateCreateInfoEXT, VkPipelineFragmentShadingRateStateCreateInfoKHR, or VkPipelineOfflineCreateInfo

  • VUID-VkGraphicsPipelineCreateInfo-sType-unique
    The sType value of each struct in the pNext chain must be unique

  • VUID-VkGraphicsPipelineCreateInfo-flags-parameter
    flags must be a valid combination of VkPipelineCreateFlagBits values

  • VUID-VkGraphicsPipelineCreateInfo-pDynamicState-parameter
    If pDynamicState is not NULL, pDynamicState must be a valid pointer to a valid VkPipelineDynamicStateCreateInfo structure

  • VUID-VkGraphicsPipelineCreateInfo-commonparent
    Each of basePipelineHandle, layout, and renderPass that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice

See Also

Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0