Laptop and 8 GB NVIDIA: Series S by -Light, wave64 LDS programs in wa… #134

Closed
github-bot wants to merge 4 commits from github-bot/gh-134 into main AGit
Owner

@⁠YOGESH9139 on GitHub · 2026-11-26 06:22 UTC · original
YOGESH9139:main → main · +477 −6 · 7 files · 4 commits · closed without merging

…ves of 32, DualShock 4 pads

  • victory-shader: VICTORY_LDS_REGION_RACE (on unless 0, asked on 32-lane hosts only): a console wave64 program whose LDS accesses in lane branches can get no meeting of the two host waves runs in waves of 32 anyway, with a barrier before the LDS accesses every lane makes. On an RTX PRO 2000 laptop GPU 393 of the 404 compute programs the driver refused ("wants wave lane count of 64") now get a pipeline (culling, shadows, lighting, TAA); after the idea of Linox-IDK's LNX-victory, written anew.
  • victory-hle: DualShock 4 pads (Sony 054C: 05C4, 09CC, 0BA0, 0BA1) read from HID beside XInput and merged with the XInput pad of the same slot (VICTORY_DUALSHOCK=0 turns it off); report parsing tested.
  • scripts/play.ps1: -Light (Series S profile, 1080p display mode, levels on demand), -SeriesS, and VICTORY_PIPELINE_BOOK=1 so victory warm --used has something to make.
  • README: the laptop measurements (world fps 1.4 to about 3 in the opening cutscene) and what is still wrong.
**@⁠YOGESH9139** on GitHub · 2026-11-26 06:22 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/134) `YOGESH9139:main` → `main` · +477 −6 · 7 files · 4 commits · closed without merging …ves of 32, DualShock 4 pads - victory-shader: VICTORY_LDS_REGION_RACE (on unless 0, asked on 32-lane hosts only): a console wave64 program whose LDS accesses in lane branches can get no meeting of the two host waves runs in waves of 32 anyway, with a barrier before the LDS accesses every lane makes. On an RTX PRO 2000 laptop GPU 393 of the 404 compute programs the driver refused ("wants wave lane count of 64") now get a pipeline (culling, shadows, lighting, TAA); after the idea of Linox-IDK's LNX-victory, written anew. - victory-hle: DualShock 4 pads (Sony 054C: 05C4, 09CC, 0BA0, 0BA1) read from HID beside XInput and merged with the XInput pad of the same slot (VICTORY_DUALSHOCK=0 turns it off); report parsing tested. - scripts/play.ps1: -Light (Series S profile, 1080p display mode, levels on demand), -SeriesS, and VICTORY_PIPELINE_BOOK=1 so `victory warm --used` has something to make. - README: the laptop measurements (world fps 1.4 to about 3 in the opening cutscene) and what is still wrong.
- victory-shader: VICTORY_LDS_REGION_RACE (on unless 0, asked on 32-lane hosts
  only): a console wave64 program whose LDS accesses in lane branches can get no
  meeting of the two host waves runs in waves of 32 anyway, with a barrier before
  the LDS accesses every lane makes. On an RTX PRO 2000 laptop GPU 393 of the 404
  compute programs the driver refused ("wants wave lane count of 64") now get a
  pipeline (culling, shadows, lighting, TAA); after the idea of Linox-IDK's
  LNX-victory, written anew.
- victory-hle: DualShock 4 pads (Sony 054C: 05C4, 09CC, 0BA0, 0BA1) read from HID
  beside XInput and merged with the XInput pad of the same slot
  (VICTORY_DUALSHOCK=0 turns it off); report parsing tested.
- scripts/play.ps1: -Light (Series S profile, 1080p display mode, levels on
  demand), -SeriesS, and VICTORY_PIPELINE_BOOK=1 so `victory warm --used` has
  something to make.
- README: the laptop measurements (world fps 1.4 to about 3 in the opening
  cutscene) and what is still wrong.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:25:47 +00:00
Author
Owner

@⁠Proudnoob4 on GitHub · 2026-11-26 07:11 UTC · original

