KhronosGroup / KhronosGroup/Vulkan-Docs

Clarify VUID-vkCmdPipelineBarrier2-pDependencies-02285

Open
#1,982 0 comments 0 reactions 1 assignee Claimed by @spencer-lunarg View on GitHub
Dominant language
JavaScript
Stars
3.3k
Forks
549
Avg merge
5d 5h
Merged PRs (30d)
2

Description

This VUID currently says:
> If `vkCmdPipelineBarrier2` is called within a render pass instance, the render pass **must** have been created with at least one [VkSubpassDependency](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkSubpassDependency.html) instance in `VkRenderPassCreateInfo::pDependencies` that expresses a dependency from the current subpass to itself, with [synchronization scopes](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPipelineBarrier2KHR.html#synchronization-dependencies-scopes) and [access scopes](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdPipelineBarrier2KHR.html#synchronization-dependencies-access-scopes) that are all supersets of the scopes defined in this command

I'm uncertain about how this should be interpreted. There's two possible readings, that I can see:
- Let there be four values representing the union of all src/dst stage and access masks of all barriers in the command. There must exist at least one subpass self-dependency for which the src/dst stage and access masks are supersets of these values.
- For every barrier in the command individually, there must exist at least one subpass self-dependency for which the src/dst stage and access masks are supersets of the values of that one barrier.

In other words, can each barrier be paired with a different subpass self-dependency, or must every barrier be pairable with a single subpass self-dependency that is compatible with all of them at once?

The validation layer seems to take the second approach, but initially I interpreted it the first way. Additionally, I noticed that the validation layer checks for matching dependency flags as well. The VUID text makes no mention of that. Is the validation too eager or is that missing from the VUID?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.