Repository navigation
Conversation
Host subgroup IDs wrap at eight on llvmpipe, so scalar VCC writes alias guest lanes 8-31. Use the workgroup index only when one host invocation carries one guest compute lane. Refs boykopovar#25298
Preserve the readback fixtures from a05bcb6.
Using the guest lane for every mask drops ballot-derived bits above the first host subgroup. Use it for scalar mask bit tests whose words do not depend on subgroup ballots.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
For Wave32 compute shaders split across Vulkan subgroups, scalar VCC or EXEC bit tests can repeat the low mask bits in each host subgroup. The fix uses
gl_LocalInvocationIndex % 32when the mask comes from dependencies that provide a complete scalar word. Ballot-derived masks and masks with uncertain lane mapping keep host subgroup indexing.The original literal-mask fixture and the two ballot and SCC regression fixtures are credited to mihiii1337. Original fixture · Regression fixtures
The separate 45-thread buffer-fed
ReadFirstLanecase still selects the wrong VCC bits with boykopovar#25660, including in the 13-lane partial wave. That case needs a follow-up that accounts for the workgroup exchange. Independent Windows resultsTested
Ubuntu 24.04 WSL2, GCC 13.3, Release, Mesa lavapipe (LLVM 20.1.2, subgroup size 8). Vulkan was required and shader and pipeline caches were disabled.
7bf7d80bf9, the literal mask read back as0xa5a5a5a5. With the previous PR headf432125076, the literal mask passed, but the ballot and SCC cases read back as0x000000a9and0x000000ff.446e5b0a132, the literal, ballot and SCC readbacks were0x96a596a5,0x7b36c4a9, and0xffffffff. All three passed three times on the PR head and three times when merged onto7bf7d80bf9. They also passed with SPIR-V optimization disabled. The user-data controls passed.VUID-diagnostics. Conventions and whitespace checks passed.No PS5 title or physical GPU was run in the author’s test.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)