Cross-tested VICTORY_LDS_REGION_RACE alongside PastiiJay/klbf-lab#50 (static Wave32 LDS hazard analysis) on an RTX 4080 16 GB / Windows 10 in GTA 6 (--console series-s):

  • With upstream lds_meetings + VICTORY_LDS_FLAGS, NVIDIA refuses 6 Wave64 compute pipelines (2da4beb386509b77, 369cbe906ea72764, 02384a60fda6f2d0, 6b82bc7d22016cb5, 5dc3b25986622949, 6f225b641c5b0708).
  • With klbf-lab#50's stricter write-only WAW/cyclic rejection enabled and VICTORY_LDS_REGION_RACE=0, 4 more compute pipelines stay Wave64 and get refused (0x80070057), including two skinning passes (89d08e561897d4e5, 55679a0547649d0b) plus 1f1fbd86759b3da2 and caf96a3229145fa6.
  • Having VICTORY_LDS_REGION_RACE as a fallback when static proofs return None is very useful on 32-lane NVIDIA GPUs (note: keeping it opt-in during cargo test avoids breaking negative WaveSize(64) unit tests, or using a test override).

Also: combining avatarmanz's speed wave (#105, #107, #119, #96, #97, #109, #82, #24, #42, #108, #114) + fx#868 (VICTORY_SKIP_WC_COMPARE=1) + fx#907 (ForceEarlyDepthStencil) + klbf#41 (DXIL LICM/LDS-fwd/barrier-dedup) + VICTORY_PIPELINE_WAIT_MS=150 / VICTORY_TEXTURE_STAGE_MS=50 hit 27.2 fps median (28.6 fps max, 0 stutters >55 ms across 8 min steady play) on our RTX 4080 16 GB at render_scale=0.6666667 (720p→1080p, RT off). Full write-up & settings posted on fxceless/victory-fork!

**@⁠Proudnoob4** on GitHub · 2026-11-26 07:11 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/134#issuecomment-7185192847) Cross-tested `VICTORY_LDS_REGION_RACE` alongside `PastiiJay/klbf-lab#50` (static Wave32 LDS hazard analysis) on an **RTX 4080 16 GB / Windows 10** in GTA 6 (`--console series-s`): - With upstream `lds_meetings` + `VICTORY_LDS_FLAGS`, NVIDIA refuses **6** Wave64 compute pipelines (`2da4beb386509b77`, `369cbe906ea72764`, `02384a60fda6f2d0`, `6b82bc7d22016cb5`, `5dc3b25986622949`, `6f225b641c5b0708`). - With `klbf-lab#50`'s stricter write-only WAW/cyclic rejection enabled and `VICTORY_LDS_REGION_RACE=0`, **4 more** compute pipelines stay Wave64 and get refused (`0x80070057`), including two skinning passes (`89d08e561897d4e5`, `55679a0547649d0b`) plus `1f1fbd86759b3da2` and `caf96a3229145fa6`. - Having `VICTORY_LDS_REGION_RACE` as a fallback when static proofs return `None` is very useful on 32-lane NVIDIA GPUs (note: keeping it opt-in during `cargo test` avoids breaking negative `WaveSize(64)` unit tests, or using a test override). Also: combining `avatarmanz`'s speed wave (`#105`, `#107`, `#119`, `#96`, `#97`, `#109`, `#82`, `#24`, `#42`, `#108`, `#114`) + `fx#868` (`VICTORY_SKIP_WC_COMPARE=1`) + `fx#907` (`ForceEarlyDepthStencil`) + `klbf#41` (DXIL LICM/LDS-fwd/barrier-dedup) + `VICTORY_PIPELINE_WAIT_MS=150` / `VICTORY_TEXTURE_STAGE_MS=50` hit **27.2 fps median (28.6 fps max, 0 stutters >55 ms across 8 min steady play)** on our RTX 4080 16 GB at `render_scale=0.6666667` (720p→1080p, RT off). Full write-up & settings posted on `fxceless/victory-fork`!
Tests of programs that must keep WaveSize(64) on a 32-lane host then see them
kept; the layer itself keeps the default (on unless 0). Suggested by
Proudnoob4 on avatarmanz/VIctory-7900XTX#134. victory-shader: 278 tests pass
with it unset and with VICTORY_LDS_REGION_RACE=1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠avatarmanz on GitHub · 2026-11-26 07:33 UTC · original

Not merged as is: the README retitles this repo as another fork, and play.ps1 gets a new default (VICTORY_PIPELINE_BOOK=1) for every card. The shader, DualShock and -Light parts would each need a PR of their own.

