shader: follow constant/uniform prefix terms, u32 products, and readfirstlane in wave sections #516
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!516
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-512"
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?
@Sheffy007 on GitHub · 2026-11-27 23:17 UTC · original
Sheffy007:feat/whole-wave-section-shapes→main· +494 −55 · 5 files · 1 commits · openSummary
Sym::K), uniform (Sym::Uni), and idempotent reduction (Sym::Red) active-lane terms inv_cndmask_b32inside whole-wave sections (for examplev_cndmask_b32 vdst, 0, s_stride, s_maskfor constant-stride prefix scans), as well as constant scalar lane-select masks (s_mov_b32/s_mov_b64of row or half bitmasks) without requiringEXECsaves/restores.wave - 1of aShape::Prefixinclusive scan) inLower::section_lanesso a constant-lanev_readlane_b32after the section evaluates the total reduction cleanly even when lanewave - 1was inactive before the section.WaveActiveProductreductions (v_mul_lo_u32ands_mul_i32, identity1) across single and split wave64 host waves (halves_reduce), while keeping prefix products refused.v_readfirstlane_b32under a known constantEXECmask (exec.trailing_zeros()) both inside a whole-wave section and immediately after one (Lower::section_rfl).Verification
victory_shader::emit::wave::tests:whole_wave_const_uniform_cndmask_const_masks_mulu_and_readfirstlane_lower(covering both wave64 single-wave andwave32_hostsplit-wave translation, plus negative refusal checks for prefix products and non-identity inactive inputs)victory_gpu::native::tests::split_wave_tests:whole_wave_const_uniform_prefixes_integer_products_and_readfirstlane_run_across_halvescargo test -p victory-hle -p victory -p victory-gpu -p victory-metal -p victory-shader -p xtaskcargo clippy --workspace --all-targets --target x86_64-pc-windows-gnullvm -- -D warningscargo clippy --workspace --all-targets --all-features --target x86_64-pc-windows-gnullvm -- -D warningscargo xtask policyCloses #512
Refs #4, #258
cc @Olima34
@Olima34 on GitHub · 2026-11-27 23:21 UTC · original
Thanks @Sheffy007, this is right on our current focus. We're now working on translator coverage, to get as many refused world shaders as possible to translate, and whole-wave sections are one of the larger families. We'll run #516 over our boot corpora (4,921 translated and 4,129 refused containers), by output fingerprint as for #468, and post gained / lost / changed per stage here. We'll also note the overlap with marcus-4's #442 and with your own #452 and #468 where they touch the same sections.
5f6f1fa60btob864cf7215@Olima34 on GitHub · 2026-11-28 01:31 UTC · original
Thanks for this PR! An offline check of
b864cf72, with no game run:Corpus sweep (
examples/sweep+tools/corpus/compare.sh), measured on maina6a58361, which translates shaders the same way as current main226645f9. Main → main + #516:No shader in these three sets has a whole-wave section of the kind #516 handles as its first refusal, so this is a no-regression check rather than a coverage measurement.
Checks: on an earlier main (
b998bb65) + #516, the tests (victory-gpu on arm64, victory-hle, victory, xtask, victory-shader), Windows clippy (-D warnings) andcargo xtask policyall pass. CI is green onb864cf72.Merging on
a6a58361:split_wave_tests.rs: both PRs add GPU tests at the same spot.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.