Repository navigation
Conversation
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified against origin/main (940d32f) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP:
- Resolving tracked lane masks in data phis via
mask_dwordand lazily evaluating SCC written by mask/EXECsops ((lo | hi) != 0) underMaskData::Consolecleanly unblocks both patterns without disturbing non-console lowering. cargo test -p victory-shader emit::lower::tests: 23/23 passed on RTX 5090, 23/23 passed on WARP (includingdata_phi_joining_tracked_lane_mask_lowers_in_computeandsaveexec_scc_read_by_cselect_lowers_in_compute).cargo clippy -p victory-shader --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 183 files ok.
AI-assisted (Gemini 4 Neon).
Offline measurement on a retail dumpResult: +4 programs over I merged head e721355 onto
Another 40 programs move from "a register joining a lane mask and data, read as data" on to "a lane-mask join of an untracked mask". They still fail, but no longer at the data join this PR targets. No shader names or data are included, per the asset policy. AI-assisted (Claude Code). |
catminou4
left a comment
There was a problem hiding this comment.
Tested locally: merged into main 940d32f, cargo test -p victory-shader --locked on macOS arm64 — 146 passed, 0 failed, 2 ignored (Windows-gated hardware execution tests not run here). Approving — tracked lane masks resolved in data phis and lanes.
|
Automated triage for the maintainers. Merge candidate (worth a look). New head since the last review. Besides letting
SCC = (new EXEC != 0) follows the RDNA 2 ISA entries cited in this thread. The commit credits tyr0nsur as co-author. CI On your reply: the requested pieces are here, so the verdict changes. The RTX 5090 approval you mention is not in this thread, so I have not counted it. Generated by Claude Code |
|
We ran the two numeric readbacks requested in triage on a desktop RTX 4060. The saveexec fixture narrows EXEC, uses There is an extra requirement in this path. Before propagating the required wave size, WARP ran the wave32 shader in four-lane groups. For mask Source-authored readbacks and compiler changes · AMD RDNA 2 ISA |
|
Thanks @tyr0nsur for the rigorous hardware readbacks on RTX 4060 and for citing AMD RDNA 2 ISA §6.2 / S_AND_SAVEEXEC semantics ( The verification that wave32 readbacks match CPU reference across empty, irregular, and single-high-bit masks directly resolves the automated triage question on SCC correctness. The wave-size propagation insight for four-lane WARP execution and wave64 ballot pairs also aligns cleanly with the wave constraint handling in #2194. With @DenRakEiw's approval on RTX 5090 and these hardware readbacks confirming value semantics on RTX 4060, #2289 is fully verified for merge. |
… tests Propagate required console wave size to shaders that read mask-derived SCC (from mask/EXEC sop instructions) and data phis joining masks with numbers. Add wave_lanes query on Host device to check adapter wave lane counts. Add executed synthetic value readback tests across wave32 and wave64 for saveexec SCC evaluation and data phis joining tracked masks with numbers. Co-authored-by: tyr0nsur <tyr0nsur@users.noreply.github.com>
|
Updated in 1. Wave-size propagation (
|
|
Automated triage for the maintainers, second look (a review against current Closing because it overrides a deliberate rule in If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution. |
|
A data point for the rework the triage asks for: one SCC case where this head ( Where it comes from. The four Test (wave32, with this PR's Expected for a = all lanes, b =
Both devices agree, so it is the translation: the I did not separate which part of the PR gives the 1 (the waterfall's SCC, or the join it reaches). The test is AI-assisted (Claude Code). No game data attached. |
Summary
Addresses the remaining
a lane mask read as datafailure modes discussed in #2268:fill_phis): When a scalardata_phiin a compute shader (MaskData::Console) receives a tracked lane mask (inst.masksorst.highs),fill_phispreviously readself.vals(which heldVal::Missing(LANE_MASK)) instead of materializingself.mask_dword(arg).SCCfrom mask/EXECsopinstructions: When a computesopwritesEXECor a tracked lane mask alongsideSCC(e.g.s_and_saveexec_*),sopnow records the result mask inscc_masksand evaluates(lo | hi) != 0lazily inget/fill_phisonly ifSCCis read as data (so instructions whereSCCis unused emit zerowaveActiveBallot/WAVE_OPS).Synthetic tests
data_phi_joining_tracked_lane_mask_lowers_in_computeandsaveexec_scc_read_by_cselect_lowers_in_computeincrates/victory-shader/src/emit/lower.rs.cargo test -p victory-shader --lib emit::lower::tests::— 23 passed, 0 failedcargo clippy -p victory-shader --all-targets -- -D warnings— 0 warningscargo xtask policy— 182 files ok