GPU: save early pipeline keys without a native library #3751

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/3751 into main
andrewpozdnakov7-jpg commented 2026-11-28 14:54:56 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T14:54:56Z.


When the host has no native D3D12 pipeline library, persist the recorded startup keys in early-pipelines.txt. The next process can still schedule those pipelines earlier. The fallback uses the regular save interval and atomic file replacement. A failed write leaves the keys pending so the next save can retry.

The regression uses two Windows processes and generated keys. The first configures a cache with the native library unavailable, records a key, and forces an I/O error on the early-list path. After the error clears, a retry writes the first key, and a second save adds another one. The next process recognizes both keys through the startup lookup. On main the same regression fails because the first retry leaves the list absent. Only the early-list file is created by this path.

This covers the absence of the native library. #347 fixes how an empty native library is requested on Wine, and #3181 separates early-list writes from serialization with a library present.

The pipeline library test suite, both strict GPU Clippy configurations, and the asset policy passed on Windows.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5541378458 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3751). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T14:54:56Z. --- When the host has no native D3D12 pipeline library, persist the recorded startup keys in `early-pipelines.txt`. The next process can still schedule those pipelines earlier. The fallback uses the regular save interval and atomic file replacement. A failed write leaves the keys pending so the next save can retry. The regression uses two Windows processes and generated keys. The first configures a cache with the native library unavailable, records a key, and forces an I/O error on the early-list path. After the error clears, a retry writes the first key, and a second save adds another one. The next process recognizes both keys through the startup lookup. On main the same regression fails because the first retry leaves the list absent. Only the early-list file is created by this path. This covers the absence of the native library. #347 fixes how an empty native library is requested on Wine, and #3181 separates early-list writes from serialization with a library present. The pipeline library test suite, both strict GPU Clippy configurations, and the asset policy passed on Windows. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
andrewpozdnakov7-jpg commented 2026-11-28 14:58:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T14:58:30Z.


Windows CI passed on 948e7b3, including both Clippy configurations and the workspace tests. The two-process regression passed locally on the final patch. On main, the retry still left the early list absent. With this change the second process recognized both keys. The 12 pipeline-library tests also passed with app-local WARP 1.0.22 and Agility 1.620.2.

The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7241085916 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3751#issuecomment-7241085916). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T14:58:30Z. --- [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/46157099319/job/141016055385) passed on `948e7b3`, including both Clippy configurations and the workspace tests. The two-process regression passed locally on the final patch. On `main`, the retry still left the early list absent. With this change the second process recognized both keys. The 12 pipeline-library tests also passed with app-local WARP 1.0.22 and Agility 1.620.2. The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
cloph-dsp commented 2026-11-28 15:06:11 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-28T15:06:11Z.


Independent local verification (Windows, Rust 1.100.0/MSVC, no game data):

  • PR #3751 at head 948e7b3ec3712a200ef9aff937b335101243c949, base/parent 63bcca43c6a00a758510398fa43096ce7e4f7df0.
  • cargo test --locked -p victory-gpu --lib -- pipeline::library::tests::early_list_persists_without_a_host_library --exact --test-threads=1 --quiet → 1 passed, 0 failed, 232 filtered, exit 0.
  • cargo test --locked -p victory-gpu --lib -- pipeline::library::tests --test-threads=1 --quiet → 12 passed, 0 failed, 221 filtered, exit 0.
  • The synthetic test uses temp directories and two spawned subprocesses of the test binary; no native library, GPU device or game files are required. Two pre-existing fetch_update deprecation warnings in the lib test build.
  • git grep -F for the test name on the base returned no match (test is new on this PR); git diff --check 63bcca4 HEAD clean (1 file, +87/-10).
  • Used a per-worktree CARGO_TARGET_DIR (never shared) with CARGO_BUILD_JOBS=2.
  • Re-checked immediately before posting: OPEN, non-draft, MERGEABLE/CLEAN, zero APPROVED reviews, zero comments from cloph-dsp. Only the named test and its module were replayed; the full workspace suite and clippy were not run locally.
  • GPU/driver: N/A (CPU-only pipeline-library test). No game data, assets, extracted shaders, DRM or decrypt involved.

AI-assisted (Hy4 flash).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7241201893 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3751#issuecomment-7241201893). Originally posted by [cloph-dsp](https://github.com/cloph-dsp) on 2026-11-28T15:06:11Z. --- Independent local verification (Windows, Rust 1.100.0/MSVC, no game data): - PR #3751 at head `948e7b3ec3712a200ef9aff937b335101243c949`, base/parent `63bcca43c6a00a758510398fa43096ce7e4f7df0`. - `cargo test --locked -p victory-gpu --lib -- pipeline::library::tests::early_list_persists_without_a_host_library --exact --test-threads=1 --quiet` → 1 passed, 0 failed, 232 filtered, exit 0. - `cargo test --locked -p victory-gpu --lib -- pipeline::library::tests --test-threads=1 --quiet` → 12 passed, 0 failed, 221 filtered, exit 0. - The synthetic test uses temp directories and two spawned subprocesses of the test binary; no native library, GPU device or game files are required. Two pre-existing `fetch_update` deprecation warnings in the lib test build. - `git grep -F` for the test name on the base returned no match (test is new on this PR); `git diff --check 63bcca4 HEAD` clean (1 file, +87/-10). - Used a per-worktree `CARGO_TARGET_DIR` (never shared) with `CARGO_BUILD_JOBS=2`. - Re-checked immediately before posting: OPEN, non-draft, MERGEABLE/CLEAN, zero APPROVED reviews, zero comments from cloph-dsp. Only the named test and its module were replayed; the full workspace suite and clippy were not run locally. - GPU/driver: N/A (CPU-only pipeline-library test). No game data, assets, extracted shaders, DRM or decrypt involved. AI-assisted (Hy4 flash).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3751:upstream-pr/3751'
git switch 'upstream-pr/3751'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3751'
git switch 'upstream-pr/3751'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3751'
git switch 'upstream-pr/3751'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3751'
git switch 'main'
git merge --squash 'upstream-pr/3751'
git switch 'main'
git merge --ff-only 'upstream-pr/3751'
git switch 'main'
git merge 'upstream-pr/3751'
git push origin 'main'
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!3751
No description provided.