Shaders: assign distinct console IDs to packed compute waves #236
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/236"
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?
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by loyodea on 2026-11-26T08:01:59Z.
Related to #216. In eligible multidimensional compute groups, use one shared counter to give each full host wave a distinct wave-aligned range of console IDs. A dense partial wave takes the tail. Native lane indices, threadgroup dimensions, and in-wave operations stay intact. The previous mapping is used for unsupported occupancy and other excluded paths.
Tested
Eligible groups gain two group barriers, one atomic per host wave, and one groupshared dword. Gameplay impact, other drivers, and performance remain unverified. The tests use synthetic programs. Codex contributed the implementation and verification.
CI follow-up
The follow-up commit makes the test's LDS-unit shift explicit. The focused multidimensional regression passed all eight cases on the RX 9060 XT with Rust 1.98.1. Clean upstream main also reproduces the ten inherited shader Clippy diagnostics.
Review follow-up
The same ID collision also appeared in the split-wave path on main. In a synthetic 32×2 dispatch, both host waves used IDs 0–31. With the follow-up, the existing counter gives each split half its own 32-lane block.
On an RX 9060 XT using the forced 32-lane host path and DXIL validation, all four split-wave shapes and all eight native-wave shapes passed. The serial shader suite reported 279 passed and six ignored. Four compiler-dependent cases returned early. These tests used synthetic inputs. The separate a-publier implementation is #442.
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by adrianmjim on 2026-11-26T21:42:20Z.
Tested #236 at
df09987(basemain@4f62c2a) on an RX 7900 XT (Windows 11, driver 32.0.32029.2010). This builds on the probe and census in #216.Probe
4f62c2aand pass with the PR.Archive (translate --validate --list, compared per program)
--host-lanes 32-64: 27 compute programs change, nothing else. They are exactly the 27 from the #216 census. All 27 validate and create pipelines on the 7900 XT.--host-lanes 32-32: only 3 of the 90 from the census change (CS_GatherRaymarchedLocalLights and the two CS_TAA2_Resolve).split), whichconsole_thread_prologueskips. 85 are 8x8 and 2 are 4x4x4. They keep the rounding.Split halves
splithas to stay on the rounding?Other checks
Not tested: no game run (the game is not on this machine), no NVIDIA card, no performance numbers.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.