Class EXTColorWriteEnable
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.
- Name String
VK_EXT_color_write_enable- Extension Type
- Device extension
- Registered Extension Number
- 382
- Revision
- 1
- Extension and Version Dependencies
VK_KHR_get_physical_device_properties2or Version 1.1- Contact
- Sharif Elcott selcott
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intExtendsVkDynamicState.static final StringThe extension name.static final intThe extension specification version.static final intExtendsVkStructureType.static final intExtendsVkStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidnvkCmdSetColorWriteEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int attachmentCount, long pColorWriteEnables) Unsafe version of:CmdSetColorWriteEnableEXTstatic voidvkCmdSetColorWriteEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int[] pColorWriteEnables) Array version of:CmdSetColorWriteEnableEXTstatic voidvkCmdSetColorWriteEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, IntBuffer pColorWriteEnables) Enable or disable writes to a color attachment dynamically for a command buffer.
-
Field Details
-
VK_EXT_COLOR_WRITE_ENABLE_SPEC_VERSION
public static final int VK_EXT_COLOR_WRITE_ENABLE_SPEC_VERSIONThe extension specification version.- See Also:
-
VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME
The extension name.- See Also:
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXTExtendsVkStructureType.Enum values:
- See Also:
-
VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT
public static final int VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXTExtendsVkStructureType.Enum values:
- See Also:
-
VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT
public static final int VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTExtendsVkDynamicState.- See Also:
-
-
Method Details
-
nvkCmdSetColorWriteEnableEXT
public static void nvkCmdSetColorWriteEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int attachmentCount, long pColorWriteEnables) Unsafe version of:CmdSetColorWriteEnableEXT- Parameters:
attachmentCount- the number ofVkBool32elements inpColorWriteEnables.
-
vkCmdSetColorWriteEnableEXT
public static void vkCmdSetColorWriteEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, IntBuffer pColorWriteEnables) Enable or disable writes to a color attachment dynamically for a command buffer.C Specification
To dynamically enable or disable writes to a color attachment, call:
void vkCmdSetColorWriteEnableEXT( VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32* pColorWriteEnables);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_EXTset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by theVkPipelineColorWriteCreateInfoEXT::pColorWriteEnablesvalues used to create the currently active pipeline.Valid Usage
- The
colorWriteEnablefeature must be enabled attachmentCountmust be less than or equal to themaxColorAttachmentsmember ofVkPhysicalDeviceLimits
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepColorWriteEnablesmust be a valid pointer to an array ofattachmentCountVkBool32valuescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a video coding scope
attachmentCountmust be greater than 0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas 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 - Parameters:
commandBuffer- the command buffer into which the command will be recorded.pColorWriteEnables- a pointer to an array of per target attachment boolean values specifying whether color writes are enabled for the given attachment.
- The
-
vkCmdSetColorWriteEnableEXT
public static void vkCmdSetColorWriteEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int[] pColorWriteEnables) Array version of:CmdSetColorWriteEnableEXT
-