On Thu Apr 6 11:50:42 2023 +0000, Giovanni Mascellani wrote:
My understanding from the "Remarks" section in https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12com... is this: suppose you create a command list that paints a resource all red and another one that paints the same texture all green. If you submit the two command lists with two separate `ExecuteCommandLists()` invokations, then you're sure the resource will be painted in whatever color is submitted last; if instead you submit with a single `ExecuteCommandLists()` invokation, then you don't know. I am not sure what would be the weakest Vulkan memory barrier that guarantees whatever D3D12 guarantees, though, but my feeling is that we'd need a fairly strong one.
To add a side note: this is why [implicit state transitions](https://learn.microsoft.com/en-us/windows/win32/direct3d12/using-resource-ba...) work. No actual barriers are needed because writes are already guaranteed complete. In vkd3d we will need to add Vulkan layout transitions for these cases, but no memory barriers.