Skip to content

Incorrect host access masks in pipeline barriers - #1097

Merged
dj2 merged 2 commits into
google:mainfrom
pingpongcat:main
Oct 6, 2025
Merged

Incorrect host access masks in pipeline barriers#1097
dj2 merged 2 commits into
google:mainfrom
pingpongcat:main

Conversation

@pingpongcat

Copy link
Copy Markdown
Contributor

Remove VK_ACCESS_HOST_READ_BIT and VK_ACCESS_HOST_WRITE_BIT from kMemoryBarrierForAll as these flags are only valid with VK_PIPELINE_STAGE_HOST_BIT, not VK_PIPELINE_STAGE_ALL_COMMANDS_BIT.

Problem discovered while fixing validation layers errors in VK-GL-CTS. Currently whitelisted in:

https://github.com/KhronosGroup/VK-GL-CTS/blob/main/external/vulkancts/scripts/src/vk-vvl-whitelist.json

        {
            "groups": [
                "dEQP-VK.ray_tracing_pipeline.amber.basic",
                "dEQP-VK.ray_tracing_pipeline.amber.basic2",
                "dEQP-VK.draw.renderpass.basic_draw.misc.flat_b_sat_error",
                "dEQP-VK.draw.renderpass.depth_bias.depth_bias_triangle_list_fill"
            ],
            "messages": [
                "VUID-vkCmdPipelineBarrier-srcAccessMask-02815",
                "VUID-vkCmdPipelineBarrier-dstAccessMask-02816"
            ],
            "description": "TODO report validation layers issue in google amber shader test framework. Amber tests use incorrect pipeline barrier access masks with VK_PIPELINE_STAGE_ALL_COMMANDS_BIT that include unsupported VK_ACCESS_HOST_READ_BIT and VK_ACCESS_HOST_WRITE_BIT flags"
        },

Remove VK_ACCESS_HOST_READ_BIT and VK_ACCESS_HOST_WRITE_BIT from
kMemoryBarrierForAll as these flags are only valid with
VK_PIPELINE_STAGE_HOST_BIT, not VK_PIPELINE_STAGE_ALL_COMMANDS_BIT
@google-cla

google-cla Bot commented Oct 3, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@dj2 dj2 added the kokoro:run label Oct 6, 2025
@dj2
dj2 merged commit 9482448 into google:main Oct 6, 2025
13 checks passed
@aleino-nv

Copy link
Copy Markdown

Didn't #1095 address this by including VK_PIPELINE_STAGE_HOST_BIT?

I'm not sure what happened to the git history, but for some reason the base of this PR does not include the change from PR1095.

I believe various calls of MemoryBarrier (for example in TransferImage) assume the host synchronization that PR 1095 adds, and this PR removes.

We found that PR 1095 resolves some CTS test failures for us, but I'm expecting that this PR would re-introduce them.

aleino-nv added a commit to aleino-nv/amber that referenced this pull request Aug 14, 2026
…" (google#1121)

This reverts commit 9482448.

The other way of resolving this is to add VK_PIPELINE_STAGE_HOST_BIT,
which was done in the preceeding commit to this file
(ab06e46).

That is prefereable because callers of MemoryBarrier assume that it
does host synchronization.
@dj2

dj2 commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Can you post a PR for your revert and I can land it?

@aleino-nv

Copy link
Copy Markdown

The PR is #1122

I see you already merged it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants