From: Samuel Pitoiset Date: Tue, 29 Jan 2019 21:18:59 +0000 (+0100) Subject: radv: handle subpass dependencies correctly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eaab35e5e328eec06bc5012624ee3585aa209c29;p=mesa.git radv: handle subpass dependencies correctly The different masks should be accumulated. For example if two subpasses declare an outgoing dependency (ie. dst == VK_SUBPASS_EXTERNAL). Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_pass.c b/src/amd/vulkan/radv_pass.c index 4d9fb0bf7df..0a37392322f 100644 --- a/src/amd/vulkan/radv_pass.c +++ b/src/amd/vulkan/radv_pass.c @@ -43,13 +43,13 @@ radv_render_pass_add_subpass_dep(struct radv_render_pass *pass, return; if (dst == VK_SUBPASS_EXTERNAL) { - pass->end_barrier.src_stage_mask = dep->srcStageMask; - pass->end_barrier.src_access_mask = dep->srcAccessMask; - pass->end_barrier.dst_access_mask = dep->dstAccessMask; + pass->end_barrier.src_stage_mask |= dep->srcStageMask; + pass->end_barrier.src_access_mask |= dep->srcAccessMask; + pass->end_barrier.dst_access_mask |= dep->dstAccessMask; } else { - pass->subpasses[dst].start_barrier.src_stage_mask = dep->srcStageMask; - pass->subpasses[dst].start_barrier.src_access_mask = dep->srcAccessMask; - pass->subpasses[dst].start_barrier.dst_access_mask = dep->dstAccessMask; + pass->subpasses[dst].start_barrier.src_stage_mask |= dep->srcStageMask; + pass->subpasses[dst].start_barrier.src_access_mask |= dep->srcAccessMask; + pass->subpasses[dst].start_barrier.dst_access_mask |= dep->dstAccessMask; } }