GPU: open VICTORY_PIPELINE_LOG once and ignore empty values #3453

Open
github-bot wants to merge 1 commit from github-bot/gh-3453 into main AGit
Owner

@⁠alexandruiulian201-bot on GitHub · 2026-11-27 03:08 UTC · original
alexandruiulian201-bot:fix/pipeline-log-open-once → main · +77 −13 · 1 files · 1 commits · open

Problem

In crates/victory-gpu/src/pipeline/make.rs, VICTORY_PIPELINE_LOG has two issues when diagnostics are enabled:

  1. An empty VICTORY_PIPELINE_LOG="" is treated as a configured path rather than unset (unlike VICTORY_CONFIG, VICTORY_GAME_DIR, and VICTORY_WINDOW_MAX).
  2. If std::fs::File::create(path) fails (for example, missing parent directory or empty path), LOG stays None and every subsequent created, used, and built pipeline event retries File::create(path) silently.

Fix

  • Extract a PipelineLog helper whose open(&OsStr) ignores empty paths, attempts File::create once inside OnceLock::get_or_init, and logs a single tracing::warn! if opening fails.
  • Keep per-(what, key) deduplication and tab-separated line formatting unchanged.
  • Add synthetic unit tests under #[cfg(feature = "diagnostics")] covering empty/unwritable paths and event deduplication/formatting.

Verification

  • cargo test -p victory-gpu --lib --features diagnostics --locked pipeline_log_: 2 passed.
  • cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: clean.
  • cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings: clean.
  • cargo test -p xtask --bin xtask --locked: 6 passed (repository_passes_policy ok).

AI-assisted. Synthetic unit tests only (no game files used).

**@⁠alexandruiulian201-bot** on GitHub · 2026-11-27 03:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/3453) `alexandruiulian201-bot:fix/pipeline-log-open-once` → `main` · +77 −13 · 1 files · 1 commits · open ### Problem In `crates/victory-gpu/src/pipeline/make.rs`, `VICTORY_PIPELINE_LOG` has two issues when diagnostics are enabled: 1. An empty `VICTORY_PIPELINE_LOG=""` is treated as a configured path rather than unset (unlike `VICTORY_CONFIG`, `VICTORY_GAME_DIR`, and `VICTORY_WINDOW_MAX`). 2. If `std::fs::File::create(path)` fails (for example, missing parent directory or empty path), `LOG` stays `None` and every subsequent `created`, `used`, and `built` pipeline event retries `File::create(path)` silently. ### Fix - Extract a `PipelineLog` helper whose `open(&OsStr)` ignores empty paths, attempts `File::create` once inside `OnceLock::get_or_init`, and logs a single `tracing::warn!` if opening fails. - Keep per-`(what, key)` deduplication and tab-separated line formatting unchanged. - Add synthetic unit tests under `#[cfg(feature = "diagnostics")]` covering empty/unwritable paths and event deduplication/formatting. ### Verification - `cargo test -p victory-gpu --lib --features diagnostics --locked pipeline_log_`: 2 passed. - `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings`: clean. - `cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings`: clean. - `cargo test -p xtask --bin xtask --locked`: 6 passed (`repository_passes_policy` ok). AI-assisted. Synthetic unit tests only (no game files used).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 03:13:20 +00:00
Author
Owner

@⁠oni-swr on GitHub · 2026-11-27 03:27 UTC · original

