On Wednesday 27 June 2018, Bas Nieuwenhuizen wrote: > Don't we still need this when having layout transitions?
I think the answer is probably yes, though I haven't noticed any regressions with this patch. I'll post an updated version that takes transitions into account. > On Tue, Jun 26, 2018 at 11:49 PM, Fredrik Höglund <fred...@kde.org> wrote: > > The Vulkan specification says: > > > > "An execution dependency with only VK_PIPELINE_STAGE_BOTTOM_OF_- > > PIPE_BIT in the destination stage mask [...] does not delay > > processing of subsequent commands." > > > > Cc: <mesa-sta...@lists.freedesktop.org> > > Signed-off-by: Fredrik Höglund <fred...@kde.org> > > --- > > src/amd/vulkan/radv_cmd_buffer.c | 3 ++- > > src/amd/vulkan/radv_pass.c | 6 ++++-- > > 2 files changed, 6 insertions(+), 3 deletions(-) > > > > diff --git a/src/amd/vulkan/radv_cmd_buffer.c > > b/src/amd/vulkan/radv_cmd_buffer.c > > index 110a9a960a9..5bfcba28d83 100644 > > --- a/src/amd/vulkan/radv_cmd_buffer.c > > +++ b/src/amd/vulkan/radv_cmd_buffer.c > > @@ -4197,7 +4197,8 @@ void radv_CmdPipelineBarrier( > > image); > > } > > > > - radv_stage_flush(cmd_buffer, srcStageMask); > > + if (destStageMask != VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT) > > + radv_stage_flush(cmd_buffer, srcStageMask); > > cmd_buffer->state.flush_bits |= src_flush_bits; > > > > for (uint32_t i = 0; i < imageMemoryBarrierCount; i++) { > > diff --git a/src/amd/vulkan/radv_pass.c b/src/amd/vulkan/radv_pass.c > > index 15fee444cdc..7a0dca09496 100644 > > --- a/src/amd/vulkan/radv_pass.c > > +++ b/src/amd/vulkan/radv_pass.c > > @@ -174,11 +174,13 @@ VkResult radv_CreateRenderPass( > > for (unsigned i = 0; i < pCreateInfo->dependencyCount; ++i) { > > uint32_t dst = pCreateInfo->pDependencies[i].dstSubpass; > > if (dst == VK_SUBPASS_EXTERNAL) { > > - pass->end_barrier.src_stage_mask = > > pCreateInfo->pDependencies[i].srcStageMask; > > + if (pCreateInfo->pDependencies[i].dstStageMask != > > VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT) > > + pass->end_barrier.src_stage_mask = > > pCreateInfo->pDependencies[i].srcStageMask; > > pass->end_barrier.src_access_mask = > > pCreateInfo->pDependencies[i].srcAccessMask; > > pass->end_barrier.dst_access_mask = > > pCreateInfo->pDependencies[i].dstAccessMask; > > } else { > > - pass->subpasses[dst].start_barrier.src_stage_mask = > > pCreateInfo->pDependencies[i].srcStageMask; > > + if (pCreateInfo->pDependencies[i].dstStageMask != > > VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT) > > + > > pass->subpasses[dst].start_barrier.src_stage_mask = > > pCreateInfo->pDependencies[i].srcStageMask; > > pass->subpasses[dst].start_barrier.src_access_mask > > = pCreateInfo->pDependencies[i].srcAccessMask; > > pass->subpasses[dst].start_barrier.dst_access_mask > > = pCreateInfo->pDependencies[i].dstAccessMask; > > } > > -- > > 2.17.0 > > > > _______________________________________________ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev