GPU diagnostics: create missing capture output directories #1146
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1146"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by jamesn-xt on 2026-11-24T16:13:39Z.
Setting
VICTORY_CAPTUREto 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: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.cargo xtask policyandgit diff --checkpassed.Game files, captures and retail logs remain outside the repository and are not attached. Commands and runtime checks executed on the machine above.
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 withDirectoryNotFoundException. 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 executesave_as, encode PNGs, or measure per-capture overhead.AI-assisted.
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-gpupasses, 50 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T18:58:20Z.
Review: APPROVED
Tested
47c00d5eon Windows 11, RTX 5070, MSVC:cargo test -p victory-gpupasses on the head (50 passed, 1 ignored).clippy -D warnings(default and all features) are all clean.The change is right.
create_dir_allis a no-op when the folder already exists, and either failure falls through to the existing warning.AI-assisted (Claude Code).