HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_EXT_conditional_rendering

Name

VK_EXT_conditional_rendering - device extension

VK_EXT_conditional_rendering

Name String

VK_EXT_conditional_rendering

Extension Type

Device extension

Registered Extension Number

82

Revision

2

Ratification Status

Ratified

Extension and Version Dependencies

VK_KHR_get_physical_device_properties2

or

Vulkan Version 1.1

Contact

Other Extension Metadata

Last Modified Date

2018-05-21

IP Status

No known IP claims.

Contributors
  • Vikram Kushwaha, NVIDIA

  • Daniel Rakos, AMD

  • Jesse Hall, Google

  • Jeff Bolz, NVIDIA

  • Piers Daniell, NVIDIA

  • Stuart Smith, Imagination Technologies

Description

This extension allows the execution of one or more rendering commands to be conditional on a value in buffer memory. This may help an application reduce the latency by conditionally discarding rendering commands without application intervention. The conditional rendering commands are limited to draws, compute dispatches and clearing attachments within a conditional rendering block.

New Commands

New Structures

New Enums

New Bitmasks

New Enum Constants

Issues

1) Should conditional rendering affect copy and blit commands?

RESOLVED: Conditional rendering should not affect copies and blits.

2) Should secondary command buffers be allowed to execute while conditional rendering is active in the primary command buffer?

RESOLVED: The rendering commands in secondary command buffer will be affected by an active conditional rendering in primary command buffer if the conditionalRenderingEnable is set to TRUE. Conditional rendering must not be active in the primary command buffer if conditionalRenderingEnable is FALSE.

Examples

None.

Version History

  • Revision 1, 2018-04-19 (Vikram Kushwaha)

    • First Version

  • Revision 2, 2018-05-21 (Vikram Kushwaha)

    • Add new pipeline stage, access flags and limit conditional rendering to a subpass or entire render pass.

See Also

No cross-references are available

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.

  • 7 types
  • 3 values
  • Packagevulkan-3.27
  • Exports13
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_EXT_conditional_rendering.hs
valuecmdBeginConditionalRenderingEXT
  1. :: MonadIO io
  2. => CommandBuffer

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

  3. -> ConditionalRenderingBeginInfoEXT

    pConditionalRenderingBegin is a pointer to a ConditionalRenderingBeginInfoEXT structure specifying parameters of conditional rendering.

  4. -> io ()
#

vkCmdBeginConditionalRenderingEXT - Define the beginning of a conditional rendering block

Valid Usage

  • Conditional rendering must not already be active

Valid Usage (Implicit)

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 Levels

Render Pass Scope

Video Coding Scope

Supported Queue Types

Command Type

Primary Secondary

Both

Outside

VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT

Action State

Conditional Rendering

vkCmdBeginConditionalRenderingEXT is not affected by conditional rendering

See Also

VK_EXT_conditional_rendering, CommandBuffer, ConditionalRenderingBeginInfoEXT

valuecmdEndConditionalRenderingEXT
  1. :: MonadIO io
  2. => CommandBuffer

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

  3. -> io ()
#

vkCmdEndConditionalRenderingEXT - Define the end of a conditional rendering block

Description

Once ended, conditional rendering becomes inactive.

Valid Usage

  • Conditional rendering must be active

  • If conditional rendering was made active outside of a render pass instance, it must not be ended inside a render pass instance

  • If conditional rendering was made active within a subpass it must be ended in the same subpass

Valid Usage (Implicit)

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 Levels

Render Pass Scope

Video Coding Scope

Supported Queue Types

Command Type

Primary Secondary

Both

Outside

VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT

Action State

Conditional Rendering

vkCmdEndConditionalRenderingEXT is not affected by conditional rendering

See Also

VK_EXT_conditional_rendering, CommandBuffer

VkConditionalRenderingBeginInfoEXT - Structure specifying conditional rendering begin information

Description

If the 32-bit value at offset in buffer memory is zero, then the rendering commands are discarded, otherwise they are executed as normal. If the value of the predicate in buffer memory changes while conditional rendering is active, the rendering commands may be discarded in an implementation-dependent way. Some implementations may latch the value of the predicate upon beginning conditional rendering while others may read it before every rendering command.

Valid Usage

  • If buffer is non-sparse then it must be bound completely and contiguously to a single DeviceMemory object

Valid Usage (Implicit)

See Also

VK_EXT_conditional_rendering, Buffer, ConditionalRenderingFlagsEXT, DeviceSize, StructureType, cmdBeginConditionalRenderingEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkCommandBufferInheritanceConditionalRenderingInfoEXT - Structure specifying command buffer inheritance information

Description

If this structure is not present, the behavior is as if conditionalRenderingEnable is FALSE.

Valid Usage

Valid Usage (Implicit)

Structure Chaining

Extends the structure

See Also

VK_EXT_conditional_rendering, Bool32, StructureType

Constructors

  • CommandBufferInheritanceConditionalRenderingInfoEXT
    • conditionalRenderingEnable :: Bool

      conditionalRenderingEnable specifies whether the command buffer can be executed while conditional rendering is active in the primary command buffer. If this is TRUE, then this command buffer can be executed whether the primary command buffer has active conditional rendering or not. If this is FALSE, then the primary command buffer must not have conditional rendering active.

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPhysicalDeviceConditionalRenderingFeaturesEXT - Structure describing if a secondary command buffer can be executed if conditional rendering is active in the primary command buffer

Members

This structure describes the following features:

Description

If the PhysicalDeviceConditionalRenderingFeaturesEXT structure is included in the pNext chain of the PhysicalDeviceFeatures2 structure passed to getPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a Device with any features described by PhysicalDeviceConditionalRenderingFeaturesEXT, it must add an instance of the structure, with the desired feature members set to TRUE, to the pNext chain of DeviceCreateInfo when creating the Device.

Structure Chaining

Extends the structures

See Also

VK_EXT_conditional_rendering, Bool32, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkConditionalRenderingFlagBitsEXT - Specify the behavior of conditional rendering

Description

  • CONDITIONAL_RENDERING_INVERTED_BIT_EXT specifies the condition used to determine whether to discard rendering commands or not. That is, if the 32-bit predicate read from buffer memory at offset is zero, the rendering commands are not discarded, and if non zero, then they are discarded.

See Also

VK_EXT_conditional_rendering, ConditionalRenderingFlagsEXT

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …