Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- Not ratified
- Extension and Version Dependencies
- VK_KHR_get_physical_device_properties2
- 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
Extending
CommandBufferInheritanceInfo
:Extending
PhysicalDeviceFeatures2
,DeviceCreateInfo
:
New Enums
New Bitmasks
New Enum Constants
EXT_CONDITIONAL_RENDERING_SPEC_VERSION
Extending
AccessFlagBits
:Extending
BufferUsageFlagBits
:Extending
PipelineStageFlagBits
:Extending
StructureType
:
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
CommandBufferInheritanceConditionalRenderingInfoEXT
,
ConditionalRenderingBeginInfoEXT
, ConditionalRenderingFlagBitsEXT
,
ConditionalRenderingFlagsEXT
,
PhysicalDeviceConditionalRenderingFeaturesEXT
,
cmdBeginConditionalRenderingEXT
, cmdEndConditionalRenderingEXT
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
- cmdBeginConditionalRenderingEXT :: forall io. MonadIO io => CommandBuffer -> ConditionalRenderingBeginInfoEXT -> io ()
- cmdUseConditionalRenderingEXT :: forall io r. MonadIO io => CommandBuffer -> ConditionalRenderingBeginInfoEXT -> io r -> io r
- cmdEndConditionalRenderingEXT :: forall io. MonadIO io => CommandBuffer -> io ()
- data ConditionalRenderingBeginInfoEXT = ConditionalRenderingBeginInfoEXT {}
- data CommandBufferInheritanceConditionalRenderingInfoEXT = CommandBufferInheritanceConditionalRenderingInfoEXT {}
- data PhysicalDeviceConditionalRenderingFeaturesEXT = PhysicalDeviceConditionalRenderingFeaturesEXT {}
- type ConditionalRenderingFlagsEXT = ConditionalRenderingFlagBitsEXT
- newtype ConditionalRenderingFlagBitsEXT where
- type EXT_CONDITIONAL_RENDERING_SPEC_VERSION = 2
- pattern EXT_CONDITIONAL_RENDERING_SPEC_VERSION :: forall a. Integral a => a
- type EXT_CONDITIONAL_RENDERING_EXTENSION_NAME = "VK_EXT_conditional_rendering"
- pattern EXT_CONDITIONAL_RENDERING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
Documentation
cmdBeginConditionalRenderingEXT Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> ConditionalRenderingBeginInfoEXT |
|
-> io () |
vkCmdBeginConditionalRenderingEXT - Define the beginning of a conditional rendering block
Valid Usage
- Conditional rendering must not already be active
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pConditionalRenderingBegin
must be a valid pointer to a validConditionalRenderingBeginInfoEXT
structure -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
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 Compute | Action State |
See Also
VK_EXT_conditional_rendering,
CommandBuffer
,
ConditionalRenderingBeginInfoEXT
cmdUseConditionalRenderingEXT :: forall io r. MonadIO io => CommandBuffer -> ConditionalRenderingBeginInfoEXT -> io r -> io r Source #
This function will call the supplied action between calls to
cmdBeginConditionalRenderingEXT
and cmdEndConditionalRenderingEXT
Note that cmdEndConditionalRenderingEXT
is *not* called if an
exception is thrown by the inner action.
cmdEndConditionalRenderingEXT Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> 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)
-
commandBuffer
must be a validCommandBuffer
handle
-
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
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 Compute | Action State |
See Also
data ConditionalRenderingBeginInfoEXT Source #
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 singleDeviceMemory
object
-
buffer
must have been created with theBUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT
bit set -
offset
must be less than the size ofbuffer
by at least 32 bits -
offset
must be a multiple of 4
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT
-
pNext
must beNULL
-
buffer
must be a validBuffer
handle -
flags
must be a valid combination ofConditionalRenderingFlagBitsEXT
values
See Also
VK_EXT_conditional_rendering,
Buffer
, ConditionalRenderingFlagsEXT
,
DeviceSize
,
StructureType
,
cmdBeginConditionalRenderingEXT
ConditionalRenderingBeginInfoEXT | |
|
Instances
data CommandBufferInheritanceConditionalRenderingInfoEXT Source #
VkCommandBufferInheritanceConditionalRenderingInfoEXT - Structure specifying command buffer inheritance information
Description
If this structure is not present, the behavior is as if
conditionalRenderingEnable
is FALSE
.
Valid Usage
-
If the
inheritedConditionalRendering
feature is not enabled,
conditionalRenderingEnable
must beFALSE
Valid Usage (Implicit)
See Also
CommandBufferInheritanceConditionalRenderingInfoEXT | |
|
Instances
data PhysicalDeviceConditionalRenderingFeaturesEXT Source #
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. PhysicalDeviceConditionalRenderingFeaturesEXT
can also be
used in the pNext
chain of DeviceCreateInfo
to
selectively enable these features.
Valid Usage (Implicit)
See Also
Instances
newtype ConditionalRenderingFlagBitsEXT Source #
VkConditionalRenderingFlagBitsEXT - Specify the behavior of conditional rendering
See Also
pattern CONDITIONAL_RENDERING_INVERTED_BIT_EXT :: ConditionalRenderingFlagBitsEXT |
|
Instances
pattern EXT_CONDITIONAL_RENDERING_SPEC_VERSION :: forall a. Integral a => a Source #
type EXT_CONDITIONAL_RENDERING_EXTENSION_NAME = "VK_EXT_conditional_rendering" Source #
pattern EXT_CONDITIONAL_RENDERING_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #