Shaders: a lane mask's high dword is the pair's own #3926
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3926"
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 Marvisak/VIctory. Originally posted by kotekompotek on 2026-12-01T03:27:39Z.
Summary
Two fixes to paired lane-mask tracking on wave32:
c027a6a: a lane mask's high dword is the pair's own — previously the high dword was guessed from the register next to the low one, which misidentified pairs when the console compiler allocated non-adjacent halves.5b737de: the translate pass counts an opaque mask through its two-field pattern, so the stats cover masks written via pair operations.With these, console lane masks held as 64-bit pairs resolve to the right lanes; the remaining consumers (pixel-stage EXEC traffic through
_b64ops) are fixed in #3924.Test plan
cargo test -p victory-shadersuite green.ce047486and friends translate; the mask consumers render.AI-assisted change.
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-12-01T12:23:49Z.
Verification of this PR (AI-assisted: Hy4 flash), source only, no game data.
Windows / rustc 1.100.0 / MSVC. Worktree at head
5b737dea, dedicated per-worktree CARGO_TARGET_DIR (D:\Victory-Contrib\target-3926), nothing shared.Negative control on base
63bcca43:git grep -F a_half_written_mask_tests_its_high_dword 63bcca43 -- .-> exit 1 (test is new).Whitespace:
git diff --check 63bcca43..5b737dea-> exit 0, clean.->
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 305 filtered out, exit 0.Note: the test lives in
crates/victory-shader/src/emit/valu_tests.rs, declared asmod valu_tests;at emit/mod.rs:228, so the filter needs theemit::prefix —valu_tests::<name>alone matches 0 tests.GPU/driver: N/A (lowering test, opens no device).
Verdict: PASS for the new synthetic test on this host.
Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-12-01T14:03:11Z.
I added a source-register control at
5b737dea. The mask consumer readss[12:13], copied froms20ands26. With the low half fixed, I independently toggled the actual high source (s26) and the unused neighbor (s21) between 0 and −1. Onlys26changed the generated DXIL. At merge-basef3578e38, changing either value left the DXIL unchanged. The SDK validator accepted all four head variants. This checks the generated code's dependence on the high source. I did not dispatch this fixture.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.