Hello Triangle : subpass dependency

Hello,

I am reading the vulkan-tutorial (here I am : Rendering and presentation - Vulkan Tutorial).

I still have some problems using memory barrier or subpass dependency…

Why are we using only one dependency and not two? (one VK_EXTERNAL -> 0 and one 0 -> VK_EXTERNAL)

The second question is about accessMask. The author is using

dependency.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;

Since I juste want to write to the frame buffer, why should I use READ_BIT? WRITE_BIT is not enough?
Validation layers don’t help me for that :confused:

Thank :slight_smile:

I maybe have an idea.

The first question is only because it is an error from the author (since Sascha Willem use 2dependencies as well).
The second question is maybe because we want to read the color buffer because the “blending” should occur?

Am i right?