WARP test report (AI-assisted with Claude; synthetic tests only, no game files)

  • Head: 53596d8e7573a94a4c168fb330b82be415159536, base: origin/main @ 63bcca4 (this PR's merge base)
  • Windows 11 Pro, build 10.0.26200; D3D12 on WARP only (VICTORY_WARP=1, VICTORY_D3D12_WARP=1, adapter vendor 0x1414 / software flag), DXIL validator dxil.dll from the Windows SDK 10.0.26100
  • Note: VICTORY_D3D12_WARP is only honored with --features diagnostics (host.rs create()); without it cargo test -p victory-gpu --lib picks the hardware GPU. I ran with --features diagnostics.
  • cargo test -p victory-gpu --lib --locked --features diagnostics: 248 passed, 0 failed, 1 ignored (base: 246/0/1; the +2 are pipeline_log_ignores_empty_and_unwritable_paths and pipeline_log_deduplicates_events_per_kind_and_key, both pass)
  • cargo test -p xtask --bin xtask --locked: 6 passed
  • No new failures vs base. waits_end_on_ticks_and_count_frames passed on both. I did not re-run clippy.

Review: no correctness issue found. The open now happens once inside OnceLock::get_or_init and warns once, empty values are ignored, and dedup and line format are unchanged.

**@⁠oni-swr** on GitHub · 2026-11-27 03:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/3453#issuecomment-7209001748) **WARP test report** (AI-assisted with Claude; synthetic tests only, no game files) - Head: `53596d8e7573a94a4c168fb330b82be415159536`, base: `origin/main` @ `63bcca4` (this PR's merge base) - Windows 11 Pro, build 10.0.26200; D3D12 on WARP only (`VICTORY_WARP=1`, `VICTORY_D3D12_WARP=1`, adapter vendor 0x1414 / software flag), DXIL validator `dxil.dll` from the Windows SDK 10.0.26100 - Note: `VICTORY_D3D12_WARP` is only honored with `--features diagnostics` (`host.rs` `create()`); without it `cargo test -p victory-gpu --lib` picks the hardware GPU. I ran with `--features diagnostics`. - `cargo test -p victory-gpu --lib --locked --features diagnostics`: **248 passed, 0 failed, 1 ignored** (base: 246/0/1; the +2 are `pipeline_log_ignores_empty_and_unwritable_paths` and `pipeline_log_deduplicates_events_per_kind_and_key`, both pass) - `cargo test -p xtask --bin xtask --locked`: 6 passed - No new failures vs base. `waits_end_on_ticks_and_count_frames` passed on both. I did not re-run clippy. **Review:** no correctness issue found. The open now happens once inside `OnceLock::get_or_init` and warns once, empty values are ignored, and dedup and line format are unchanged.
Author
Owner

@⁠cloph-dsp on GitHub · 2026-11-27 08:11 UTC · original

Independent CPU-only verification of PR #3453 (GPU: pipeline log ignores empty and unwritable paths).

  • Windows, rustc/cargo 1.100.0/MSVC, fresh worktree-local CARGO_TARGET_DIR (D:\Victory-Contrib\target-3453-verify), CARGO_BUILD_JOBS=2.
  • Head 53596d8e7573a94a4c168fb330b82be415159536, merge base 63bcca4.
  • Command: cargo test --locked -p victory-gpu --lib --features diagnostics -- pipeline::make::tests::pipeline_log_ignores_empty_and_unwritable_paths --exact --test-threads=1 --quiet -> 1 passed; 0 failed; 248 filtered.
  • --features diagnostics required: the test lives behind that feature gate.
  • Negative control: git grep -F for the new test name on base 63bcca4 returned no hits (test absent on base).
  • git diff --check 63bcca4 HEAD exit 0 (clean).
  • Only the named synthetic log-path test was replayed; real D3D12 pipeline creation and the full suite were not exercised.
  • AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only path handling; no device needed). No game data, assets, shaders, DRM or decrypt used.
**@⁠cloph-dsp** on GitHub · 2026-11-27 08:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/3453#issuecomment-7213247044) Independent CPU-only verification of PR #3453 (`GPU: pipeline log ignores empty and unwritable paths`). - Windows, rustc/cargo 1.100.0/MSVC, fresh worktree-local `CARGO_TARGET_DIR` (`D:\Victory-Contrib\target-3453-verify`), `CARGO_BUILD_JOBS=2`. - Head `53596d8e7573a94a4c168fb330b82be415159536`, merge base `63bcca4`. - Command: `cargo test --locked -p victory-gpu --lib --features diagnostics -- pipeline::make::tests::pipeline_log_ignores_empty_and_unwritable_paths --exact --test-threads=1 --quiet` -> `1 passed; 0 failed; 248 filtered`. - `--features diagnostics` required: the test lives behind that feature gate. - Negative control: `git grep -F` for the new test name on base `63bcca4` returned no hits (test absent on base). - `git diff --check 63bcca4 HEAD` exit 0 (clean). - Only the named synthetic log-path test was replayed; real D3D12 pipeline creation and the full suite were not exercised. - AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only path handling; no device needed). No game data, assets, shaders, DRM or decrypt used.
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-27 08:37 UTC · original

