Class NVScissorExclusive

java.lang.Object
org.lwjgl.vulkan.NVScissorExclusive

public class NVScissorExclusive extends Object
This extension adds support for an exclusive scissor test to Vulkan. The exclusive scissor test behaves like the scissor test, except that the exclusive scissor test fails for pixels inside the corresponding rectangle and passes for pixels outside the rectangle. If the same rectangle is used for both the scissor and exclusive scissor tests, the exclusive scissor test will pass if and only if the scissor test fails.

Version 2 of this extension introduces DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV and CmdSetExclusiveScissorEnableNV. Applications that use this dynamic state must ensure the implementation advertises at least specVersion 2 of this extension.

VK_NV_scissor_exclusive
Name String
VK_NV_scissor_exclusive
Extension Type
Device extension
Registered Extension Number
206
Revision
2
Extension and Version Dependencies
VK_KHR_get_physical_device_properties2
Contact
Other Extension Metadata
Last Modified Date
2023-01-18
IP Status
No known IP claims.
Interactions and External Dependencies
None
Contributors
  • Pat Brown, NVIDIA
  • Jeff Bolz, NVIDIA
  • Piers Daniell, NVIDIA
  • Daniel Koch, NVIDIA
  • Field Details

  • Method Details

    • nvkCmdSetExclusiveScissorEnableNV

      public static void nvkCmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, int firstExclusiveScissor, int exclusiveScissorCount, long pExclusiveScissorEnables)
      Parameters:
      exclusiveScissorCount - the number of exclusive scissor rectangles updated by the command.
    • vkCmdSetExclusiveScissorEnableNV

      public static void vkCmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, int firstExclusiveScissor, IntBuffer pExclusiveScissorEnables)
      Dynamically enable each exclusive scissor for a command buffer.
      C Specification

      To dynamically set whether an exclusive scissor is enabled or not, call:

      
       void vkCmdSetExclusiveScissorEnableNV(
           VkCommandBuffer                             commandBuffer,
           uint32_t                                    firstExclusiveScissor,
           uint32_t                                    exclusiveScissorCount,
           const VkBool32*                             pExclusiveScissorEnables);
      Description

      The exclusive scissor enables taken from element i of pExclusiveScissorEnables replace the current state for the scissor index firstExclusiveScissor + i, for i in [0, exclusiveScissorCount).

      This command sets the exclusive scissor enable for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV set in VkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is implied by the VkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCount value used to create the currently active pipeline, where all exclusiveScissorCount exclusive scissors are implicitly enabled and the remainder up to VkPhysicalDeviceLimits::maxViewports are implicitly disabled.

      Valid Usage
      Valid Usage (Implicit)
      • commandBuffer must be a valid VkCommandBuffer handle
      • pExclusiveScissorEnables must be a valid pointer to an array of exclusiveScissorCount VkBool32 values
      • commandBuffer must be in the recording state
      • The VkCommandPool that commandBuffer was allocated from must support graphics operations
      • This command must only be called outside of a video coding scope
      • 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 LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
      Primary SecondaryBothOutsideGraphicsState
      Parameters:
      commandBuffer - the command buffer into which the command will be recorded.
      firstExclusiveScissor - the index of the first exclusive scissor rectangle whose state is updated by the command.
      pExclusiveScissorEnables - a pointer to an array of VkBool32 values defining whether the exclusive scissor is enabled.
    • nvkCmdSetExclusiveScissorNV

      public static void nvkCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, int firstExclusiveScissor, int exclusiveScissorCount, long pExclusiveScissors)
      Unsafe version of: CmdSetExclusiveScissorNV
      Parameters:
      exclusiveScissorCount - the number of exclusive scissor rectangles updated by the command.
    • vkCmdSetExclusiveScissorNV

      public static void vkCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, int firstExclusiveScissor, VkRect2D.Buffer pExclusiveScissors)
      Set exclusive scissor rectangles dynamically for a command buffer.
      C Specification

      To dynamically set the exclusive scissor rectangles, call:

      
       void vkCmdSetExclusiveScissorNV(
           VkCommandBuffer                             commandBuffer,
           uint32_t                                    firstExclusiveScissor,
           uint32_t                                    exclusiveScissorCount,
           const VkRect2D*                             pExclusiveScissors);
      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 drawing using shader objects, or when the graphics pipeline is created with 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
      • The exclusiveScissor feature must be enabled
      • The sum of firstExclusiveScissor and exclusiveScissorCount must be between 1 and VkPhysicalDeviceLimits::maxViewports, inclusive
      • If the multiViewport feature is not enabled, firstExclusiveScissor must be 0
      • If the multiViewport feature is not enabled, exclusiveScissorCount must be 1
      • The x and y members of offset in each member of pExclusiveScissors must be greater than or equal to 0
      • Evaluation of (offset.x + extent.width) for each member of pExclusiveScissors must not cause a signed integer addition overflow
      • Evaluation of (offset.y + extent.height) for each member of pExclusiveScissors must not cause a signed integer addition overflow
      Valid Usage (Implicit)
      • commandBuffer must be a valid VkCommandBuffer handle
      • pExclusiveScissors must be a valid pointer to an array of exclusiveScissorCount VkRect2D structures
      • commandBuffer must be in the recording state
      • The VkCommandPool that commandBuffer was allocated from must support graphics operations
      • This command must only be called outside of a video coding scope
      • 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 LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
      Primary SecondaryBothOutsideGraphicsState
      See Also

      VkRect2D

      Parameters:
      commandBuffer - the command buffer into which the command will be recorded.
      firstExclusiveScissor - the index of the first exclusive scissor rectangle whose state is updated by the command.
      pExclusiveScissors - a pointer to an array of VkRect2D structures defining exclusive scissor rectangles.
    • vkCmdSetExclusiveScissorEnableNV

      public static void vkCmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, int firstExclusiveScissor, int[] pExclusiveScissorEnables)