| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_EXT_color_write_enable
Description
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
- Ratification Status
- Not ratified
- Extension and Version Dependencies
- VK_KHR_get_physical_device_properties2 or Version 1.1
- 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-component 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_VERSIONExtending
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 #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> ("colorWriteEnables" ::: Vector Bool) |
|
| -> io () |
vkCmdSetColorWriteEnableEXT - Enable or disable writes to a color attachment dynamically for a command buffer
Description
This command sets the color write enables for subsequent drawing
commands when drawing using
shader objects,
or when the graphics pipeline is created with
DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT
set in
PipelineDynamicStateCreateInfo::pDynamicStates.
Otherwise, this state is specified by the
PipelineColorWriteCreateInfoEXT::pColorWriteEnables values used to
create the currently active pipeline.
Valid Usage
- The colorWriteEnable feature must be enabled
-
attachmentCountmust be less than or equal to themaxColorAttachmentsmember ofPhysicalDeviceLimits
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pColorWriteEnablesmust be a valid pointer to an array ofattachmentCountBool32values -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
-
attachmentCountmust be greater than0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas 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 | State |
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
Constructors
| PhysicalDeviceColorWriteEnableFeaturesEXT | |
Fields
| |
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
colorWriteEnableisTRUE, writes to the attachment are determined by thecolorWriteMask. - If
colorWriteEnableisFALSE, thecolorWriteMaskis ignored and writes to all components of the attachment are disabled. This is equivalent to specifying acolorWriteMaskof 0.
Valid Usage
- If the
colorWriteEnable
feature is not enabled, all elements of
pColorWriteEnablesmust beTRUE
- If
the pipeline is being created with
DYNAMIC_STATE_COLOR_BLEND_ADVANCED_EXT,DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT,DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT, orDYNAMIC_STATE_COLOR_WRITE_MASK_EXTdynamic states not set,attachmentCountmust be equal to theattachmentCountmember of thePipelineColorBlendStateCreateInfostructure specified during pipeline creation -
attachmentCountmust be less than or equal to themaxColorAttachmentsmember ofPhysicalDeviceLimits
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT
-
If
attachmentCountis not0,pColorWriteEnablesmust be a valid pointer to an array ofattachmentCountBool32values
See Also
Constructors
| PipelineColorWriteCreateInfoEXT | |
Fields
| |
Instances
| Show PipelineColorWriteCreateInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_color_write_enable Methods showsPrec :: Int -> PipelineColorWriteCreateInfoEXT -> ShowS # | |
| FromCStruct PipelineColorWriteCreateInfoEXT Source # | |
| ToCStruct PipelineColorWriteCreateInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_color_write_enable Methods withCStruct :: PipelineColorWriteCreateInfoEXT -> (Ptr PipelineColorWriteCreateInfoEXT -> IO b) -> IO b Source # pokeCStruct :: Ptr PipelineColorWriteCreateInfoEXT -> PipelineColorWriteCreateInfoEXT -> IO b -> IO b Source # withZeroCStruct :: (Ptr PipelineColorWriteCreateInfoEXT -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr PipelineColorWriteCreateInfoEXT -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero PipelineColorWriteCreateInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_color_write_enable Methods | |
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 #