Loader: compile unwind_copy only with the diagnostics feature #3785

Closed
mrgeda wants to merge 1 commit from upstream-pr/3785 into main
mrgeda commented 2026-11-30 07:08:12 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mrgeda on 2026-11-30T07:08:12Z.


[pr-fix]

Fixes # (no issue: the first Clippy gate itself fails on main)

What it changes

unwind_copy is called only from stacks.rs, whose module is compiled with
diagnostics alone (crates/victory-loader/src/lib.rs:42-43). It was moved
into the unconditional crash module, so the default build has no caller for
it and -D warnings stops the first Clippy gate:

error: function `unwind_copy` is never used
 --> crates\victory-loader\src\crash.rs:804:15
   = note: `-D dead-code` implied by `-D warnings`

That is the step main's CI has been failing on since 41adb55 (run 46320380085).
This adds the #[cfg(feature = "diagnostics")] the module that calls it
already carries.

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): none, this is a compile-time gate change
  • Before: cargo clippy -p victory-loader --locked -- -D warnings -> dead_code error, reproduced locally on 1.98.1
  • After: both CI Clippy gates pass
    • cargo clippy -p victory-loader --locked -- -D warnings
    • cargo clippy -p victory-loader --all-features --locked -- -D warnings
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): n/a
  • cargo test passed for the crates it touches: yes (cargo test -p victory-loader --locked, the integration suites: 4 tests, all pass)

Separately, the Tests step has an independent red of its own that this change
does not touch: cargo xtask policy reports
crates/victory-loader/src/heap_sites/frame_users.rs: 2022 hex digits in one run of \x/0x literals. It is the generated TESTED: &[usize] table (about 300
entries, lines 794-1093), which trips longest_hex_literal_run's 512-digit
limit. The file says "do not edit by hand" and its generator is not in the
tree, so how to present that table (or exempt it) looks like your call; I am
reporting it here rather than loosening the policy.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: none found (the open-PR list was checked by hand; GitHub's search API kept dropping through the proxy)
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5560702335 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3785). Originally posted by [mrgeda](https://github.com/mrgeda) on 2026-11-30T07:08:12Z. --- [pr-fix] Fixes # (no issue: the first Clippy gate itself fails on main) ## What it changes `unwind_copy` is called only from `stacks.rs`, whose module is compiled with `diagnostics` alone (`crates/victory-loader/src/lib.rs:42-43`). It was moved into the unconditional `crash` module, so the default build has no caller for it and `-D warnings` stops the first Clippy gate: ``` error: function `unwind_copy` is never used --> crates\victory-loader\src\crash.rs:804:15 = note: `-D dead-code` implied by `-D warnings` ``` That is the step main's CI has been failing on since 41adb55 (run 46320380085). This adds the `#[cfg(feature = "diagnostics")]` the module that calls it already carries. ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): none, this is a compile-time gate change - Before: `cargo clippy -p victory-loader --locked -- -D warnings` -> dead_code error, reproduced locally on 1.98.1 - After: both CI Clippy gates pass - `cargo clippy -p victory-loader --locked -- -D warnings` - `cargo clippy -p victory-loader --all-features --locked -- -D warnings` - For shader changes, the wave sizes tested (32 and/or 64 lanes): n/a - `cargo test` passed for the crates it touches: yes (`cargo test -p victory-loader --locked`, the integration suites: 4 tests, all pass) Separately, the Tests step has an independent red of its own that this change does not touch: `cargo xtask policy` reports `crates/victory-loader/src/heap_sites/frame_users.rs: 2022 hex digits in one run of \x/0x literals`. It is the generated `TESTED: &[usize]` table (about 300 entries, lines 794-1093), which trips `longest_hex_literal_run`'s 512-digit limit. The file says "do not edit by hand" and its generator is not in the tree, so how to present that table (or exempt it) looks like your call; I am reporting it here rather than loosening the policy. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: none found (the open-PR list was checked by hand; GitHub's search API kept dropping through the proxy)
dyshay commented 2026-11-30 08:55:47 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dyshay on 2026-11-30T08:55:47Z.


Merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branch janus-prs). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with --profile diag --features diagnostics, and the CPU tests of the touched code pass. A run on an RTX 4090 is queued. Frame times will follow here.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7273519001 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3785#issuecomment-7273519001). Originally posted by [dyshay](https://github.com/dyshay) on 2026-11-30T08:55:47Z. --- Merged into our fork's integration branch for testing ([dyshay/VIctory-NVIDIA](https://github.com/dyshay/VIctory-NVIDIA/tree/janus-prs), branch `janus-prs`). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with `--profile diag --features diagnostics`, and the CPU tests of the touched code pass. A run on an RTX 4090 is queued. Frame times will follow here.
mrgeda commented 2026-11-30 09:11:21 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mrgeda on 2026-11-30T09:11:21Z.


Thanks for merging, and for confirming --profile diag --features diagnostics works as expected—that's the exact path gated by the cfg.

Also, since a 4090 won't hit the low-memory paths, just wanted to mention I can repro the same #3784 issue on my laptop (16 GB RAM / RTX 4050 6 GB), though it stalls even earlier before reaching the scene:

  • 19 host pipelines failed (8 compute, 10 graphics, 1 mesh) with 0x8007000e
  • Commit hit 22.1 GB (only 1.1–3.0 GB resident); free physical RAM bottomed out at 750 MB
  • Memory guard deferred 512 compiles; stuck at 2.0 fps (502 ms/frame, 0 draws/frame) until I closed the window

Since it's a tier below the 8 GB / 16 GB setup in #3784, let me know if logs from a 6 GB card would be useful for this batch—I can also run it with VICTORY_HELD_LEVELS=1 and VICTORY_LEVELS_ON_DEMAND=1 like in #3784 if needed. Just sharing the data point here; keeping this PR strictly to the cfg change.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7273859170 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3785#issuecomment-7273859170). Originally posted by [mrgeda](https://github.com/mrgeda) on 2026-11-30T09:11:21Z. --- Thanks for merging, and for confirming --profile diag --features diagnostics works as expected—that's the exact path gated by the cfg. Also, since a 4090 won't hit the low-memory paths, just wanted to mention I can repro the same #3784 issue on my laptop (16 GB RAM / RTX 4050 6 GB), though it stalls even earlier before reaching the scene: - 19 host pipelines failed (8 compute, 10 graphics, 1 mesh) with 0x8007000e - Commit hit 22.1 GB (only 1.1–3.0 GB resident); free physical RAM bottomed out at 750 MB - Memory guard deferred 512 compiles; stuck at 2.0 fps (502 ms/frame, 0 draws/frame) until I closed the window Since it's a tier below the 8 GB / 16 GB setup in #3784, let me know if logs from a 6 GB card would be useful for this batch—I can also run it with VICTORY_HELD_LEVELS=1 and VICTORY_LEVELS_ON_DEMAND=1 like in #3784 if needed. Just sharing the data point here; keeping this PR strictly to the cfg change.
trustno1-coder commented 2026-12-01 18:48:46 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:48:46Z.


Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321592532 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3785#issuecomment-7321592532). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:48:46Z. --- Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

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!3785
No description provided.