aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_pass.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-11-20 13:48:34 +0100
committerSamuel Pitoiset <[email protected]>2018-11-21 10:02:59 +0100
commit457ac6ce1e2ba98d5c1afb9e78298fd8eb126b81 (patch)
treeb0be9528fe07e565d123ca28c723989cceb8da44 /src/amd/vulkan/radv_pass.c
parent8e73b5763448876010aee0c6fd7f59541179d080 (diff)
radv: ignore subpass self-dependencies
Unnecessary as they allow the app to call vkCmdPipelineBarrier() inside the render pass. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_pass.c')
-rw-r--r--src/amd/vulkan/radv_pass.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pass.c b/src/amd/vulkan/radv_pass.c
index 9cd1b31a0a0..f8e5ea40954 100644
--- a/src/amd/vulkan/radv_pass.c
+++ b/src/amd/vulkan/radv_pass.c
@@ -337,7 +337,17 @@ VkResult radv_CreateRenderPass2KHR(
}
for (unsigned i = 0; i < pCreateInfo->dependencyCount; ++i) {
+ uint32_t src = pCreateInfo->pDependencies[i].srcSubpass;
uint32_t dst = pCreateInfo->pDependencies[i].dstSubpass;
+
+ /* Ignore subpass self-dependencies as they allow the app to
+ * call vkCmdPipelineBarrier() inside the render pass and the
+ * driver should only do the barrier when called, not when
+ * starting the render pass.
+ */
+ if (src == dst)
+ continue;
+
if (dst == VK_SUBPASS_EXTERNAL) {
pass->end_barrier.src_stage_mask = pCreateInfo->pDependencies[i].srcStageMask;
pass->end_barrier.src_access_mask = pCreateInfo->pDependencies[i].srcAccessMask;