vulkan-3.11.3: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

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
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

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

Documentation

cmdSetColorWriteEnableEXT Source #

Arguments

:: forall io. MonadIO io 
=> CommandBuffer

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

-> ("colorWriteEnables" ::: Vector Bool)

pColorWriteEnables is a pointer to an array of per target attachment boolean values specifying whether color writes are enabled for the given attachment.

-> 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

Valid Usage (Implicit)

  • pColorWriteEnables must be a valid pointer to an array of attachmentCount Bool32 values
  • commandBuffer must be in the recording state
  • The CommandPool that commandBuffer was allocated from must support graphics operations
  • attachmentCount 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 ScopeSupported Queue Types
Primary SecondaryBoth Graphics

See Also

Bool32, CommandBuffer

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

Bool32, StructureType

Constructors

PhysicalDeviceColorWriteEnableFeaturesEXT 

Fields

Instances

Instances details
Eq PhysicalDeviceColorWriteEnableFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_color_write_enable

Show PhysicalDeviceColorWriteEnableFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_color_write_enable

Storable PhysicalDeviceColorWriteEnableFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_color_write_enable

FromCStruct PhysicalDeviceColorWriteEnableFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_color_write_enable

ToCStruct PhysicalDeviceColorWriteEnableFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_color_write_enable

Zero PhysicalDeviceColorWriteEnableFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_color_write_enable

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 is TRUE, writes to the attachment are determined by the colorWriteMask.
  • If colorWriteEnable is FALSE, the colorWriteMask is ignored and writes to all components of the attachment are disabled. This is equivalent to specifying a colorWriteMask of 0.

Valid Usage

Valid Usage (Implicit)

  • If attachmentCount is not 0, pColorWriteEnables must be a valid pointer to an array of attachmentCount Bool32 values

See Also

Bool32, StructureType

Constructors

PipelineColorWriteCreateInfoEXT 

Fields

  • colorWriteEnables :: Vector Bool

    pColorWriteEnables is a pointer to an array of per target attachment boolean values specifying whether color writes are enabled for the given attachment.

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 #