Shaders: console threads of 2-D groups on NVIDIA from a group counter (port of Vice-Tay c125c0c, #1243) #30
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!30
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-30"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@regiumlepidi on GitHub · 2026-11-27 10:24 UTC · original
regiumlepidi:pr-thread-ticket→main· +125 −9 · 3 files · 2 commits · merged 2026-11-27 13:40 UTCWhat
On NVIDIA, a translated program with console lanes (
v_mbcnt, DPP, permlane…) in a compute group larger than one host wave could hand the same console thread ids to two host waves. NVIDIA (and RDNA in 32-lane waves) fill 2-D groups from 16 × 2 tiles, so the host wave's first flat id rounded down to the wave size is not a wave-aligned base: in a 32 × 2 group both waves round down to the same base, and half of the group's threads get the other half's ids (fxceless/victory-fork issue #1243).This is a port of Vice-Tay's fix (
c125c0c, author Garu667) to this tree:wave_base), as wave64-in-halves programs already did; a full wave takes the next aligned block from the low 16 bits, a partial wave its lane count from the high 16 bits past the full blocks, so it cannot shift a full wave off its alignment;VICTORY_THREAD_TICKET=0restores the old rounding; the switch is part of the shader cache key.The code around
wave_basediffers from Vice-Tay's tree (thepairsmeeting counters here), so this was merged by hand, not cherry-picked.Measured
The ported hardware test (
the_console_threads_of_a_two_dimensional_group_are_each_given_once, a console wave32 program in a 32 × 2 group storing 1 at dword 32y + x), on an RTX 5070 Ti (driver 617.42):So on Blackwell the old path really loses half of such a group's work.
cargo test -p victory-shader: 289 passed, 0 failed.cargo clippyreports nothing in the touched files. (Twovictory-gputests,indirect::tests::host_list_budget_starts_empty_at_each_submissionandwarp_batch_charges_every_execution, fail onmainas well, with or without this change.)In game (Series X, 1440p, DLSS Quality) it runs without new errors or refused pipelines. I have not yet been able to tie it to one visible artifact by A/B, so I'm not claiming a specific visual fix — the test above is the evidence.
Notes
🤖 Generated with Claude Code
@rafaconvaitis on GitHub · 2026-11-27 16:15 UTC · original
Validated the two-dimensional compute group fixture on a native Windows 11 build 26300 with a GeForce RTX 4070 12 GB and driver 616.64. I ported the thread-ticket change onto Foxhound v0.2.0-pre.2 (
9f8838b1) and ranthe_console_threads_of_a_two_dimensional_group_are_each_given_onceagainst both lowering paths on the hardware device.The fixture passed and reproduces the mapping correction on Ada. This comparison uses generated inputs.