perf(mesh): fold literal Wave32 lane counts to the console lane index #656
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/lobomfz--VIctory-xmem!656
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-656"
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?
@tommiehansen on GitHub · 2026-12-06 01:11 UTC · original
tommiehansen:perf/phase13-mesh-lane-count-20261206→main· +194 −4 · 4 files · 9 commits · draftWhy
Mesh-heavy workloads can spend substantial GPU time on geometry preparation and export (#293, #74). The translated all-ones Wave32 v_mbcnt_lo reconstructs a lane index using bit-mask arithmetic and population count, even though the console lane is already available in the mesh shader.
What changes
Opt-in VICTORY_MESH_LANE_COUNT=1 replaces only the literal all-ones Wave32 guest mesh count with console lane + src1. Other masks, guest Wave64, and other stages keep their original translation. Cache identity is separated for the opt-in. This does not change vertex/primitive counts, culling or exports, and is independent of #469.
Benchmark results
Matched production DXIL -> SPIR-V -> pinned Mesa RADV/ACO compiler audit 47589861252, 36 compiler cases, 18 pairs (plain, edge, cull x Navi31/GFX1200/GFX1201 x host wave32/64).
Guest admission is Wave32 in both rows; host compiler wave selection is separate. Register allocation, LDS, scratch and occupancy estimates unchanged; no spills. These are compiler statistics, not elapsed GPU timing or gameplay FPS. Real-title frequency and larger shader coverage are unknown.
Why this should be merged
Removes proven redundant arithmetic without altering rendering quality or semantics; exact output preserved in the tested shapes, and unsupported cases retain the baseline.
Validation
Isolated upstream-base CI 47591505348: Linux 309 tests passed; Windows three exact WARP rendered image comparisons and two byte-identical rejected guest-wave/mask controls; all-targets production check passed. The AMD compiler audit is on the earlier BTD audit branch with identical production lower.rs; no new final-head AMD audit claimed. No physical GPU execution measured.
Compatibility and dependencies
Clean main-based candidate, no dependency on #469, disabled by default. Need representative real shader corpus coverage and physical AMD timing before promotion; exact fallback retained.
Final-head validation and occurrence census
5917d4a: CI 47592893535 passed Linux and Windows, with seven exact WARP mesh renders (including constant and varying src1, masked EXEC and two guest waves) and two byte-identical rejection controls. Diagnostics-onlyVICTORY_MESH_LANE_CENSUS=1reports translated opportunities/eligibility, not GPU invocation frequency. The exact final-head DXIL artifact is used by expanded ACO audit 47593329716, completed 84 compilations / 42 matched pairs. All 42 pairs remove three instructions and 20 code bytes, without changes in SGPR/VGPR allocation, LDS, scratch or estimated occupancy; zero spills. Six shapes: host wave32 19→16, wave64 30→27; two-guest-waves: host wave32 32–33→29–30, wave64 28→25. These are compiler statistics, not elapsed GPU timing. Raw artifact 15963688519. Draft remains pending representative shader coverage and physical AMD timing.Combined Wave32/Wave64 validation
CI 47595204584 passed Linux and Windows on the isolated PRC integration branch: all four switch-combination compatibility controls exact, separate guest-wave admission/cache identity and four Wave64 rendering oracles exact with the Wave32 flag enabled. The shared diagnostics distinguish guest widths; synthetic counts are not title frequency. Both candidates remain default-off drafts pending representative shader coverage and physical AMD execution.
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.