vulkan-3.24.4: Bindings to the Vulkan graphics API.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Vulkan.Extensions.VK_EXT_discard_rectangles

Description

Name

VK_EXT_discard_rectangles - device extension

VK_EXT_discard_rectangles

Name String
VK_EXT_discard_rectangles
Extension Type
Device extension
Registered Extension Number
100
Revision
1
Extension and Version Dependencies
  • Requires support for Vulkan 1.0
  • Requires VK_KHR_get_physical_device_properties2 to be enabled for any device-level functionality
Contact

Other Extension Metadata

Last Modified Date
2016-12-22
Interactions and External Dependencies
  • Interacts with VK_KHR_device_group
  • Interacts with Vulkan 1.1
Contributors
  • Daniel Koch, NVIDIA
  • Jeff Bolz, NVIDIA

Description

This extension provides additional orthogonally aligned “discard rectangles” specified in framebuffer-space coordinates that restrict rasterization of all points, lines and triangles.

From zero to an implementation-dependent limit (specified by maxDiscardRectangles) number of discard rectangles can be operational at once. When one or more discard rectangles are active, rasterized fragments can either survive if the fragment is within any of the operational discard rectangles (DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT mode) or be rejected if the fragment is within any of the operational discard rectangles (DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT mode).

These discard rectangles operate orthogonally to the existing scissor test functionality. The discard rectangles can be different for each physical device in a device group by specifying the device mask and setting discard rectangle dynamic state.

New Commands

New Structures

New Enums

New Bitmasks

New Enum Constants

Version History

  • Revision 1, 2016-12-22 (Piers Daniell)

    • Internal revisions

See Also

DiscardRectangleModeEXT, PhysicalDeviceDiscardRectanglePropertiesEXT, PipelineDiscardRectangleStateCreateFlagsEXT, PipelineDiscardRectangleStateCreateInfoEXT, cmdSetDiscardRectangleEXT

Document Notes

For more information, see the Vulkan Specification

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

Synopsis

Documentation

cmdSetDiscardRectangleEXT Source #

Arguments

:: forall io. MonadIO io 
=> CommandBuffer

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

-> ("firstDiscardRectangle" ::: Word32)

firstDiscardRectangle is the index of the first discard rectangle whose state is updated by the command.

-> ("discardRectangles" ::: Vector Rect2D)

pDiscardRectangles is a pointer to an array of Rect2D structures specifying discard rectangles.

-> io () 

vkCmdSetDiscardRectangleEXT - Set discard rectangles dynamically for a command buffer

Description

The discard rectangle taken from element i of pDiscardRectangles replace the current state for the discard rectangle at index firstDiscardRectangle + i, for i in [0, discardRectangleCount).

This command sets the discard rectangles for subsequent drawing commands when the graphics pipeline is created with DYNAMIC_STATE_DISCARD_RECTANGLE_EXT set in PipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by the PipelineDiscardRectangleStateCreateInfoEXT::pDiscardRectangles values used to create the currently active pipeline.

Valid Usage

  • The x and y member of offset in each Rect2D element of pDiscardRectangles must be greater than or equal to 0
  • Evaluation of (offset.x + extent.width) in each Rect2D element of pDiscardRectangles must not cause a signed integer addition overflow
  • Evaluation of (offset.y + extent.height) in each Rect2D element of pDiscardRectangles must not cause a signed integer addition overflow
  • If this command is recorded in a secondary command buffer with CommandBufferInheritanceViewportScissorInfoNV::viewportScissor2D enabled, then this function must not be called

Valid Usage (Implicit)

  • pDiscardRectangles must be a valid pointer to an array of discardRectangleCount Rect2D structures
  • commandBuffer must be in the recording state
  • The CommandPool that commandBuffer was allocated from must support graphics operations
  • This command must only be called outside of a video coding scope
  • discardRectangleCount must be greater than 0

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryBoth Outside Graphics State

See Also

VK_EXT_discard_rectangles, CommandBuffer, Rect2D

data PhysicalDeviceDiscardRectanglePropertiesEXT Source #

VkPhysicalDeviceDiscardRectanglePropertiesEXT - Structure describing discard rectangle limits that can be supported by an implementation

Description

If the PhysicalDeviceDiscardRectanglePropertiesEXT structure is included in the pNext chain of the PhysicalDeviceProperties2 structure passed to getPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

Valid Usage (Implicit)

See Also

VK_EXT_discard_rectangles, StructureType

Constructors

PhysicalDeviceDiscardRectanglePropertiesEXT 

Fields

Instances

Instances details
Storable PhysicalDeviceDiscardRectanglePropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Show PhysicalDeviceDiscardRectanglePropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Eq PhysicalDeviceDiscardRectanglePropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

FromCStruct PhysicalDeviceDiscardRectanglePropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

ToCStruct PhysicalDeviceDiscardRectanglePropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Zero PhysicalDeviceDiscardRectanglePropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

