Class EXTColorWriteEnable

java.lang.Object
org.lwjgl.vulkan.EXTColorWriteEnable

public class EXTColorWriteEnable extends Object
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.

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 Details

  • Method Details

    • nvkCmdSetColorWriteEnableEXT

      public static void nvkCmdSetColorWriteEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int attachmentCount, long pColorWriteEnables)
      Unsafe version of: CmdSetColorWriteEnableEXT
      Parameters:
      attachmentCount - the number of VkBool32 elements in pColorWriteEnables.
    • 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_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 - 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.
    • vkCmdSetColorWriteEnableEXT

      public static void vkCmdSetColorWriteEnableEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int[] pColorWriteEnables)
      Array version of: CmdSetColorWriteEnableEXT