[Mesa-dev] [PATCH] radv: ignore subpass self-dependencies

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Tue Nov 20 19:30:59 UTC 2018


Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
On Tue, Nov 20, 2018 at 4:41 PM Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
> Unnecessary as they allow the app to call vkCmdPipelineBarrier()
> inside the render pass.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/amd/vulkan/radv_pass.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/src/amd/vulkan/radv_pass.c b/src/amd/vulkan/radv_pass.c
> index 9cd1b31a0a..f8e5ea4095 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;
> --
> 2.19.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list