data PipelineDiscardRectangleStateCreateInfoEXT Source #

VkPipelineDiscardRectangleStateCreateInfoEXT - Structure specifying discard rectangle

Description

If the DYNAMIC_STATE_DISCARD_RECTANGLE_EXT dynamic state is enabled for a pipeline, the pDiscardRectangles member is ignored.

When this structure is included in the pNext chain of GraphicsPipelineCreateInfo, it defines parameters of the discard rectangle test. If this structure is not included in the pNext chain, it is equivalent to specifying this structure with a discardRectangleCount of 0.

Valid Usage (Implicit)

See Also

VK_EXT_discard_rectangles, DiscardRectangleModeEXT, PipelineDiscardRectangleStateCreateFlagsEXT, Rect2D, StructureType

Constructors

PipelineDiscardRectangleStateCreateInfoEXT 

Fields

newtype PipelineDiscardRectangleStateCreateFlagsEXT Source #

VkPipelineDiscardRectangleStateCreateFlagsEXT - Reserved for future use

Description

PipelineDiscardRectangleStateCreateFlagsEXT is a bitmask type for setting a mask, but is currently reserved for future use.

See Also

VK_EXT_discard_rectangles, PipelineDiscardRectangleStateCreateInfoEXT

Instances

Instances details
Storable PipelineDiscardRectangleStateCreateFlagsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Bits PipelineDiscardRectangleStateCreateFlagsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Methods

(.&.) :: PipelineDiscardRectangleStateCreateFlagsEXT -> PipelineDiscardRectangleStateCreateFlagsEXT -> PipelineDiscardRectangleStateCreateFlagsEXT #

(.|.) :: PipelineDiscardRectangleStateCreateFlagsEXT -> PipelineDiscardRectangleStateCreateFlagsEXT -> PipelineDiscardRectangleStateCreateFlagsEXT #

xor :: PipelineDiscardRectangleStateCreateFlagsEXT -> PipelineDiscardRectangleStateCreateFlagsEXT -> PipelineDiscardRectangleStateCreateFlagsEXT #

complement :: PipelineDiscardRectangleStateCreateFlagsEXT -> PipelineDiscardRectangleStateCreateFlagsEXT #

shift :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> PipelineDiscardRectangleStateCreateFlagsEXT #

rotate :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> PipelineDiscardRectangleStateCreateFlagsEXT #

zeroBits :: PipelineDiscardRectangleStateCreateFlagsEXT #

bit :: Int -> PipelineDiscardRectangleStateCreateFlagsEXT #

setBit :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> PipelineDiscardRectangleStateCreateFlagsEXT #

clearBit :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> PipelineDiscardRectangleStateCreateFlagsEXT #

complementBit :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> PipelineDiscardRectangleStateCreateFlagsEXT #

testBit :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> Bool #

bitSizeMaybe :: PipelineDiscardRectangleStateCreateFlagsEXT -> Maybe Int #

bitSize :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int #

isSigned :: PipelineDiscardRectangleStateCreateFlagsEXT -> Bool #

shiftL :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> PipelineDiscardRectangleStateCreateFlagsEXT #

unsafeShiftL :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> PipelineDiscardRectangleStateCreateFlagsEXT #

shiftR :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> PipelineDiscardRectangleStateCreateFlagsEXT #

unsafeShiftR :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> PipelineDiscardRectangleStateCreateFlagsEXT #

rotateL :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> PipelineDiscardRectangleStateCreateFlagsEXT #

rotateR :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int -> PipelineDiscardRectangleStateCreateFlagsEXT #

popCount :: PipelineDiscardRectangleStateCreateFlagsEXT -> Int #

FiniteBits PipelineDiscardRectangleStateCreateFlagsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Read PipelineDiscardRectangleStateCreateFlagsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Show PipelineDiscardRectangleStateCreateFlagsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Eq PipelineDiscardRectangleStateCreateFlagsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Ord PipelineDiscardRectangleStateCreateFlagsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Zero PipelineDiscardRectangleStateCreateFlagsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

newtype DiscardRectangleModeEXT Source #

VkDiscardRectangleModeEXT - Specify the discard rectangle mode

See Also

VK_EXT_discard_rectangles, PipelineDiscardRectangleStateCreateInfoEXT

Bundled Patterns

pattern DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT :: DiscardRectangleModeEXT

DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT specifies that the discard rectangle test is inclusive.

pattern DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT :: DiscardRectangleModeEXT

DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT specifies that the discard rectangle test is exclusive.

Instances

Instances details
Storable DiscardRectangleModeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Read DiscardRectangleModeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Show DiscardRectangleModeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Eq DiscardRectangleModeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Ord DiscardRectangleModeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

Zero DiscardRectangleModeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_discard_rectangles

type EXT_DISCARD_RECTANGLES_EXTENSION_NAME = "VK_EXT_discard_rectangles" Source #

pattern EXT_DISCARD_RECTANGLES_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #