vkCmdSetAttachmentFeedbackLoopEnableEXT(3)

# vkCmdSetAttachmentFeedbackLoopEnableEXT(3) Manual Page

## Name

vkCmdSetAttachmentFeedbackLoopEnableEXT - Specify whether attachment feedback loops are enabled dynamically on a command buffer

## C Specification

To dynamically set whether a pipeline can access a resource as a non-attachment while it is also used as an attachment that is written to, call:

    // Provided by VK_EXT_attachment_feedback_loop_dynamic_state
    void vkCmdSetAttachmentFeedbackLoopEnableEXT(
        VkCommandBuffer                             commandBuffer,
        VkImageAspectFlags                          aspectMask);

## Parameters

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

- `aspectMask` specifies the types of attachments for which feedback loops will be enabled. Attachment types whose aspects are not included in `aspectMask` will have feedback loops disabled.

## Description

For attachments that are written to in a render pass, only attachments with the aspects specified in `aspectMask` can be accessed as non-attachments by subsequent drawing commands.

Valid Usage

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-attachmentFeedbackLoopDynamicState-08862
  The `attachmentFeedbackLoopDynamicState` feature must be enabled

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-aspectMask-08863
  `aspectMask` must only include VK_IMAGE_ASPECT_NONE, VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_ASPECT_DEPTH_BIT, and VK_IMAGE_ASPECT_STENCIL_BIT

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-attachmentFeedbackLoopLayout-08864
  If the `attachmentFeedbackLoopLayout` feature is not enabled, `aspectMask` must be VK_IMAGE_ASPECT_NONE

Valid Usage (Implicit)

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-aspectMask-parameter
  `aspectMask` must be a valid combination of VkImageAspectFlagBits values

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

- VUID-vkCmdSetAttachmentFeedbackLoopEnableEXT-videocoding
  This command must only be called outside of a video coding scope

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 Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State

Conditional Rendering

vkCmdSetAttachmentFeedbackLoopEnableEXT is not affected by conditional rendering

## See Also

VK_EXT_attachment_feedback_loop_dynamic_state, VkCommandBuffer, VkImageAspectFlags

## Document Notes

For more information, see the Vulkan Specification.

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0