C Specification

Each primitive sent to a given viewport has a swizzle and optional negation applied to its clip coordinates. The swizzle that is applied depends on the viewport index, and is controlled by the VkPipelineViewportSwizzleStateCreateInfoNV pipeline state:

// Provided by VK_NV_viewport_swizzle
typedef struct VkPipelineViewportSwizzleStateCreateInfoNV {
    VkStructureType                                sType;
    const void*                                    pNext;
    VkPipelineViewportSwizzleStateCreateFlagsNV    flags;
    uint32_t                                       viewportCount;
    const VkViewportSwizzleNV*                     pViewportSwizzles;
} VkPipelineViewportSwizzleStateCreateInfoNV;


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

  • viewportCount is the number of viewport swizzles used by the pipeline.

  • pViewportSwizzles is a pointer to an array of VkViewportSwizzleNV structures, defining the viewport swizzles.


Valid Usage
  • VUID-VkPipelineViewportSwizzleStateCreateInfoNV-viewportCount-01215
    viewportCount must be greater than or equal to the viewportCount set in VkPipelineViewportStateCreateInfo

Valid Usage (Implicit)
  • VUID-VkPipelineViewportSwizzleStateCreateInfoNV-sType-sType

  • VUID-VkPipelineViewportSwizzleStateCreateInfoNV-flags-zerobitmask
    flags must be 0

  • VUID-VkPipelineViewportSwizzleStateCreateInfoNV-pViewportSwizzles-parameter
    pViewportSwizzles must be a valid pointer to an array of viewportCount valid VkViewportSwizzleNV structures

  • VUID-VkPipelineViewportSwizzleStateCreateInfoNV-viewportCount-arraylength
    viewportCount must be greater than 0

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-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0