Upload of a reasonably minimal complete main.rs file that demonstrates the issue: feedback_loop.rs
Issue
When using feedback loop attachments (the same attachment referenced as both an input and a color attachment within a subpass), race conditions abound without any error from vulkano. Namely, two draw* commands with a pipeline that utilizes a feedback loop are not separated by a vkPipelineBarrier as they should be, confirmed using RenderDoc.
Note that this does not concern a single draw* touching the same sample multiple times, which is still a race condition under this configuration but falls under "general shader unsafety." Instead, multiple distinct draws within the same subpass should not display racing behavior, with barriers inserted between draw commands that write to the attachment and draw commands that read from it.
Results of running feedback_loop.rs on my system: (Expected behavior is a solid green triangle on blue background.)
main.rs
file that demonstrates the issue: feedback_loop.rsIssue
When using feedback loop attachments (the same attachment referenced as both an input and a color attachment within a subpass), race conditions abound without any error from vulkano. Namely, two
draw*
commands with a pipeline that utilizes a feedback loop are not separated by avkPipelineBarrier
as they should be, confirmed using RenderDoc.Note that this does not concern a single
draw*
touching the same sample multiple times, which is still a race condition under this configuration but falls under "general shader unsafety." Instead, multiple distinct draws within the same subpass should not display racing behavior, with barriers inserted between draw commands that write to the attachment and draw commands that read from it.Results of running![image](https://github.com/vulkano-rs/vulkano/assets/19513659/df753b96-08e8-49ad-9d79-d039fc909049)
feedback_loop.rs
on my system: (Expected behavior is a solid green triangle on blue background.)