Split vector ALU lowering to restore the asset-policy check #72
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/Belobug--VIctory-Belobug-AMD!72
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-72"
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?
@Yoshi-233 on GitHub · 2026-11-25 13:21 UTC · original
Yoshi-233:fix/split-vector-lowering→main· +2857 −2848 · 3 files · 2 commits · openThe repository-wide asset check fails at
71652a2because the shader lowerer is 630,652 bytes. The configured limit is 524,288 bytes, and the same failure breaks the xtask unit test that scans the checkout.Move the 29 vector ALU and comparison methods into a private
lower/valu.rsmodule. Only its instruction dispatcher needs parent visibility. The common 64-bit register helpers stay inlower.rsfor the other instruction families. The two source files are now 499,516 and 131,464 bytes. This also resolves the corresponding README entry.Verification
cargo xtask policypassed for all 185 files andcargo xtask policy --stagedpassed for the three changed paths. The policy and its existing size limit apply to both Rust files.cargo test --locked -p xtaskwent from one failing repository check on main to four passing tests.victory-shaderlibrary test binary with Rust 1.98.1 forx86_64-pc-windows-gnuand ran it serially on native Windows. At both revisions exactly the same 251 tests passed, 15 failed and 6 were ignored. The 15 baseline failures produced the same assertions and adapter diagnostics on both builds. This machine has an RTX 4070 Ti SUPER and an Intel UHD 770.@Adika713 on GitHub · 2026-11-25 15:36 UTC · original
Verified on AMD Radeon RX 6950 XT, Ryzen 5 3600, 32 GB RAM, Windows 11, Rust 1.98.1 / Cargo 1.98.1. No game data, no GPU device tests.
I used clean detached worktrees and an isolated
CARGO_TARGET_DIRper tree. A clean worktree matters here: the policy test in my main checkout also sees two untracked local.logfiles, which are not part of this PR comparison.Before, at
upstream/main01aadd193d57e71fb4d57810eb2fdd1bc95c950b:test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 3 filtered out.POLICY: crates/victory-shader/src/emit/lower.rs: 630652 bytes exceeds the 524288-byte limit.test result: FAILED. 3 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out.After, at this PR's head
0771808:test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 3 filtered out.test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out.lower.rs499,516 bytes andlower/valu.rs131,464 bytes, both under the limit.Overlap: PR #84 head
b5a4046also passes both commands (4 passed / 0 failed for xtask), withlower.rs453,035 bytes andlower/alu.rs177,971 bytes. I did not write a competing fix.Not tested: the game or any shader-GPU test; no game files were used.
AI-assisted: OpenCode, model Big Pickle. No game data.
@ySKELLETONX on GitHub · 2026-11-25 16:36 UTC · original
Tested on an RX 7600 XT 16 GB (RDNA3, Navi 33), driver 32.0.32015.2008, Windows 11 Pro build 26300, Rust 1.98.1, at
0771808:cargo test -p victory-shader --lib --locked: 266 passed, 0 failed, 6 ignored, hardware dispatch tests included (mainat01aadd1: 266 passed). Two runs, with #140 applied on top. Without it, parallelvictory-shaderruns here sometimes crash inside WARP (d3d10warp.dll, STATUS_ACCESS_VIOLATION).maindoes that too, so it has nothing to do with this PR, but it made the first run of this PR look broken. Workspace tests only; not run in the title.@Yoshi-233 on GitHub · 2026-11-26 01:15 UTC · original
Thanks for checking the split on both AMD setups. I merged current main (
4f62c2a) into this branch atc94789d. The only conflict was in the README. I kept the new upstream notes and removed the two lines about the oversized shader source. Both Rust files are byte-for-byte identical to the revision you tested (0771808).I reran the checks on the merged revision with Rust 1.98.1 on Linux.
cargo xtask policyaccepted all 187 files, all four xtask tests passed, andcargo test --locked -p victory-shader --libreported 196 passed and 6 ignored. This rerun covers the CPU-side tests.@gut0to on GitHub · 2026-11-25 16:06 UTC · original · reviewed
AI-assisted static review; I did not run tests or launch the game. This change moves vector ALU lowering methods into private emit/lower/valu.rs and leaves the module dispatcher in lower.rs. The repository asset-policy check catches the over-limit source-file constraint; the PR reports cargo test -p xtask passing, which I did not execute.
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.