VkPipelineViewportStateCreateInfo
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;
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.flagsis reserved for future use.viewportCountis the number of viewports used by the pipeline.pViewportsis a pointer to an array of VkViewport structures, defining the viewport transforms. If the viewport state is dynamic, this member is ignored.scissorCountis the number of scissors and must match the number of viewports.pScissorsis 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.
Valid Usage
VUID-VkPipelineViewportStateCreateInfo-viewportCount-01216
If the multiViewport feature is not
enabled, viewportCount must not be greater than 1
VUID-VkPipelineViewportStateCreateInfo-scissorCount-01217
If the multiViewport feature is not
enabled, scissorCount must not be greater than 1
VUID-VkPipelineViewportStateCreateInfo-viewportCount-01218
viewportCount must be less than or equal to
VkPhysicalDeviceLimits::maxViewports
VUID-VkPipelineViewportStateCreateInfo-scissorCount-01219
scissorCount must be less than or equal to
VkPhysicalDeviceLimits::maxViewports
VUID-VkPipelineViewportStateCreateInfo-x-02821
The x and y members of offset member of any element of
pScissors must be greater than or equal to 0
VUID-VkPipelineViewportStateCreateInfo-offset-02822
Evaluation of (offset.x + extent.width) must not
cause a signed integer addition overflow for any element of
pScissors
VUID-VkPipelineViewportStateCreateInfo-offset-02823
Evaluation of (offset.y + extent.height) must
not cause a signed integer addition overflow for any element of
pScissors
VUID-VkPipelineViewportStateCreateInfo-scissorCount-04134
If scissorCount and viewportCount are both not dynamic, then
scissorCount and viewportCount must be identical
VUID-VkPipelineViewportStateCreateInfo-viewportCount-04135
If the graphics pipeline is being created with
VK_DYNAMIC_STATE_VIEWPORT_WITH_COUNT set then viewportCountmust be 0, otherwise
viewportCount must be greater than 0
VUID-VkPipelineViewportStateCreateInfo-scissorCount-04136
If the graphics pipeline is being created with
VK_DYNAMIC_STATE_SCISSOR_WITH_COUNT set then scissorCountmust be 0, otherwise
scissorCount must be greater than 0
VUID-VkPipelineViewportStateCreateInfo-viewportWScalingEnable-01726
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 greater than or equal to
VkPipelineViewportStateCreateInfo::viewportCount
Valid Usage (Implicit)
VUID-VkPipelineViewportStateCreateInfo-sType-sType
sType must be VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
VUID-VkPipelineViewportStateCreateInfo-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 VkPipelineViewportCoarseSampleOrderStateCreateInfoNV, VkPipelineViewportDepthClampControlCreateInfoEXT, VkPipelineViewportDepthClipControlCreateInfoEXT, VkPipelineViewportExclusiveScissorStateCreateInfoNV, VkPipelineViewportShadingRateImageStateCreateInfoNV, VkPipelineViewportSwizzleStateCreateInfoNV, or VkPipelineViewportWScalingStateCreateInfoNV
VUID-VkPipelineViewportStateCreateInfo-sType-unique
The sType value of each structure in the pNext chain must be unique
VUID-VkPipelineViewportStateCreateInfo-flags-zerobitmask
flags must be 0