VkPipelineRasterizationStateCreateInfo(3)

# VkPipelineRasterizationStateCreateInfo(3) Manual Page

## Name

VkPipelineRasterizationStateCreateInfo - Structure specifying parameters of a newly created pipeline rasterization state

Loading… please wait.

## C Specification

The `VkPipelineRasterizationStateCreateInfo` structure is defined as:

    // Provided by VK_VERSION_1_0
    typedef struct VkPipelineRasterizationStateCreateInfo {
        VkStructureType                            sType;
        const void*                                pNext;
        VkPipelineRasterizationStateCreateFlags    flags;
        VkBool32                                   depthClampEnable;
        VkBool32                                   rasterizerDiscardEnable;
        VkPolygonMode                              polygonMode;
        VkCullModeFlags                            cullMode;
        VkFrontFace                                frontFace;
        VkBool32                                   depthBiasEnable;
        float                                      depthBiasConstantFactor;
        float                                      depthBiasClamp;
        float                                      depthBiasSlopeFactor;
        float                                      lineWidth;
    } VkPipelineRasterizationStateCreateInfo;

## Members

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `flags` is reserved for future use.

- `depthClampEnable` controls whether to clamp the fragment’s depth values as described in Depth Test. If the pipeline is not created with VkPipelineRasterizationDepthClipStateCreateInfoEXT present then enabling depth clamp will also disable clipping primitives to the z planes of the frustum as described in Primitive Clipping. Otherwise depth clipping is controlled by the state set in VkPipelineRasterizationDepthClipStateCreateInfoEXT.

- `rasterizerDiscardEnable` controls whether primitives are discarded immediately before the rasterization stage.

- `polygonMode` is the triangle rendering mode. See VkPolygonMode.

- `cullMode` is the triangle facing direction used for primitive culling. See VkCullModeFlagBits.

- `frontFace` is a VkFrontFace value specifying the front-facing triangle orientation to be used for culling.

- `depthBiasEnable` controls whether to bias fragment depth values.

- `depthBiasConstantFactor` is a scalar factor controlling the constant depth value added to each fragment.

- `depthBiasClamp` is the maximum (or minimum) depth bias of a fragment.

- `depthBiasSlopeFactor` is a scalar factor applied to a fragment’s slope in depth bias calculations.

- `lineWidth` is the width of rasterized line segments.

## Description

The application can also add a `VkPipelineRasterizationStateRasterizationOrderAMD` structure to the `pNext` chain of a VkPipelineRasterizationStateCreateInfo structure. This structure enables selecting the rasterization order to use when rendering with the corresponding graphics pipeline as described in Rasterization Order.

Valid Usage

- VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782
  If the `depthClamp` feature is not enabled, `depthClampEnable` must be `VK_FALSE`

- VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-01507
  If the `fillModeNonSolid` feature is not enabled, `polygonMode` must be `VK_POLYGON_MODE_FILL` or `VK_POLYGON_MODE_FILL_RECTANGLE_NV`

- VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-01414
  If the `VK_NV_fill_rectangle` extension is not enabled, `polygonMode` must not be `VK_POLYGON_MODE_FILL_RECTANGLE_NV`

- VUID-VkPipelineRasterizationStateCreateInfo-pointPolygons-04458
  If the `VK_KHR_portability_subset` extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::`pointPolygons` is `VK_FALSE`, and `rasterizerDiscardEnable` is `VK_FALSE`, `polygonMode` must not be `VK_POLYGON_MODE_POINT`

Valid Usage (Implicit)

- VUID-VkPipelineRasterizationStateCreateInfo-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO`

- VUID-VkPipelineRasterizationStateCreateInfo-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 VkDepthBiasRepresentationInfoEXT, VkPipelineRasterizationConservativeStateCreateInfoEXT, VkPipelineRasterizationDepthClipStateCreateInfoEXT, VkPipelineRasterizationLineStateCreateInfoEXT, VkPipelineRasterizationProvokingVertexStateCreateInfoEXT, VkPipelineRasterizationStateRasterizationOrderAMD, or VkPipelineRasterizationStateStreamCreateInfoEXT

- VUID-VkPipelineRasterizationStateCreateInfo-sType-unique
  The `sType` value of each struct in the `pNext` chain must be unique

- VUID-VkPipelineRasterizationStateCreateInfo-flags-zerobitmask
  `flags` must be `0`

- VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-parameter
  `polygonMode` must be a valid VkPolygonMode value

- VUID-VkPipelineRasterizationStateCreateInfo-cullMode-parameter
  `cullMode` must be a valid combination of VkCullModeFlagBits values

- VUID-VkPipelineRasterizationStateCreateInfo-frontFace-parameter
  `frontFace` must be a valid VkFrontFace value

## See Also

VK_VERSION_1_0, VkBool32, VkCullModeFlags, VkFrontFace, VkGraphicsPipelineCreateInfo, VkPipelineRasterizationStateCreateFlags, VkPolygonMode, VkStructureType

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

Copyright 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0