Bug 110923

Summary: Multiple VkSubpassDependency-entries with the same dstSubpass not handled correctly
Product: Mesa Reporter: Christian Forfang <chris.forfang>
Component: Drivers/Vulkan/radeonAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: chris.forfang
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Christian Forfang 2019-06-14 21:50:11 UTC
Looking at [1], it seems like if VkRenderPassCreateInfo->pDependencies has multiple entries with the same value for dstSubpass then each entry will overwrite the effects of the previous.

Take [2] as an example; in this case pass->subpasses[0].start_barrier.src_stage_mask appears to end up as pDependencies[1].srcStageMask instead of the seemingly correct (pDependencies[0].srcStageMask | pDependencies[1].srcStageMask).

In other words, as the entries in pDependencies are considered the masks should be OR-ed, not assigned.

[1] https://github.com/intel/external-mesa/blob/a749ad9d7d8558c8b085e0484a91d83ca84d9db2/src/amd/vulkan/radv_pass.c#L366
[2] https://github.com/KhronosGroup/Vulkan-Tools/blob/b99797641e8275e31557b3eb0610e9d282f96c35/cube/cube.c#L1896
Comment 1 Samuel Pitoiset 2019-06-17 07:35:45 UTC
Hi,

Yes, this is correct and this has been fixed a while ago. See

commit eaab35e5e328eec06bc5012624ee3585aa209c29
Author: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Date:   Tue Jan 29 22:18:59 2019 +0100

    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 <samuel.pitoiset@gmail.com>
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Comment 2 Christian Forfang 2019-06-17 08:02:18 UTC
Ah, I didn't realize the mirror I was looking looking at didn't have an up-to-date radv. Sorry for the noise :)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.