**@⁠avatarmanz** on GitHub · 2026-11-26 07:33 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/134#issuecomment-7185583927) Not merged as is: the README retitles this repo as another fork, and play.ps1 gets a new default (VICTORY_PIPELINE_BOOK=1) for every card. The shader, DualShock and -Light parts would each need a PR of their own.
Author
Owner

@⁠YOGESH9139 on GitHub · 2026-11-26 07:35 UTC · original

Thanks for cross-testing it on the 4080, and for the hashes: they match what I see here. Without the fallback, 2da4beb386509b77, 369cbe906ea72764, 02384a60fda6f2d0 and 6b82bc7d22016cb5 were among the 404 refused on this RTX PRO 2000 laptop GPU, and 5dc3b25986622949 / 6f225b641c5b0708 are two of the 11 that still don't translate in waves of 32 (wave reductions and lane-mask exchanges inside lane branches).

Done on your test suggestion: VICTORY_LDS_REGION_RACE is now off under cargo test unless set to 1; the layer keeps it on by default on 32-lane hosts. victory-shader: 278 tests pass with it unset and with =1. It's pushed to this PR.

One more data point from here: a 20-minute run in the Series S profile with the fallback on, 18.5 minutes of it in the world, ended without a crash or device loss.

I'll try the settings from your speed list that exist in this tree. Thanks again.

**@⁠YOGESH9139** on GitHub · 2026-11-26 07:35 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/134#issuecomment-7185628659) Thanks for cross-testing it on the 4080, and for the hashes: they match what I see here. Without the fallback, `2da4beb386509b77`, `369cbe906ea72764`, `02384a60fda6f2d0` and `6b82bc7d22016cb5` were among the 404 refused on this RTX PRO 2000 laptop GPU, and `5dc3b25986622949` / `6f225b641c5b0708` are two of the 11 that still don't translate in waves of 32 (wave reductions and lane-mask exchanges inside lane branches). Done on your test suggestion: `VICTORY_LDS_REGION_RACE` is now off under `cargo test` unless set to `1`; the layer keeps it on by default on 32-lane hosts. `victory-shader`: 278 tests pass with it unset and with `=1`. It's pushed to this PR. One more data point from here: a 20-minute run in the Series S profile with the fallback on, 18.5 minutes of it in the world, ended without a crash or device loss. I'll try the settings from your speed list that exist in this tree. Thanks again.
Author
Owner

@⁠Proudnoob4 on GitHub · 2026-11-26 08:12 UTC · original

Great news on two of those 4 hashes you listed (2da4beb386509b77 and 369cbe906ea72764) — we just recovered both cleanly on RTX 4080 without needing an LDS race fallback:

  1. 2da4beb386509b77 (CS_AlphTransmissionPrefilterMip — frosted/refracted window glass): In crates/victory-shader/src/resource.rs, Tracer::descriptor() and Tracer::live() only pushed lanes.reach[block] into known, omitting per-instruction lanes.guards[b][i]. Tracking at: Cell<Option<Site>> and pushing lanes.guards[at.0][at.1] prunes the dead join edge and recovers 2da4beb386509b77 cleanly in Wave32 (visibly fixing frosted window glass refraction in-game).
  2. 369cbe906ea72764: Recovered cleanly via single-latch s_andn2_wrexec_b64 + s_cbranch_scc1 active-loop widening in emit/mod.rs (plus restored_lanes / scc_some / ordered-LDS lane_uniform).
  3. 4 klbf#50 LDS-atomic shaders (89d08e561897d4e5, 55679a0547649d0b, 1f1fbd86759b3da2, caf96a3229145fa6): Also recovered cleanly in lds.rs by tracking has_plain_read separately from Kind::Rmw (details on PastiiJay/klbf-lab#50).

In our full 10-minute RTX 4080 run (Pass 10), refused pipelines dropped from 10 → 4 (02384a60fda6f2d0, 6b82bc7d22016cb5, 5dc3b25986622949, 6f225b641c5b0708), 0 untranslated, 0 steady stutters >55 ms, with VICTORY_LDS_REGION_RACE still off.

