Shaders: lower row permutations on wave32 hosts #40
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/fxceless--victory-fork!40
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-40"
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?
@jaschinski97-ops on GitHub · 2026-11-24 20:48 UTC · original
jaschinski97-ops:fix/permlane-compute→main· +504 −0 · 3 files · 2 commits · openThe translator rejects ordinary
v_permlane16_b32andv_permlanex16_b32instructions outside recognized whole-wave reduction patterns.v_permlanex16_b32is among the outstanding translation failures reported in #26 and the RTX 3080 report in #22.This change lowers both instructions to DXIL row selection and lane reads, including both runtime selector words, EXEC, fetch-inactive, bound-control and aliased source/destination registers. It also marks the instructions as requiring console lane layout, allowing the existing Wave64-on-Wave32 path to handle their 32-lane-local permutations. Fetch-inactive inside a divergent host branch remains explicitly unsupported because the absent invocations' last VGPR values are unavailable. Cross-lane use outside compute retains its existing rejection.
Validation on Windows 11 / NVIDIA RTX 3080 (driver 32.0.16.2140), Rust 1.98.1, Windows GNU target with a local LLVM/MinGW linker:
cargo test --locked -p victory-shader --lib -- --test-threads=1: 212 passed, 0 failed, 2 existing ignored tests.cargo clippy --locked -p victory-shader --all-targets --features diagnostics,host -- -D warnings: clean.cargo xtask policy: 170 files OK.git diff --check: clean.diagnostics,hostand-D warningsand the asset policy pass. The two changes combine without conflicts.No title data or shader dumps are included. No gameplay, performance or native Wave64-device validation was performed; this addresses a translation gap rather than demonstrating that the title is playable. Instruction semantics follow AMD's RDNA 2 ISA, section 12.12: https://docs.amd.com/v/u/en-US/rdna2-shader-instruction-set-architecture
AI-assisted contribution with Codex; code and synthetic hardware tests run locally.
Additional independent review found that per-lane loop-limit returns can bypass later reconvergence. Commit
39f1717adds a dedicated FI participation analysis including those synthetic return edges, leaving the existing LDS/split-wave analysis unchanged. The new loop-abort case fails before the correction and passes afterwards; all four control-flow regression tests and shader Clippy (all targets/all features, warnings denied) pass. The GPU matrix reported above was run for the original change. No game test is claimed.@rostaddotcc on GitHub · 2026-11-24 21:20 UTC · original
Verified at
4d3aaabon a Linux host (CachyOS, x86-64):cargo test -p victory-shader— 171 passed, 0 failed, 2 ignored.cargo test -p victory-pipeline— 4 passed.cargo xtask policy— 169 files ok.cargo xwin build --release -p victory --target x86_64-pc-windows-msvc— clean.But the two new tests did not run.
crates/victory-shader/src/emit/mod.rs:94registersmod permlane_tests;under#[cfg(all(test, windows))], and the module importssuper::validator, which is itself#[cfg(windows)]. The test list on this host is 173 entries both before and after the patch, so nothing frompermlane_tests.rsexecuted here — the build is all a Linux machine can add for this PR.That gate looks stricter than the code needs.
permlane_tests.rs:110-116already tolerates a missing validator:so the lowering assertions would run on any platform; only the validation step needs
dxil.dll. If thevalidatorimport were#[cfg(windows)]with a no-op shim elsewhere,mod permlane_tests;could be#[cfg(test)]and these two tests would run in a Linux CI — which is the only place a wave32 lowering change can be tested without a 32-lane GPU.Since I cannot run them: is the row-permutation rewrite exercised by anything that does run off Windows, e.g. a
translatecase that checks the emitted container bytes? If not, the "fixes #26/#22" claim rests on a test that only Windows CI can see.@adriaespii on GitHub · 2026-11-24 21:23 UTC · original
Independent test run on commit
4d3aaab(AMD RDNA4):x86_64-pc-windows-msvc)cargo clippy --workspace --all-targets -- -D warnings: 0 warningscargo test --workspace: 498 passed, 0 failed, 7 ignored (victory-shader: 212 passed, 0 failed, 2 ignored;victory-gpu: 110 passed, 0 failed, 1 ignored)AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report.
@arminkhaleghirod on GitHub · 2026-11-24 21:23 UTC · original
Ran
victory translate --validateover the full title on an RTX 4080 (Windows 11), main90228a7vs this PR. All 26,148 programs on both.The only change is the one
v_permlanex16_b32failure, which is gone. Every other failure reason has the same count, and nothing new appears. Total failure lines: 17,907 → 17,906.@Mesrine67 on GitHub · 2026-11-24 22:00 UTC · original
Independent targeted run on the current PR head
39f1717a9366295726b105a5900269bad33ba3b7:cargo test --locked --offline -p victory-shader --lib permlane_ -- --nocapture --test-threads=132..64, and the test printedall row and EXEC cases passed on hardware. The 4-lane WARP adapter was skipped by the test's capability guard.This validates the translator's synthetic cases on RDNA2; it does not test the game or establish gameplay/performance.
@Mesrine67 on GitHub · 2026-11-24 22:12 UTC · original
Integration test against the latest fork main fetched for this review.
39f1717a932119b0e44c. The PR API still reports base4e17478b9c, so I tested the combined tree locally rather than changing the author's branch.Full sanitized log: https://gist.github.com/Mesrine67/4b0a982a3a078aaad1a8d0a45695b892
No game executable was launched; these are shader/runtime tests only. The PR branch and fork main were not modified or pushed.
@Mesrine67 on GitHub · 2026-11-24 23:39 UTC · original
Fresh local rerun on 2026-11-25 at PR head
39f1717a9366295726b105a5900269bad33ba3b7:cargo test --locked --offline -p victory-shader --lib permlane_ -- --nocapture --test-threads=1: 5 passed, 0 failed. The hardware adapter reported wave lanes32..64and passed the row/EXEC matrix; WARP reported4..4and skipped the two-row GPU checks as expected.cargo test --locked --offline -p victory-shader --lib -- --test-threads=1: 215 passed, 0 failed, 2 ignored.cargo clippy --locked --offline -p victory-shader --all-targets --features diagnostics,host -- -D warnings: clean.cargo xtask policy: 170 files OK.These are translator and synthetic GPU tests only; no game executable was launched and no gameplay or performance result is claimed.
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.