From b482c030f5ca3ac6631034a4ca7551f8f14dd2d5 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 29 Jan 2019 22:19:00 +0100 Subject: [PATCH] radv: accumulate all ingoing external dependencies to the first subpass In case two or more subpasses declare ingoing external dependencies. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_pass.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/amd/vulkan/radv_pass.c b/src/amd/vulkan/radv_pass.c index 0a37392322f..08ea2454750 100644 --- a/src/amd/vulkan/radv_pass.c +++ b/src/amd/vulkan/radv_pass.c @@ -42,6 +42,10 @@ radv_render_pass_add_subpass_dep(struct radv_render_pass *pass, if (src == dst) return; + /* Accumulate all ingoing external dependencies to the first subpass. */ + if (src == VK_SUBPASS_EXTERNAL) + dst = 0; + if (dst == VK_SUBPASS_EXTERNAL) { pass->end_barrier.src_stage_mask |= dep->srcStageMask; pass->end_barrier.src_access_mask |= dep->srcAccessMask; -- 2.30.2