**@⁠Proudnoob4** on GitHub · 2026-11-26 08:12 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/134#issuecomment-7186317742) Great news on two of those 4 hashes you listed (`2da4beb386509b77` and `369cbe906ea72764`) — we just recovered **both** cleanly on RTX 4080 **without** needing an LDS race fallback: 1. **`2da4beb386509b77` (`CS_AlphTransmissionPrefilterMip` — frosted/refracted window glass):** In `crates/victory-shader/src/resource.rs`, `Tracer::descriptor()` and `Tracer::live()` only pushed `lanes.reach[block]` into `known`, omitting per-instruction `lanes.guards[b][i]`. Tracking `at: Cell<Option<Site>>` and pushing `lanes.guards[at.0][at.1]` prunes the dead join edge and recovers `2da4beb386509b77` cleanly in Wave32 (visibly fixing frosted window glass refraction in-game). 2. **`369cbe906ea72764`:** Recovered cleanly via single-latch `s_andn2_wrexec_b64` + `s_cbranch_scc1` active-loop widening in `emit/mod.rs` (plus `restored_lanes` / `scc_some` / ordered-LDS `lane_uniform`). 3. **4 `klbf#50` LDS-atomic shaders (`89d08e561897d4e5`, `55679a0547649d0b`, `1f1fbd86759b3da2`, `caf96a3229145fa6`):** Also recovered cleanly in `lds.rs` by tracking `has_plain_read` separately from `Kind::Rmw` (details on `PastiiJay/klbf-lab#50`). In our full 10-minute RTX 4080 run (`Pass 10`), refused pipelines dropped from **10 → 4** (`02384a60fda6f2d0`, `6b82bc7d22016cb5`, `5dc3b25986622949`, `6f225b641c5b0708`), `0` untranslated, `0` steady stutters `>55 ms`, with `VICTORY_LDS_REGION_RACE` still off.
Upstream brings VICTORY_LDS_FLAGS (LDS flag regions on 32-lane GPUs), the
adapter choice on hybrid-graphics PCs and the frame rate switch. On this
laptop GPU the world's GPU time a frame went from about 362 to 178 ms with it.

In play.ps1, -Light now also sets VICTORY_AMBIENT_AIR=0.3 (the title lit the
air of rooms with the sky's light: a brown fog over everything), VICTORY_AMBIENT
=1.6 (faces were black) and VICTORY_LATE_WAIT=2. Rooms, windows, other people
and faces are visible; three runs of 9-10 minutes, and one on this merge, ended
without a reset of the card. A cap of 0.15, or stage 3 waits with the same fill
light, had the card reset about a minute into the world in each of three runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The stand-in's estimate follows the light of the frame, so a room lit by one
dim or coloured lamp stays near black (walls, faces). VICTORY_AMBIENT_FLOOR=
<level> keeps the fill from going darker than that level, shaded in creases as
the rest; unlike the constant, the air's cap (VICTORY_AMBIENT_AIR) stays on.
The level goes in the root constants' last, unused word.

Measured on an RTX PRO 2000 laptop GPU in the first rooms with scripted
walking: 0.3 lifted clothes only; 1.0 shows faces, hair, beds and the floor,
and bright rooms look as before. No reset of the card in either 9-minute run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠YOGESH9139 on GitHub · 2026-11-26 11:45 UTC · original

Split as you asked, each rebased on 0dec5dc: #209 (the shader fallback, lower.rs only), #210 (DualShock 4) and #211 (play.ps1 -SeriesS / -Light, no new default for other cards). The README retitle stays in my fork only. This PR can be closed in favour of those.

**@⁠YOGESH9139** on GitHub · 2026-11-26 11:45 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/134#issuecomment-7191122533) Split as you asked, each rebased on 0dec5dc: #209 (the shader fallback, lower.rs only), #210 (DualShock 4) and #211 (play.ps1 -SeriesS / -Light, no new default for other cards). The README retitle stays in my fork only. This PR can be closed in favour of those.
github-bot closed this pull request 2026-11-26 12:53:20 +00:00
Author
Owner

@⁠YOGESH9139 on GitHub · 2026-11-26 12:51 UTC · original

Closing: I'm stopping this work for now and taking the fork down. Thanks for the reviews.

**@⁠YOGESH9139** on GitHub · 2026-11-26 12:51 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/134#issuecomment-7192558624) Closing: I'm stopping this work for now and taking the fork down. Thanks for the reviews.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.