gpu: bake draws translated at the title's call (VICTORY_THIN_BAKE) and VICTORY_GROUP_WAITS #620

Merged
KhryptorGraphics merged 2 commits from upstream-pr/620 into main 2026-11-28 19:39:39 +00:00
KhryptorGraphics commented 2026-11-28 01:55:24 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by KhryptorGraphics on 2026-11-28T01:55:24Z.


What

Ports two list-thread changes from edsuuu's VI-BR-PORT (GPL-3.0).

  • VICTORY_THIN_BAKE (2 by default, 0 keeps the old way): with VICTORY_THIN=1, bake draws of written-down lists are translated at the title's call. The source fixes blocks of coloured noise baked into clothes in the opening scene. Without VICTORY_THIN=1 nothing changes.
  • VICTORY_GROUP_WAITS=named|ended (unset by default, every call waits as before): the title's barrier groups are read, and the switch picks which of them wait for earlier shader writes.

Source commits: c354528, the black_box line of 35afffd, 1c65319, and the list.rs part of f2fbdbb. A test of the group reading is added.

Note that VICTORY_THIN_BAKE changes default behaviour under the launcher, which sets VICTORY_THIN=1.

Verification

  • Cross-checked for Windows on a Linux machine: cargo check -p victory-gpu --target x86_64-pc-windows-msvc --tests passes with no new warnings.
  • Not run in the game. No frame-rate or stability measurement was taken on this fork; figures quoted are the source fork's own.
  • Clippy and the test suite have not run locally; CI on this pull request is their first run.
  • Reviewed independently against the source commits before pushing.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5535570426 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/620). Originally posted by [KhryptorGraphics](https://github.com/KhryptorGraphics) on 2026-11-28T01:55:24Z. --- ## What Ports two list-thread changes from edsuuu's VI-BR-PORT (GPL-3.0). - `VICTORY_THIN_BAKE` (**2 by default**, 0 keeps the old way): with `VICTORY_THIN=1`, bake draws of written-down lists are translated at the title's call. The source fixes blocks of coloured noise baked into clothes in the opening scene. Without `VICTORY_THIN=1` nothing changes. - `VICTORY_GROUP_WAITS=named|ended` (**unset by default**, every call waits as before): the title's barrier groups are read, and the switch picks which of them wait for earlier shader writes. Source commits: c354528, the black_box line of 35afffd, 1c65319, and the list.rs part of f2fbdbb. A test of the group reading is added. Note that `VICTORY_THIN_BAKE` changes default behaviour under the launcher, which sets `VICTORY_THIN=1`. ## Verification - Cross-checked for Windows on a Linux machine: `cargo check -p victory-gpu --target x86_64-pc-windows-msvc --tests` passes with no new warnings. - **Not run in the game.** No frame-rate or stability measurement was taken on this fork; figures quoted are the source fork's own. - Clippy and the test suite have not run locally; CI on this pull request is their first run. - Reviewed independently against the source commits before pushing.
MrEjecutor commented 2026-11-28 03:20:54 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by MrEjecutor on 2026-11-28T03:20:54Z.


In-game numbers for the VICTORY_THIN_BAKE half of this, since the description says it was not run in the game. I had ported c354528 the same way (the bake found through BAKE_PIXEL_SHADERS and BAKE_GEOMETRY_SHADERS in draw.rs) and ran it before seeing this pull request.

Setup: RTX 5060 Ti 16 GB, Core Ultra 5 225F, 32 GB RAM, Windows 11. This fork at d12eb1b plus local patches (not current main), built from source, diagnostics build. The play-foxhound.ps1 switch set, Series S profile, no DLSS, no frame generation, the title's own 30 fps. A new game from its start, the same scripted key presses in every launch, a fresh copy of the save data before each launch.

The fault: in some launches one character's clothes or face are drawn with wrong colours for the whole scene (coloured noise over a face, a grey sweatshirt drawn orange, a pink shirt drawn dark brown); the next launch of the same binary is clean.

Captures at fixed moments of each launch, one contact sheet of the opening's close-ups per launch, judged by eye:

launches with a wrong bake
without the fix: 6 launches of the base build, 12 of builds that carry the port with VICTORY_THIN_BAKE=0 18 3
with the port and VICTORY_THIN_BAKE=2, four local builds 22 0

One-sided Fisher's exact test: p ≈ 0.08, so an indication and not proof. With it on, the thin line counted 58 to 71 bake draws translated at the title's call per 150 s launch and 0.00 ms waited per frame in play.

Rebase: on 8fc2254 the first commit conflicts in one place only, the test a_target_is_the_one_at_the_call in thin.rs, where main already has its own black_box line since 9b712a6; taking main's line resolves it. The second commit applies as it is. A local rebase of the same port onto 8fc2254 (VICTORY_THIN_BAKE only; the same code outside the tests, comments differ) gives here: cargo test -p victory-gpu --lib --locked list::thin: 5 passed, 0 failed (the bake test among them). cargo clippy -p victory-gpu --all-targets --locked -- -D warnings in both builds: no finding in the three files of the port; it stops at findings main has itself (shadow.rs:1708, and descriptor.rs:1234 with all features), which #665 already takes care of. The rest of the workspace's tests were not run.

Not tested: VICTORY_GROUP_WAITS (the second commit) in any way; the port in the game on this fork's current main; the Series X profile; DLSS or frame generation; scenes past the opening; the frame rate with and without it on one binary. Also not tested: any launch with the screen probes' ray activation pass running. d12eb1b leaves it out unless VICTORY_ACTIVATE_RAYS=1 and none of the 40 launches above set it, while current main runs it by default. Three first launches with it on (port on, a later local build) are not counted above: two of them showed a different fault, a character drawn in another outfit's model rather than with wrong colours; too few to say more.

AI-assisted (Claude Code): the port, the launches and this text; the captures were judged by eye on my PC. No game files attached.

Edited 27 Nov: added the VICTORY_ACTIVATE_RAYS limit under "Not tested".

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7233000029 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/620#issuecomment-7233000029). Originally posted by [MrEjecutor](https://github.com/MrEjecutor) on 2026-11-28T03:20:54Z. --- In-game numbers for the `VICTORY_THIN_BAKE` half of this, since the description says it was not run in the game. I had ported `c354528` the same way (the bake found through `BAKE_PIXEL_SHADERS` and `BAKE_GEOMETRY_SHADERS` in `draw.rs`) and ran it before seeing this pull request. **Setup:** RTX 5060 Ti 16 GB, Core Ultra 5 225F, 32 GB RAM, Windows 11. This fork at `d12eb1b` plus local patches (not current `main`), built from source, diagnostics build. The `play-foxhound.ps1` switch set, Series S profile, no DLSS, no frame generation, the title's own 30 fps. A new game from its start, the same scripted key presses in every launch, a fresh copy of the save data before each launch. **The fault:** in some launches one character's clothes or face are drawn with wrong colours for the whole scene (coloured noise over a face, a grey sweatshirt drawn orange, a pink shirt drawn dark brown); the next launch of the same binary is clean. Captures at fixed moments of each launch, one contact sheet of the opening's close-ups per launch, judged by eye: | | launches | with a wrong bake | |---|---:|---:| | without the fix: 6 launches of the base build, 12 of builds that carry the port with `VICTORY_THIN_BAKE=0` | 18 | 3 | | with the port and `VICTORY_THIN_BAKE=2`, four local builds | 22 | 0 | One-sided Fisher's exact test: p ≈ 0.08, so an indication and not proof. With it on, the thin line counted 58 to 71 bake draws translated at the title's call per 150 s launch and 0.00 ms waited per frame in play. **Rebase:** on `8fc2254` the first commit conflicts in one place only, the test `a_target_is_the_one_at_the_call` in `thin.rs`, where `main` already has its own `black_box` line since `9b712a6`; taking `main`'s line resolves it. The second commit applies as it is. A local rebase of the same port onto `8fc2254` (`VICTORY_THIN_BAKE` only; the same code outside the tests, comments differ) gives here: `cargo test -p victory-gpu --lib --locked list::thin`: 5 passed, 0 failed (the bake test among them). `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings` in both builds: no finding in the three files of the port; it stops at findings `main` has itself (`shadow.rs:1708`, and `descriptor.rs:1234` with all features), which #665 already takes care of. The rest of the workspace's tests were not run. **Not tested:** `VICTORY_GROUP_WAITS` (the second commit) in any way; the port in the game on this fork's current `main`; the Series X profile; DLSS or frame generation; scenes past the opening; the frame rate with and without it on one binary. Also not tested: any launch with the screen probes' ray activation pass running. `d12eb1b` leaves it out unless `VICTORY_ACTIVATE_RAYS=1` and none of the 40 launches above set it, while current `main` runs it by default. Three first launches with it on (port on, a later local build) are not counted above: two of them showed a different fault, a character drawn in another outfit's model rather than with wrong colours; too few to say more. AI-assisted (Claude Code): the port, the launches and this text; the captures were judged by eye on my PC. No game files attached. Edited 27 Nov: added the `VICTORY_ACTIVATE_RAYS` limit under "Not tested".
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!620
No description provided.