Safe Haskell | None |
---|---|
Language | Haskell2010 |
Name
VK_EXT_color_write_enable - device extension
VK_EXT_color_write_enable
- Name String
VK_EXT_color_write_enable
- Extension Type
- Device extension
- Registered Extension Number
- 382
- Revision
- 1
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Requires
VK_KHR_get_physical_device_properties2
- Contact
Other Extension Metadata
- Last Modified Date
- 2020-02-25
- IP Status
- No known IP claims.
- Contributors
- Sharif Elcott, Google
- Tobias Hector, AMD
- Piers Daniell, NVIDIA
Description
This extension allows for selectively enabling and disabling writes to output color attachments via a pipeline dynamic state.
The intended use cases for this new state are mostly identical to those of colorWriteMask, such as selectively disabling writes to avoid feedback loops between subpasses or bandwidth savings for unused outputs. By making the state dynamic, one additional benefit is the ability to reduce pipeline counts and pipeline switching via shaders that write a superset of the desired data of which subsets are selected dynamically. The reason for a new state, colorWriteEnable, rather than making colorWriteMask dynamic is that, on many implementations, the more flexible per-channel semantics of the colorWriteMask state cannot be made dynamic in a performant manner.
New Commands
New Structures
New Enum Constants
EXT_COLOR_WRITE_ENABLE_SPEC_VERSION
Extending
DynamicState
:Extending
StructureType
:
Version History
Revision 1, 2020-01-25 (Sharif Elcott)
- Internal revisions
See Also
PhysicalDeviceColorWriteEnableFeaturesEXT
,
PipelineColorWriteCreateInfoEXT
, cmdSetColorWriteEnableEXT
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
- cmdSetColorWriteEnableEXT :: forall io. MonadIO io => CommandBuffer -> ("colorWriteEnables" ::: Vector Bool) -> io ()
- data PhysicalDeviceColorWriteEnableFeaturesEXT = PhysicalDeviceColorWriteEnableFeaturesEXT {}
- data PipelineColorWriteCreateInfoEXT = PipelineColorWriteCreateInfoEXT {}
- type EXT_COLOR_WRITE_ENABLE_SPEC_VERSION = 1
- pattern EXT_COLOR_WRITE_ENABLE_SPEC_VERSION :: forall a. Integral a => a
- type EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME = "VK_EXT_color_write_enable"
- pattern EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
Documentation
cmdSetColorWriteEnableEXT Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> ("colorWriteEnables" ::: Vector Bool) |
|
-> io () |
vkCmdSetColorWriteEnableEXT - Enable or disable writes to a color attachment
Description
This command sets the state for a given draw when the graphics pipeline
is created with
DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT
set in
PipelineDynamicStateCreateInfo
::pDynamicStates
.
Valid Usage
- The colorWriteEnable feature must be enabled
-
attachmentCount
must be equal to theattachmentCount
member of thePipelineColorBlendStateCreateInfo
structure specified during pipeline creation
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pColorWriteEnables
must be a valid pointer to an array ofattachmentCount
Bool32
values -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was allocated from must support graphics operations -
attachmentCount
must be greater than0
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 | Supported Queue Types |
---|---|---|
Primary Secondary | Both | Graphics |
See Also
data PhysicalDeviceColorWriteEnableFeaturesEXT Source #
VkPhysicalDeviceColorWriteEnableFeaturesEXT - Structure describing whether writes to color attachments can be enabled and disabled dynamically
Members
This structure describes the following feature:
Description
If the PhysicalDeviceColorWriteEnableFeaturesEXT
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. PhysicalDeviceColorWriteEnableFeaturesEXT
can also be
used in the pNext
chain of DeviceCreateInfo
to
selectively enable these features.
Valid Usage (Implicit)
See Also
PhysicalDeviceColorWriteEnableFeaturesEXT | |
|
Instances
data PipelineColorWriteCreateInfoEXT Source #
VkPipelineColorWriteCreateInfoEXT - Structure specifying color write state of a newly created pipeline
Description
When this structure is included in the pNext
chain of
PipelineColorBlendStateCreateInfo
, it defines
per-attachment color write state. If this structure is not included in
the pNext
chain, it is equivalent to specifying this structure with
attachmentCount
equal to the attachmentCount
member of
PipelineColorBlendStateCreateInfo
, and
pColorWriteEnables
pointing to an array of as many
TRUE
values.
If the
colorWriteEnable
feature is not enabled on the device, all
Bool32
elements in the
pColorWriteEnables
array must be
TRUE
.
Color Write Enable interacts with the Color Write Mask as follows:
- If
colorWriteEnable
isTRUE
, writes to the attachment are determined by thecolorWriteMask
. - If
colorWriteEnable
isFALSE
, thecolorWriteMask
is ignored and writes to all components of the attachment are disabled. This is equivalent to specifying acolorWriteMask
of 0.
Valid Usage
- If the
colorWriteEnable
feature is not enabled, all elements of
pColorWriteEnables
must beTRUE
-
attachmentCount
must be equal to theattachmentCount
member of thePipelineColorBlendStateCreateInfo
structure specified during pipeline creation
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT
-
If
attachmentCount
is not0
,pColorWriteEnables
must be a valid pointer to an array ofattachmentCount
Bool32
values
See Also
PipelineColorWriteCreateInfoEXT | |
|
Instances
type EXT_COLOR_WRITE_ENABLE_SPEC_VERSION = 1 Source #
pattern EXT_COLOR_WRITE_ENABLE_SPEC_VERSION :: forall a. Integral a => a Source #
type EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME = "VK_EXT_color_write_enable" Source #
pattern EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #