Perf: memo fast path, residency + scheduler tunables (+19% avg, +19% 1% lows on RX 6800 XT) #369

Open
github-bot wants to merge 7 commits from github-bot/gh-369 into main AGit
Owner

@⁠BeanieMen on GitHub · 2026-12-03 20:48 UTC · original
BeanieMen:perf-wins-upstream → main · +479 −30 · 10 files · 7 commits · open

What this is

Seven perf commits, each with a measured win, all behind env switches, measured on GTA V (Series X dump) on an RX 6800 XT at FSR 4 Quality 1440p to 4K, no frame gen, 2-minute measured benchmark runs. Net result of the session these come from: 17.5 avg / 9.7 1% low -> 20.8 avg / 11.5 1% low (+19% both). This branch compiles clean (cargo check --release, x86_64-pc-windows-msvc); the numbers below were benched on the same commits in our tree. Only changes with a measured win are included; neutral ones were left out.

1. Tested, works (in this PR)

  • Memo fast path (VICTORY_MEMO, default on, =0 disables): skips the builder's repeated work. 1% lows +12% (10.2 -> 11.5, repeated A/B), avg unchanged. 06d5386
  • VRAM residency tunable (VICTORY_CARD_KEPT_MB, 9216 in tests): part of the memory bundle that moved avg 17.9 -> 20.2. 3f75a65
  • Scheduler/memory stack (relay + late-wait thread priority, batched submission-queue take, translator thread priority, heaps insert dedup, counted-loop counter elision): benched as one stack with the memory bundle, 17.9 / 9.8 -> 20.2 / 10.7 (+12.8% avg, +9.2% lows); no per-patch attribution inside the stack. 678716c 899f1ef 77465e6 92a7da8 c05dbbb
  • The counted-loop elision bumps TRANSLATOR_VERSION to 20 on current main (wrap-safe).
  • Not in this PR: page-job barrier narrowing (22437d2 in our tree) was dropped because your 2533c7c (batch non-overlapping BVH arena UAV updates) already covers it. Also tested working in our tree: defaulting to the resizable-BAR path (+3-4.5% avg).

2. Tested, doesn't work (benched, kept out)

  • VICTORY_LATE_MOST in-flight cap 512 + late fence: 1% lows 9.8 -> 8.5. Reverted to defaults.
  • MOVE_MB=128: avg up, but 1% low 9.1 (-7%). 64 is the shipped value.
  • um_all4 residency knobs (strike decay / page swap / adaptive): avg unchanged, lows 11.4 -> 10.6. Off.
  • FAST_FMAD, per-site s_barrier fence, UAV-barrier dedup, barrier SyncAfter narrowing, FSR keep-bvh-clean: each benched neutral (within +/-0.5 avg).
  • Priority gates POOL / HEAP_SYNC / AHEAD / XMA alone: neutral.
  • Empty-barrier elision: a probe found zero empty enhanced barriers per frame, so there is nothing to elide.

3. Queued to test

  • Mesh WaveSize(32) for mesh groups of <=32 threads (ac3faca on our perf branch).
  • Aniso cap knob (VICTORY_ANISO_CAP, a quality trade, benched separately).
  • Mesh-run census (diag counter, 04e3531) to size up dispatch merging before building it.

4. Needs further research

  • Mesh dispatch merging: ~52% of ~6200 mesh draws per frame are 1-2 groups; merging needs a per-draw data table plus translator indirection. Big item.
  • Texture-barrier forwarding: the ~770-1000 enhanced global barriers per frame are real dependency waits (probed), so the remaining lever is forwarding texture-scoped barriers instead of global ones.
  • Frame time is ~41% compute (~3000 tiny dependent dispatches at ~9 us); shader-level micro-optimizations measured under 2%, so the wins look structural, not local.
**@⁠BeanieMen** on GitHub · 2026-12-03 20:48 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/369) `BeanieMen:perf-wins-upstream` → `main` · +479 −30 · 10 files · 7 commits · open ## What this is Seven perf commits, each with a measured win, all behind env switches, measured on GTA V (Series X dump) on an RX 6800 XT at FSR 4 Quality 1440p to 4K, no frame gen, 2-minute measured benchmark runs. Net result of the session these come from: **17.5 avg / 9.7 1% low -> 20.8 avg / 11.5 1% low (+19% both)**. This branch compiles clean (`cargo check --release`, x86_64-pc-windows-msvc); the numbers below were benched on the same commits in our tree. Only changes with a measured win are included; neutral ones were left out. ## 1. Tested, works (in this PR) - **Memo fast path** (`VICTORY_MEMO`, default on, `=0` disables): skips the builder's repeated work. 1% lows **+12%** (10.2 -> 11.5, repeated A/B), avg unchanged. `06d5386` - **VRAM residency tunable** (`VICTORY_CARD_KEPT_MB`, 9216 in tests): part of the memory bundle that moved avg 17.9 -> 20.2. `3f75a65` - **Scheduler/memory stack** (relay + late-wait thread priority, batched submission-queue take, translator thread priority, heaps insert dedup, counted-loop counter elision): benched as one stack with the memory bundle, 17.9 / 9.8 -> 20.2 / 10.7 (**+12.8% avg, +9.2% lows**); no per-patch attribution inside the stack. `678716c` `899f1ef` `77465e6` `92a7da8` `c05dbbb` - The counted-loop elision bumps `TRANSLATOR_VERSION` to 20 on current main (wrap-safe). - Not in this PR: page-job barrier narrowing (`22437d2` in our tree) was dropped because your `2533c7c` (batch non-overlapping BVH arena UAV updates) already covers it. Also tested working in our tree: defaulting to the resizable-BAR path (+3-4.5% avg). ## 2. Tested, doesn't work (benched, kept out) - `VICTORY_LATE_MOST` in-flight cap 512 + late fence: 1% lows 9.8 -> 8.5. Reverted to defaults. - `MOVE_MB=128`: avg up, but 1% low 9.1 (-7%). 64 is the shipped value. - um_all4 residency knobs (strike decay / page swap / adaptive): avg unchanged, lows 11.4 -> 10.6. Off. - FAST_FMAD, per-site s_barrier fence, UAV-barrier dedup, barrier SyncAfter narrowing, FSR keep-bvh-clean: each benched neutral (within +/-0.5 avg). - Priority gates POOL / HEAP_SYNC / AHEAD / XMA alone: neutral. - Empty-barrier elision: a probe found zero empty enhanced barriers per frame, so there is nothing to elide. ## 3. Queued to test - Mesh `WaveSize(32)` for mesh groups of <=32 threads (`ac3faca` on our perf branch). - Aniso cap knob (`VICTORY_ANISO_CAP`, a quality trade, benched separately). - Mesh-run census (diag counter, `04e3531`) to size up dispatch merging before building it. ## 4. Needs further research - **Mesh dispatch merging**: ~52% of ~6200 mesh draws per frame are 1-2 groups; merging needs a per-draw data table plus translator indirection. Big item. - **Texture-barrier forwarding**: the ~770-1000 enhanced global barriers per frame are real dependency waits (probed), so the remaining lever is forwarding texture-scoped barriers instead of global ones. - Frame time is ~41% compute (~3000 tiny dependent dispatches at ~9 us); shader-level micro-optimizations measured under 2%, so the wins look structural, not local.
(cherry picked from commit bcce184b61907954b5cc695d910070d4aba91963)
(cherry picked from commit 97b7f809160955ee5032c2d28fd3f1e45a6965ae)
(cherry picked from commit d151ef02dd4fb5df8226b30acf8c1d8f2c851f84)
(cherry picked from commit 6a0948c8f1d84f1958ce53ae067c89ec31b1d9a9)
(cherry picked from commit 965b45ffe8815dda3a3f26131494d85f013681b9)
(cherry picked from commit 800f08d0aa7d140b547c766c38afd6ed3e221e4e)
(cherry picked from commit 872f711219cecf5096b0217060eaa38d88b7c2fc)
(cherry picked from commit 2fd9815c4112e22491fe35295306f716462ff43a)
(cherry picked from commit 210fbd9c7767a4cdde787e5920c50760f714de77)
(cherry picked from commit 8f051d15ee0e2cc6eb2938cf03f6ba755c6a20de)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 20:49:58 +00:00
Author
Owner

@⁠copilot-pull-request-reviewer[bot] on GitHub · 2026-12-03 20:48 UTC · original · reviewed

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

**@⁠copilot-pull-request-reviewer[bot]** on GitHub · 2026-12-03 20:48 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/369#pullrequestreview-6178263892) · **reviewed** Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
github-bot force-pushed github-bot/gh-369 from a1b4aca0e6 to 06d53869d9 2026-12-03 21:03:28 +00:00 Compare
Author
Owner

@⁠Bushyon on GitHub · 2026-12-03 21:48 UTC · original · edited 2026-12-03 22:08 UTC

Tested on RX 7800 XT 16 GB, Ryzen 9 7900, 31 GB RAM, Fedora 44, VICTORY_BENCH, 5 min (240 s measured), clean settings, one run each. "PR tuned" adds VICTORY_CARD_KEPT_MB=9216 VICTORY_PAGE_MOVE_MB=64.

Ray tracing on main PR defaults PR tuned
avg fps 18.3 18.0 17.1
1% low 9.3 9.4 9.4
slowest second 13.5 13.6 9.6
draws per frame (approx.) 7200 7600 8500
Ray tracing off main PR defaults PR tuned
avg fps 21.1 21.3 20.5
1% low 10.7 11.7 11.3
slowest second 9.3 15.4 12.5
draws per frame (approx.) 8800 7600 8100

No errors or GPU faults. No average gain here with either setting; the nort lows look a bit better with the PR, but draw counts differ between runs and it needs repeats.

On this card the tuned setting raised the title's card room from 4080 to 7152 MB, but title memory on the card at the end stayed about the same (3.0 to 3.4 GB of 9.3 GB), so the benchmark scene did not use the extra room. A driving route may behave differently.

**@⁠Bushyon** on GitHub · 2026-12-03 21:48 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/369#issuecomment-7393316589) · edited 2026-12-03 22:08 UTC Tested on RX 7800 XT 16 GB, Ryzen 9 7900, 31 GB RAM, Fedora 44, `VICTORY_BENCH`, 5 min (240 s measured), clean settings, one run each. "PR tuned" adds `VICTORY_CARD_KEPT_MB=9216 VICTORY_PAGE_MOVE_MB=64`. | Ray tracing on | main | PR defaults | PR tuned | |---|---|---|---| | avg fps | 18.3 | 18.0 | 17.1 | | 1% low | 9.3 | 9.4 | 9.4 | | slowest second | 13.5 | 13.6 | 9.6 | | draws per frame (approx.) | 7200 | 7600 | 8500 | | Ray tracing off | main | PR defaults | PR tuned | |---|---|---|---| | avg fps | 21.1 | 21.3 | 20.5 | | 1% low | 10.7 | 11.7 | 11.3 | | slowest second | 9.3 | 15.4 | 12.5 | | draws per frame (approx.) | 8800 | 7600 | 8100 | No errors or GPU faults. No average gain here with either setting; the nort lows look a bit better with the PR, but draw counts differ between runs and it needs repeats. On this card the tuned setting raised the title's card room from 4080 to 7152 MB, but title memory on the card at the end stayed about the same (3.0 to 3.4 GB of 9.3 GB), so the benchmark scene did not use the extra room. A driving route may behave differently.
Author
Owner

@⁠Kal0s-design on GitHub · 2026-12-03 22:40 UTC · original

Tested 06d5386 natively on Windows 11 (MSVC) with one NVIDIA desktop card, plus WARP for the D3D12 tests in the shader suite. No game run, just the crate tests and reading the diff commit by commit.

The main thing first. main moved on after this branch was cut and #344 already took TRANSLATOR_VERSION 20 (crates/victory-shader/src/lib.rs:30 on main). The merge is textually clean because both sides make the same edit, so the merged tree would stay at 20 while c05dbbb changes DXIL. The cache key is the version plus the loop limit and a list of switches (crates/victory-gpu/src/shader_cache.rs:87), and counted_loop has no switch, so caches built at 20 by either side would be reused by the other. Needs a rebase and a bump to 21.

Second, the description says every change is behind an env switch, but several aren't

  • 678716c, relay and late-wait threads go to above normal priority unconditionally (host.rs:3392, host.rs:3475)
  • 899f1ef, batched take in jobs.rs:141 always on
  • 77465e6, translator threads always at normal now (list/thin.rs:323). The if let Some(p) = priority block below it is dead code after this
  • c05dbbb, counted_loop is always on (emit/lower.rs:3425)
  • 92a7da8, the heaps insert dedup is always on (same result, fine), and residency::line() now walks every page of every pool and logs "warm pages left in RAM" on each report whatever the knobs say (um/residency.rs:986)

The real switches (VICTORY_MEMO, CARD_KEPT_MB, HEAT_VIEW_MB, WARM_FRAMES, STRIKE_DECAY, PAGE_SWAP) default to the old behaviour as far as I can see, and none of them touch shader output.

Per commit

  • 3f75a65 CARD_KEPT_MB. Default 12288 matches the old constant. It doesn't trim like the other knobs, so "9216 " silently falls back to the default, and there's no bound, 0 hands the whole card to the title and a very large value just drops the high bits of mb << 20 (um.rs:259)
  • 899f1ef batched take. Every index once, I added a local test that drains take() for every count from 0 to 2999 and runs the pool at 100, 1000 and 5000 jobs, all pass. The existing pool test stops at 49 so it barely reaches the batching
  • c05dbbb counted_loop. I couldn't break it. Local tests on the IR (lt/scc1 and ge/scc0, bound just under and at the limit, wrong polarity, a wrapping step, a wrapping literal start, a non constant start, start above the bound) all come out as expected, and a pixel shader with the loop translates with and without the counter (1775 vs 1811 bytes of DXIL). The helper skips validation quietly if the validator doesn't load and I didn't confirm it did, so I wouldn't count that as validated. I didn't find an existing test with a loop of this shape, so the passing suite says little about this commit. The doc comment ends with "Not compiled", looks like a leftover
  • 06d5386 memo. I couldn't find a missed invalidation. copies, card_pages and stretches only grow and are in the signature, faults and the directory are fixed per Memory, the land closure bumps the epoch, and the keys and memo both go on list reset. A title write doesn't clear the keys either, but it didn't before the PR, so a hit skips nothing the old code would have redone. One difference, memoed() never looks at the frame number, so the per frame work (take_faults, look_again, warm, report) waits for the next slow call. A new list's first call is always slow so it's probably fine, but the EPOCH comment reads as if nothing is deferred. Also the comments say VICTORY_MEMO=1 while it's on by default

Tests, PR vs main (merge base 0b652f8), switches unset

  • victory-shader lib, 414 passed, 1 failed, 4 ignored on both, the failure is the known WARP compute pipeline one
  • victory-gpu lib (skipping descriptor::tests::views_die_with_their_resource), 339/4/23 on the PR vs 338/5/23 on main, same four GPU failures on both. The fifth on main is watch::tests::the_rest_of_the_one_asking_has_a_number_of_its_own, which passes alone 3 of 3 and also failed once on the PR in another run, so it's flaky
  • PR again with VICTORY_MEMO=0, and with CARD_KEPT_MB=9216 plus STRIKE_DECAY, PAGE_SWAP, HEAT_VIEW_MB and WARM_FRAMES set, same results. No unit test reads these or seems to reach ready(), so that only shows nothing else breaks

The PR adds no tests of its own. counted_loop and the batched take are easy to cover with small unit tests like the ones above.

Clippy on both touched crates, no new warnings.

AI-assisted: yes

**@⁠Kal0s-design** on GitHub · 2026-12-03 22:40 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/369#issuecomment-7394539605) Tested 06d5386 natively on Windows 11 (MSVC) with one NVIDIA desktop card, plus WARP for the D3D12 tests in the shader suite. No game run, just the crate tests and reading the diff commit by commit. The main thing first. main moved on after this branch was cut and #344 already took TRANSLATOR_VERSION 20 (crates/victory-shader/src/lib.rs:30 on main). The merge is textually clean because both sides make the same edit, so the merged tree would stay at 20 while c05dbbb changes DXIL. The cache key is the version plus the loop limit and a list of switches (crates/victory-gpu/src/shader_cache.rs:87), and counted_loop has no switch, so caches built at 20 by either side would be reused by the other. Needs a rebase and a bump to 21. Second, the description says every change is behind an env switch, but several aren't - 678716c, relay and late-wait threads go to above normal priority unconditionally (host.rs:3392, host.rs:3475) - 899f1ef, batched take in jobs.rs:141 always on - 77465e6, translator threads always at normal now (list/thin.rs:323). The `if let Some(p) = priority` block below it is dead code after this - c05dbbb, counted_loop is always on (emit/lower.rs:3425) - 92a7da8, the heaps insert dedup is always on (same result, fine), and residency::line() now walks every page of every pool and logs "warm pages left in RAM" on each report whatever the knobs say (um/residency.rs:986) The real switches (VICTORY_MEMO, CARD_KEPT_MB, HEAT_VIEW_MB, WARM_FRAMES, STRIKE_DECAY, PAGE_SWAP) default to the old behaviour as far as I can see, and none of them touch shader output. Per commit - 3f75a65 CARD_KEPT_MB. Default 12288 matches the old constant. It doesn't trim like the other knobs, so "9216 " silently falls back to the default, and there's no bound, 0 hands the whole card to the title and a very large value just drops the high bits of `mb << 20` (um.rs:259) - 899f1ef batched take. Every index once, I added a local test that drains take() for every count from 0 to 2999 and runs the pool at 100, 1000 and 5000 jobs, all pass. The existing pool test stops at 49 so it barely reaches the batching - c05dbbb counted_loop. I couldn't break it. Local tests on the IR (lt/scc1 and ge/scc0, bound just under and at the limit, wrong polarity, a wrapping step, a wrapping literal start, a non constant start, start above the bound) all come out as expected, and a pixel shader with the loop translates with and without the counter (1775 vs 1811 bytes of DXIL). The helper skips validation quietly if the validator doesn't load and I didn't confirm it did, so I wouldn't count that as validated. I didn't find an existing test with a loop of this shape, so the passing suite says little about this commit. The doc comment ends with "Not compiled", looks like a leftover - 06d5386 memo. I couldn't find a missed invalidation. copies, card_pages and stretches only grow and are in the signature, faults and the directory are fixed per Memory, the land closure bumps the epoch, and the keys and memo both go on list reset. A title write doesn't clear the keys either, but it didn't before the PR, so a hit skips nothing the old code would have redone. One difference, memoed() never looks at the frame number, so the per frame work (take_faults, look_again, warm, report) waits for the next slow call. A new list's first call is always slow so it's probably fine, but the EPOCH comment reads as if nothing is deferred. Also the comments say VICTORY_MEMO=1 while it's on by default Tests, PR vs main (merge base 0b652f8), switches unset - victory-shader lib, 414 passed, 1 failed, 4 ignored on both, the failure is the known WARP compute pipeline one - victory-gpu lib (skipping descriptor::tests::views_die_with_their_resource), 339/4/23 on the PR vs 338/5/23 on main, same four GPU failures on both. The fifth on main is watch::tests::the_rest_of_the_one_asking_has_a_number_of_its_own, which passes alone 3 of 3 and also failed once on the PR in another run, so it's flaky - PR again with VICTORY_MEMO=0, and with CARD_KEPT_MB=9216 plus STRIKE_DECAY, PAGE_SWAP, HEAT_VIEW_MB and WARM_FRAMES set, same results. No unit test reads these or seems to reach ready(), so that only shows nothing else breaks The PR adds no tests of its own. counted_loop and the batched take are easy to cover with small unit tests like the ones above. Clippy on both touched crates, no new warnings. AI-assisted: yes
Author
Owner

@⁠fsrajner on GitHub · 2026-12-04 08:14 UTC · original

Tested on top of main together with the other PRs listed below, at the defaults and with VICTORY_CARD_KEPT_MB=9216. On an RX 9070 XT at 4K, FSR 4 Quality with RT, this scene shows no measurable change. Our frames are GPU-bound here, while your 6800 XT numbers may be more CPU/scheduler bound. The merge with current main conflicted only in residency.rs local counters.

Setup: RX 9070 XT 16 GB, Ryzen 7 7800X3D, CachyOS, RADV from this repo's setup.sh. Series X, 3840x2160 output, FSR 4 Quality (4.1.2), RT at defaults, headless gamescope. Same save (the intro); the game stops 120 s after the first press. The figures come from the 5 s stats: frame windows after loading. 2 runs per variant; main = 0fd7614. The PR build is main + #382 + #392 + #393 + #408 + #445 + #369 together. #398 was left out because it conflicts with #369 in the residency planning. The #369 merge conflicted only with local counters.

variant ms/frame (runs) 5 s windows > 40 ms worst 5% worst window long frames (longest)
main 47 (48, 45) 86.5% 59.3 ms 62.8 ms 1184 (275 ms)
PR build, defaults 46 (46, 46) 85.7% 61.3 ms 82.9 ms 1176 (254 ms)
PR build + VICTORY_TEXTURE_BARRIERS=1 46 (46, 46) 88.9% 59.0 ms 61.5 ms 1137 (172 ms)
PR build + VICTORY_CARD_KEPT_MB=9216 45 (44, 46) 83.8% 63.4 ms 65.1 ms 1171 (201 ms)

The first run of main and of the PR build each began by re-preparing shaders after a translator change. That is likely where the 48 ms run and the 82.9 ms worst window come from. Otherwise the spread between runs is about ±1 ms/frame, so all of these are within noise. In this scene the card is the limit (about 21-24 ms of GPU wait per frame).

**@⁠fsrajner** on GitHub · 2026-12-04 08:14 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/369#issuecomment-7405691178) Tested on top of main together with the other PRs listed below, at the defaults and with `VICTORY_CARD_KEPT_MB=9216`. On an RX 9070 XT at 4K, FSR 4 Quality with RT, this scene shows no measurable change. Our frames are GPU-bound here, while your 6800 XT numbers may be more CPU/scheduler bound. The merge with current main conflicted only in `residency.rs` local counters. **Setup:** RX 9070 XT 16 GB, Ryzen 7 7800X3D, CachyOS, RADV from this repo's `setup.sh`. Series X, 3840x2160 output, FSR 4 Quality (4.1.2), RT at defaults, headless gamescope. Same save (the intro); the game stops 120 s after the first press. The figures come from the 5 s `stats: frame` windows after loading. 2 runs per variant; main = 0fd7614. The PR build is main + #382 + #392 + #393 + #408 + #445 + #369 together. #398 was left out because it conflicts with #369 in the residency planning. The #369 merge conflicted only with local counters. | variant | ms/frame (runs) | 5 s windows > 40 ms | worst 5% | worst window | long frames (longest) | |---|---|---|---|---|---| | main | 47 (48, 45) | 86.5% | 59.3 ms | 62.8 ms | 1184 (275 ms) | | PR build, defaults | 46 (46, 46) | 85.7% | 61.3 ms | 82.9 ms | 1176 (254 ms) | | PR build + `VICTORY_TEXTURE_BARRIERS=1` | 46 (46, 46) | 88.9% | 59.0 ms | 61.5 ms | 1137 (172 ms) | | PR build + `VICTORY_CARD_KEPT_MB=9216` | 45 (44, 46) | 83.8% | 63.4 ms | 65.1 ms | 1171 (201 ms) | The first run of main and of the PR build each began by re-preparing shaders after a translator change. That is likely where the 48 ms run and the 82.9 ms worst window come from. Otherwise the spread between runs is about ±1 ms/frame, so all of these are within noise. In this scene the card is the limit (about 21-24 ms of GPU wait per frame).
Author
Owner

@⁠Luxuride on GitHub · 2026-12-04 12:20 UTC · original

The memo fast path is the interesting half, and it is unreviewable inside a bag of seven changes — three of which are unmeasured knobs and one of which changes shader semantics.

