You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Impeller] Vulkan sync validation: render pass incoming dependency doesn't cover a color attachment's LOAD loadOp #195696
ID Name: SYNC-HAZARD-READ-AFTER-WRITETrigger: vkCmdBeginRenderPass(): READ_AFTER_WRITE hazard detected: attachment loadOp access is not synchronized with the attachment layout transition. vkCmdBeginRenderPass reads the color aspect of attachment 0 (VkImageView 0x…) in subpass 0 of VkRenderPass 0x… (loadOp VK_ATTACHMENT_LOAD_OP_LOAD), which was previously written during an image layout transition initiated by the same command.The current synchronization allows VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT accesses at VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT, but to prevent this hazard, it must allow VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT accesses at VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT.
Analysis
A color attachment with LoadAction::kLoad is read by its loadOp at COLOR_ATTACHMENT_OUTPUT with COLOR_ATTACHMENT_READ access. The incoming VK_SUBPASS_EXTERNAL dependency in RenderPassBuilderVK::Build only lists eColorAttachmentWrite in dstAccessMask. So the attachment's layout transition, and any earlier writes, aren't made visible to the load. It probably also needs eColorAttachmentRead. Adding it locally gets rid of the hazard.
This is the color counterpart of the depth/stencil dstAccessMask gap in #194987 and #195599, in the same dependency. One fix may cover both.
Play/RendererTest.CachesRenderPassAndFramebufferMixed/Vulkan isn't in the sync validation shard (#195502). It could be added once this is fixed.
Activity
[Impeller] Cover color attachment loads in the Vulkan render pass inc…
[vulkan]: adds "color attachment read" dst dependency to subpass (flu…