vkCmdSetExclusiveScissorNV(3)

# vkCmdSetExclusiveScissorNV(3) Manual Page

## Name

vkCmdSetExclusiveScissorNV - Set exclusive scissor rectangles dynamically for a command buffer

Loading… please wait.

## C Specification

To dynamically set the exclusive scissor rectangles, call:

    // Provided by VK_NV_scissor_exclusive
    void vkCmdSetExclusiveScissorNV(
        VkCommandBuffer                             commandBuffer,
        uint32_t                                    firstExclusiveScissor,
        uint32_t                                    exclusiveScissorCount,
        const VkRect2D*                             pExclusiveScissors);

## Parameters

- `commandBuffer` is the command buffer into which the command will be recorded.

- `firstExclusiveScissor` is the index of the first exclusive scissor rectangle whose state is updated by the command.

- `exclusiveScissorCount` is the number of exclusive scissor rectangles updated by the command.

- `pExclusiveScissors` is a pointer to an array of VkRect2D structures defining exclusive scissor rectangles.

## Description

The scissor rectangles taken from element i of `pExclusiveScissors` replace the current state for the scissor index `firstExclusiveScissor` + i, for i in [0, `exclusiveScissorCount`).

This command sets the exclusive scissor rectangles for subsequent drawing commands when the graphics pipeline is created with `VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV` set in VkPipelineDynamicStateCreateInfo::`pDynamicStates`. Otherwise, this state is specified by the VkPipelineViewportExclusiveScissorStateCreateInfoNV::`pExclusiveScissors` values used to create the currently active pipeline.

Valid Usage

- VUID-vkCmdSetExclusiveScissorNV-None-02031
  The `exclusiveScissor` feature must be enabled

- VUID-vkCmdSetExclusiveScissorNV-firstExclusiveScissor-02034
  The sum of `firstExclusiveScissor` and `exclusiveScissorCount` must be between `1` and `VkPhysicalDeviceLimits`::`maxViewports`, inclusive

- VUID-vkCmdSetExclusiveScissorNV-firstExclusiveScissor-02035
  If the `multiViewport` feature is not enabled, `firstExclusiveScissor` must be `0`

- VUID-vkCmdSetExclusiveScissorNV-exclusiveScissorCount-02036
  If the `multiViewport` feature is not enabled, `exclusiveScissorCount` must be `1`

- VUID-vkCmdSetExclusiveScissorNV-x-02037
  The `x` and `y` members of `offset` in each member of `pExclusiveScissors` must be greater than or equal to `0`

- VUID-vkCmdSetExclusiveScissorNV-offset-02038
  Evaluation of (`offset.x` + `extent.width`) for each member of `pExclusiveScissors` must not cause a signed integer addition overflow

- VUID-vkCmdSetExclusiveScissorNV-offset-02039
  Evaluation of (`offset.y` + `extent.height`) for each member of `pExclusiveScissors` must not cause a signed integer addition overflow

Valid Usage (Implicit)

- VUID-vkCmdSetExclusiveScissorNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetExclusiveScissorNV-pExclusiveScissors-parameter
  `pExclusiveScissors` must be a valid pointer to an array of `exclusiveScissorCount` VkRect2D structures

- VUID-vkCmdSetExclusiveScissorNV-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetExclusiveScissorNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support graphics operations

- VUID-vkCmdSetExclusiveScissorNV-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdSetExclusiveScissorNV-exclusiveScissorCount-arraylength
  `exclusiveScissorCount` must be greater than `0`

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | Graphics | State

## See Also

VK_NV_scissor_exclusive, VkCommandBuffer, VkRect2D

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

SPDX-License-Identifier: CC-BY-4.0