diff options
author | Samuel Pitoiset <[email protected]> | 2018-11-23 09:47:22 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-11-23 11:59:11 +0100 |
commit | 9fc1ce258cf956d21a9d4940a3c10c5547d93408 (patch) | |
tree | 2d1d5ce0bb4798d27a9e29d24c5856a69ad3340e /src/amd | |
parent | 2951a766bd9c2bc6ae01ab79f111c636d5ff3f6b (diff) |
radv: ignore subpass self-dependencies for CreateRenderPass() too
We really need to refactor this...
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_pass.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pass.c b/src/amd/vulkan/radv_pass.c index f8e5ea40954..b41ae89deec 100644 --- a/src/amd/vulkan/radv_pass.c +++ b/src/amd/vulkan/radv_pass.c @@ -180,7 +180,17 @@ VkResult radv_CreateRenderPass( } 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; |