Perf/shader relative shift bounds #1801
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1802"
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 VlREX on 2026-11-24T22:48:38Z.
No description provided.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:04:20Z.
Review: APPROVED
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (
70564ae), cargo test -p victory-shader --locked → 119 passed, 0 failed. GPU execution tests (valu_tests/host) are #[cfg(all(test, windows))] and run only on Windows; macOS covers lowering/structure unit tests.Relative shift bounds: constant_shift() bounds register reads for constant right shifts — constant_right_shifts_bound_relative_register_reads test. Small, precise.
Imported from Marvisak/VIctory. Originally posted by DesertGamer on 2026-11-24T22:57:10Z.
VIctory V2: community PRs, merged and tested
Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.
Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).
⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.
Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2
Unofficial community fork of Marvisak/VIctory, GPL-3.0.
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-24T23:18:41Z.
NVIDIA run: RTX 3070 8 GB, driver 616.56, plus WARP, Windows 11, debug,
70b895d(onmain70564ae).cargo test -p victory-shader --locked: 207 passed, 3 failed, 2 ignored. The 3 are #1744's NVIDIA heap-cap failures onmain, so there are no new failures.AI-assisted (Claude Code). Synthetic tests only.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:27:15Z.
Automated triage for the maintainers.
Merge candidate.
Rangesincrates/victory-shader/src/range.rsboundss_lshr_b32andv_lshrrev_b32when the shift count is a constant. That narrows the registers that later relative moves (v_movrels) are taken to read.constant_shifttakes inline constants 128..=159 as 0..31 and literals below 32 as they are. Anything else stays unbounded: larger constants (which the hardware masks to 5 bits), negative inline constants, and variable counts. That is conservative, and a shift by 0 leaves the operand's bound unchanged.New since the last review:
d570108addsshift_bounds_accept_only_unambiguous_constant_counts. It covers the edges of both encodings (literals 32, 63 andu32::MAX; codes 127, 160, 192, 193 and 208), and I checked its expectations against the inline-constant table. The verdict is unchanged.CI: passing.
Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T18:53:29Z.
Review: APPROVED
Verified
d5701082fca665f35e009aabb1b3dcd2440d9da8cleanly merged ontomain(63bcca43) on Windows 11 x64:s_lshr_b32/v_lshrrev_b32bounding (crates/victory-shader/src/range.rs:285-286, 305-311) is mathematically sound:constant_shiftaccepts only0..=31(Operand::Const(128..=159)andOperand::Literal(< 32)), while shifts>= 32, variable shifts, left shifts, and arithmetic right shifts conservatively stayu32::MAX.cargo test -p xtask --locked policy::tests::repository_passes_policy:1 passed(asset policy: 191 files ok).cargo clippy --locked -p victory-shader --all-targets -- -D warnings(default and--all-features): clean.cargo test --locked -p victory-shader --lib range:::5 passed, 0 failed(constant_right_shifts_bound_relative_register_readsandshift_bounds_accept_only_unambiguous_constant_countspass).Minor formatting nit:
rustfmt --edition 2024 --check crates/victory-shader/src/range.rsflags comment alignment atrange.rs:427, 429, 450. Ready to merge.Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-27T00:09:21Z.
Review: APPROVED
LGTM — verified on Windows against
origin/main(63bcca4).range.rspasses all range tests cleanly with zero clippy warnings.cargo test -p victory-shader --lib range:: -- --test-threads=1: all passed.cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
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.