GPU diagnostics: create missing capture output directories #1146

Merged
jamesn-xt merged 1 commit from upstream-pr/1146 into main 2026-11-25 00:17:16 +00:00
jamesn-xt commented 2026-11-24 16:13:39 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by jamesn-xt on 2026-11-24T16:13:39Z.


Setting VICTORY_CAPTURE to a directory that does not exist currently loses every requested frame with a file-write error. Create the output directory and missing parents before writing each diagnostic PNG; creation and write failures retain the existing warning path.

Related: #792. That issue already offers JFIREonFIRE's separate fix, which initializes the directory once. This is an independently reproduced, minimal alternative; please prefer whichever implementation fits the project. This does not fix the title's rendering.

Validation on Windows 11 x64, Ryzen 5 5600, 32 GiB RAM, NVIDIA RTX 4080 (driver 617.42), base ffe310eb2098e52169f4c44db5ffdabf43a72622:

  • Reproduced failed captures with a nonexistent output folder before the change.
  • Rebuilt diagnostics and verified that a previously nonexistent output folder was created and frame PNGs were saved in a bounded local WARP run after the change.
  • cargo test --workspace --locked: 342 passed, 6 ignored.
  • cargo test -p victory-gpu --features diagnostics --locked: 53 passed, 1 ignored, including both existing capture tests.
  • Both workspace Clippy configurations from CI passed (all targets, default features and all features, warnings denied).
  • cargo xtask policy and git diff --check passed.

Game files, captures and retail logs remain outside the repository and are not attached. Commands and runtime checks executed on the machine above.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6586228071 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1146). Originally posted by [jamesn-xt](https://github.com/jamesn-xt) on 2026-11-24T16:13:39Z. --- Setting `VICTORY_CAPTURE` to a directory that does not exist currently loses every requested frame with a file-write error. Create the output directory and missing parents before writing each diagnostic PNG; creation and write failures retain the existing warning path. Related: #792. That issue already offers JFIREonFIRE's separate fix, which initializes the directory once. This is an independently reproduced, minimal alternative; please prefer whichever implementation fits the project. This does not fix the title's rendering. Validation on Windows 11 x64, Ryzen 5 5600, 32 GiB RAM, NVIDIA RTX 4080 (driver 617.42), base `ffe310eb2098e52169f4c44db5ffdabf43a72622`: - Reproduced failed captures with a nonexistent output folder before the change. - Rebuilt diagnostics and verified that a previously nonexistent output folder was created and frame PNGs were saved in a bounded local WARP run after the change. - `cargo test --workspace --locked`: 342 passed, 6 ignored. - `cargo test -p victory-gpu --features diagnostics --locked`: 53 passed, 1 ignored, including both existing capture tests. - Both workspace Clippy configurations from CI passed (all targets, default features and all features, warnings denied). - `cargo xtask policy` and `git diff --check` passed. Game files, captures and retail logs remain outside the repository and are not attached. Commands and runtime checks executed on the machine above.
DoubleD17 commented 2026-11-24 18:03:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DoubleD17 on 2026-11-24T17:47:59Z.

Review: COMMENTED


On 47c00d5, creating the capture directory before each write also lets capture recover if the output directory is moved between frames. I modeled the two approaches on Windows with temporary directories and one-byte payloads. After the first write, I renamed each output directory. The next write with one-time initialization failed with DirectoryNotFoundException. With creation before each write, the original directory was recreated and the second byte read back unchanged. The probe used .NET filesystem calls and did not execute save_as, encode PNGs, or measure per-capture overhead.

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:review:6044463545 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1146#pullrequestreview-6044463545). Originally posted by [DoubleD17](https://github.com/DoubleD17) on 2026-11-24T17:47:59Z. **Review:** COMMENTED --- On `47c00d5`, creating the capture directory before each write also lets capture recover if the output directory is moved between frames. I modeled the two approaches on Windows with temporary directories and one-byte payloads. After the first write, I renamed each output directory. The next write with one-time initialization failed with `DirectoryNotFoundException`. With creation before each write, the original directory was recreated and the second byte read back unchanged. The probe used .NET filesystem calls and did not execute `save_as`, encode PNGs, or measure per-capture overhead. AI-assisted.
Zipettte commented 2026-11-24 18:06:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:01:18Z.


Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 47c00d5: cargo test -p victory-gpu passes, 50 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140041726 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1146#issuecomment-7140041726). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T18:01:18Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 47c00d5: `cargo test -p victory-gpu` passes, 50 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
mercuryVM commented 2026-11-24 19:02:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T18:58:20Z.

Review: APPROVED


Tested 47c00d5e on Windows 11, RTX 5070, MSVC:

  • cargo test -p victory-gpu passes on the head (50 passed, 1 ignored).
  • Merged into our fork: workspace tests, shader tests and clippy -D warnings (default and all features) are all clean.

The change is right. create_dir_all is a no-op when the folder already exists, and either failure falls through to the existing warning.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:review:6045457914 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1146#pullrequestreview-6045457914). Originally posted by [mercuryVM](https://github.com/mercuryVM) on 2026-11-24T18:58:20Z. **Review:** APPROVED --- Tested 47c00d5e on Windows 11, RTX 5070, MSVC: - `cargo test -p victory-gpu` passes on the head (50 passed, 1 ignored). - Merged into our fork: workspace tests, shader tests and `clippy -D warnings` (default and all features) are all clean. The change is right. `create_dir_all` is a no-op when the folder already exists, and either failure falls through to the existing warning. AI-assisted (Claude Code).
upstream-sync closed this pull request 2026-11-25 01:05:42 +00:00
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
Marvisak/VIctory!1146
No description provided.