NVIDIA full-suite run, to go with the reports above by cloph-dsp, oni-swr, since none of them names a GPU run. Tested exact head 53596d8 (on its base 63bcca4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 866 passed, 0 failed, 10 ignored.
  • pipeline_log_ignores_empty_and_unwritable_paths, pipeline_log_deduplicates_events_per_kind_and_key only build with the diagnostics feature, so the run above doesn't include them; they pass in cargo test -p victory-core -p victory-gpu -p victory-hle -p victory-loader -p victory-shader -p victory --lib --locked --features victory-core/diagnostics,victory-gpu/diagnostics,victory-hle/diagnostics,victory-loader/diagnostics,victory-shader/diagnostics,victory/diagnostics (same skips).
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#2571), so without the skip the rest of that crate never reports; dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-27 08:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/3453#issuecomment-7213746288) NVIDIA full-suite run, to go with the reports above by cloph-dsp, oni-swr, since none of them names a GPU run. Tested exact head `53596d8` (on its base `63bcca4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: **866 passed, 0 failed, 10 ignored**. - `pipeline_log_ignores_empty_and_unwritable_paths`, `pipeline_log_deduplicates_events_per_kind_and_key` only build with the `diagnostics` feature, so the run above doesn't include them; they pass in `cargo test -p victory-core -p victory-gpu -p victory-hle -p victory-loader -p victory-shader -p victory --lib --locked --features victory-core/diagnostics,victory-gpu/diagnostics,victory-hle/diagnostics,victory-loader/diagnostics,victory-shader/diagnostics,victory/diagnostics` (same skips). - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#2571), so without the skip the rest of that crate never reports; `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠passerbyyhx on GitHub · 2026-11-27 18:56 UTC · original

Windows synthetic verification at 53596d8e7573a94a4c168fb330b82be415159536.

I exercised the production pipeline log through actual compute PSO creation, first use and completion. On each of an RTX 4090 Laptop (621.14) and Microsoft WARP I ran three fresh processes per version, against this head and parent 63bcca43c6a00a758510398fa43096ce7e4f7df0.

With a missing parent directory at the first event, the head warned once. After creating that directory and building another key twice in the same process it still had no log. The parent silently created the log after the directory appeared and wrote three rows. A new process opening the now-valid path on both versions produced six rows (two shader keys × three event kinds) despite repeated events. An explicitly empty path yielded no file or warnings. Results agreed on both adapters.

Reproducible fixture. GTA-VI-3/EIGHT-20261127. AI-assisted with Codex.

**@⁠passerbyyhx** on GitHub · 2026-11-27 18:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/3453#issuecomment-7226033037) Windows synthetic verification at `53596d8e7573a94a4c168fb330b82be415159536`. I exercised the production pipeline log through actual compute PSO creation, first use and completion. On each of an RTX 4090 Laptop (621.14) and Microsoft WARP I ran three fresh processes per version, against this head and parent `63bcca43c6a00a758510398fa43096ce7e4f7df0`. With a missing parent directory at the first event, the head warned once. After creating that directory and building another key twice in the same process it still had no log. The parent silently created the log after the directory appeared and wrote three rows. A new process opening the now-valid path on both versions produced six rows (two shader keys × three event kinds) despite repeated events. An explicitly empty path yielded no file or warnings. Results agreed on both adapters. [Reproducible fixture](https://github.com/passerbyyhx/VIctory/commit/8b921fd3f6fb43d517164ed747802f37a009197a). GTA-VI-3/EIGHT-20261127. AI-assisted with Codex.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3453/head:github-bot/gh-3453'
git switch 'github-bot/gh-3453'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3453'
git switch 'github-bot/gh-3453'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3453'
git switch 'github-bot/gh-3453'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3453'
git switch 'main'
git merge --squash 'github-bot/gh-3453'
git switch 'main'
git merge --ff-only 'github-bot/gh-3453'
git switch 'main'
git merge 'github-bot/gh-3453'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!3453
No description provided.