Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class EXTColorWriteEnable

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*

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.

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

Field Summary

Modifier and TypeField and Description
public static final int
public static final String
public static final int
VK_EXT_COLOR_WRITE_ENABLE_SPEC_VERSION

The extension specification version.

public static final int
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
nvkCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, int
the number of VkBool32 elements in pColorWriteEnables.
attachmentCount
,
long pColorWriteEnables)

Unsafe version of: CmdSetColorWriteEnableEXT

public static void
vkCmdSetColorWriteEnableEXT(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
IntBuffer
a pointer to an array of per target attachment boolean values specifying whether color writes are enabled for the given attachment.
pColorWriteEnables
)

Enable or disable writes to a color attachment dynamically for a command buffer.

public static void
vkCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, int[] pColorWriteEnables)

Array version of: CmdSetColorWriteEnableEXT

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXTback to summary
public static final int VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT

Extends VkDynamicState.

VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAMEback to summary
public static final String VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME

The extension name.

VK_EXT_COLOR_WRITE_ENABLE_SPEC_VERSIONback to summary
public static final int VK_EXT_COLOR_WRITE_ENABLE_SPEC_VERSION

The extension specification version.

VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXTback to summary
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXTback to summary
public static final int VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT

Extends VkStructureType.

Enum values:

Constructor Detail

EXTColorWriteEnableback to summary
protected EXTColorWriteEnable()

Method Detail

nvkCmdSetColorWriteEnableEXTback to summary
public static void nvkCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, int attachmentCount, long pColorWriteEnables)

Unsafe version of: CmdSetColorWriteEnableEXT

Parameters
attachmentCount:int

the number of VkBool32 elements in pColorWriteEnables.

vkCmdSetColorWriteEnableEXTback to summary
public static void vkCmdSetColorWriteEnableEXT(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_EXT set in VkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by the VkPipelineColorWriteCreateInfoEXT::pColorWriteEnables values used to create the currently active pipeline.

Valid Usage
Valid Usage (Implicit)
  • commandBuffer must be a valid VkCommandBuffer handle
  • pColorWriteEnables must be a valid pointer to an array of attachmentCount VkBool32 values
  • commandBuffer must be in the recording state
  • The VkCommandPool that commandBuffer was allocated from must support graphics operations
  • This command must only be called outside of a video coding scope
  • attachmentCount must be greater than 0
Host Synchronization
  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized
Command Properties
Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryBothOutsideGraphicsState
Parameters
commandBuffer:VkCommandBuffer

the command buffer into which the command will be recorded.

pColorWriteEnables:IntBuffer

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

vkCmdSetColorWriteEnableEXTback to summary
public static void vkCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, int[] pColorWriteEnables)

Array version of: CmdSetColorWriteEnableEXT