The one I would not land as written: crates/victory-shader/src/emit/shadow_mask.rs:39 adds counted_loop (135 lines recognising two preds, a latch exit, s_cmp_lt/ge_u32, a phi from s_mov_b32, s_add_u32 with step > 0, trips = (k−k0).div_ceil(step) < limit, no u32 wrap), and crates/victory-shader/src/emit/lower.rs:3425 uses it to remove the loop cap entirely — with no test for the recogniser and no differential count in the body, plus TRANSLATOR_VERSION 19 → 20 so every existing user retranslates. A misjudged loop exits at the cap today; without the cap it hangs the card until TDR. Keep the cap as a backstop (even 2 * limit buys you the safety) and add a test per recognised shape.

The rest of the split is obvious once you decide to split:

  • crates/victory-gpu/src/memory.rs:1627-2005 memo path keyed on EPOCH with per-argument keys — this alone is a PR.
  • crates/victory-gpu/src/um/residency.rs:925-938 ships VICTORY_STRIKE_DECAY and VICTORY_PAGE_SWAP default-off and documented in code as "Unmeasured", while your own residency section reports the um_all4 knobs as worse (1% lows 11.4 → 10.6). That contradicts the body's claim that only measured wins are included. Take them out or land them later with numbers.
  • crates/victory-gpu/src/memory.rs:243 VICTORY_WARM_FRAMES is a third unmeasured, undocumented knob; the new line() calls in um/residency.rs (w_crowd/w_settled/w_quiet/w_noview, "strikes decayed") are debug noise on the HUD line.
  • crates/victory-gpu/src/list/thin.rs:323 sets let priority: Option<i32> = None; and leaves the SetThreadPriority block below it dead. Delete the block rather than parking it behind a constant.

48 behind, no conflict.

**@⁠Luxuride** on GitHub · 2026-12-04 12:20 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/369#issuecomment-7411294635) The memo fast path is the interesting half, and it is unreviewable inside a bag of seven changes — three of which are unmeasured knobs and one of which changes shader semantics. The one I would not land as written: `crates/victory-shader/src/emit/shadow_mask.rs:39` adds `counted_loop` (135 lines recognising two preds, a latch exit, `s_cmp_lt/ge_u32`, a phi from `s_mov_b32`, `s_add_u32` with step > 0, `trips = (k−k0).div_ceil(step) < limit`, no u32 wrap), and `crates/victory-shader/src/emit/lower.rs:3425` uses it to **remove the loop cap entirely** — with no test for the recogniser and no differential count in the body, plus `TRANSLATOR_VERSION` 19 → 20 so every existing user retranslates. A misjudged loop exits at the cap today; without the cap it hangs the card until TDR. Keep the cap as a backstop (even `2 * limit` buys you the safety) and add a test per recognised shape. The rest of the split is obvious once you decide to split: - `crates/victory-gpu/src/memory.rs:1627-2005` memo path keyed on `EPOCH` with per-argument keys — this alone is a PR. - `crates/victory-gpu/src/um/residency.rs:925-938` ships `VICTORY_STRIKE_DECAY` and `VICTORY_PAGE_SWAP` default-off and documented in code as "Unmeasured", while your own residency section reports the um_all4 knobs as *worse* (1% lows 11.4 → 10.6). That contradicts the body's claim that only measured wins are included. Take them out or land them later with numbers. - `crates/victory-gpu/src/memory.rs:243` `VICTORY_WARM_FRAMES` is a third unmeasured, undocumented knob; the new `line()` calls in `um/residency.rs` (`w_crowd`/`w_settled`/`w_quiet`/`w_noview`, "strikes decayed") are debug noise on the HUD line. - `crates/victory-gpu/src/list/thin.rs:323` sets `let priority: Option<i32> = None;` and leaves the `SetThreadPriority` block below it dead. Delete the block rather than parking it behind a constant. 48 behind, no conflict.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/um/residency.rs
  • crates/victory-shader/src/lib.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/369/head:github-bot/gh-369'
git switch 'github-bot/gh-369'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-369'
git switch 'github-bot/gh-369'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-369'
git switch 'github-bot/gh-369'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-369'
git switch 'main'
git merge --squash 'github-bot/gh-369'
git switch 'main'
git merge --ff-only 'github-bot/gh-369'
git switch 'main'
git merge 'github-bot/gh-369'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.