VkPipelineViewportStateCreateInfo(3)

# VkPipelineViewportStateCreateInfo(3) Manual Page

## Name

VkPipelineViewportStateCreateInfo - Structure specifying parameters of a newly created pipeline viewport state

Loading... please wait.

## C Specification

The `VkPipelineViewportStateCreateInfo` structure is defined as:

    typedef struct VkPipelineViewportStateCreateInfo {
        VkStructureType                       sType;
        const void*                           pNext;
        VkPipelineViewportStateCreateFlags    flags;
        uint32_t                              viewportCount;
        const VkViewport*                     pViewports;
        uint32_t                              scissorCount;
        const VkRect2D*                       pScissors;
    } VkPipelineViewportStateCreateInfo;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to an extension-specific structure.

- `flags` is reserved for future use.

- `viewportCount` is the number of viewports used by the pipeline.

- `pViewports` is a pointer to an array of VkViewport structures, defining the viewport transforms. If the viewport state is dynamic, this member is ignored.

- `scissorCount` is the number of scissors and must match the number of viewports.

- `pScissors` is a pointer to an array of VkRect2D structures defining the rectangular bounds of the scissor for the corresponding viewport. If the scissor state is dynamic, this member is ignored.

## Description

Valid Usage

- If the multiple viewports feature is not enabled, `viewportCount` must be `1`

- If the multiple viewports feature is not enabled, `scissorCount` must be `1`

- `viewportCount` must be between `1` and `VkPhysicalDeviceLimits`::`maxViewports`, inclusive

- `scissorCount` must be between `1` and `VkPhysicalDeviceLimits`::`maxViewports`, inclusive

- `scissorCount` and `viewportCount` must be identical

- The `x` and `y` members of `offset` member of any element of `pScissors` must be greater than or equal to `0`

- Evaluation of (`offset.x` + `extent.width`) must not cause a signed integer addition overflow for any element of `pScissors`

- Evaluation of (`offset.y` + `extent.height`) must not cause a signed integer addition overflow for any element of `pScissors`

- If the `viewportWScalingEnable` member of a VkPipelineViewportWScalingStateCreateInfoNV structure included in the `pNext` chain is `VK_TRUE`, the `viewportCount` member of the VkPipelineViewportWScalingStateCreateInfoNV structure must be equal to `viewportCount`

Valid Usage (Implicit)

- `sType` must be `VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO`

- 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 VkPipelineViewportCoarseSampleOrderStateCreateInfoNV, VkPipelineViewportExclusiveScissorStateCreateInfoNV, VkPipelineViewportShadingRateImageStateCreateInfoNV, VkPipelineViewportSwizzleStateCreateInfoNV, or VkPipelineViewportWScalingStateCreateInfoNV

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

- `flags` must be `0`

- `viewportCount` must be greater than `0`

- `scissorCount` must be greater than `0`

## See Also

VkGraphicsPipelineCreateInfo, VkPipelineViewportStateCreateFlags, VkRect2D, VkStructureType, VkViewport

## 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 (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.