Quick answer: Vulkan validation reporting feedback loop on input attachment? The attachment must be in INPUT_ATTACHMENT layout - transition before binding, not during.

Deferred lighting: input attachment is GBuffer color. Validation: feedback loop, write and read same attachment.

Transition before binding

Insert a VkImageMemoryBarrier with COLOR_ATTACHMENT_OPTIMAL -> SHADER_READ_ONLY_OPTIMAL before binding as input.

Or use subpass dependencies

VkSubpassDependency with srcSubpass writing color, dstSubpass reading input. The render pass framework handles barriers; less manual.

Verify in RenderDoc

Captured frame shows resource state per draw. A read in the wrong layout is highlighted in the resource panel.

“Vulkan layouts are explicit. Implicit layout transitions are a different API.”

Build a small render pass diagram for your pipeline. Once authored, it answers most layout-transition questions.