GPU: one host pipeline library for every adapter, so a WARP run discards the hardware one #2637

Open
opened 2026-11-26 05:10:55 +00:00 by github-bot · 3 comments
Owner

@⁠CocoBeans64 on GitHub · 2026-11-25 17:22 UTC · original

host-pipelines.bin is a single file in the cache folder. After translate --cache --pipelines on the GPU, a run with VICTORY_D3D12_WARP=1 rejects it ("Le blob fourni n'est pas adapté à la carte…"), starts an empty library, and saves that over the file. The next hardware run rejects the WARP library in turn and makes every pipeline during play. Running translate --cache --pipelines again restores it. Suggestion: name the library by adapter (vendor, device ID, driver version) or by WARP versus hardware.
Seen on Windows 10 19045, RX 6800 XT, at 67e8ae1.

**@⁠CocoBeans64** on GitHub · 2026-11-25 17:22 UTC · [original](https://github.com/Marvisak/VIctory/issues/2637) `host-pipelines.bin` is a single file in the cache folder. After `translate --cache --pipelines` on the GPU, a run with `VICTORY_D3D12_WARP=1` rejects it ("Le blob fourni n'est pas adapté à la carte…"), starts an empty library, and saves that over the file. The next hardware run rejects the WARP library in turn and makes every pipeline during play. Running `translate --cache --pipelines` again restores it. Suggestion: name the library by adapter (vendor, device ID, driver version) or by WARP versus hardware. Seen on Windows 10 19045, RX 6800 XT, at `67e8ae1`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:10:55 +00:00
Author
Owner

@⁠Creaa on GitHub · 2026-11-25 17:25 UTC · original

Taking this: a WARP host keeps its library in its own file (host-pipelines-warp.bin), so a WARP run neither rejects nor overwrites the hardware one (host-pipelines.bin stays the name for hardware, so existing caches stay valid). With a test of the file name per host kind.

AI use: Claude Code (Claude Opus 5.5) drafted this.

**@⁠Creaa** on GitHub · 2026-11-25 17:25 UTC · [original](https://github.com/Marvisak/VIctory/issues/2637#issuecomment-7169482939) Taking this: a WARP host keeps its library in its own file (`host-pipelines-warp.bin`), so a WARP run neither rejects nor overwrites the hardware one (`host-pipelines.bin` stays the name for hardware, so existing caches stay valid). With a test of the file name per host kind. AI use: Claude Code (Claude Opus 5.5) drafted this.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 18:46 UTC · original · edited 2026-11-26 06:48 UTC

Automated triage for the maintainers.

Confirmed in main: crates/victory-gpu/src/pipeline/library.rs uses one file name, LIBRARY_FILE = "host-pipelines.bin", for every adapter. library() reads that file, and if the device rejects the blob open() starts an empty library, which is later saved over the same file. A WARP run therefore replaces the hardware library, and the next hardware run does the same to the WARP one.

Open PRs:

  • #2646 gives a WARP host its own host-pipelines-warp.bin and keeps the hardware name, so existing caches stay valid; two different hardware adapters sharing one cache folder would still share a file. It now has a small conflict in host.rs and needs a rebase.
  • #2803 (new since the last triage) keys the library by adapter in its own folder, which also covers hybrid-GPU machines; it merges cleanly. A comparison on an RTX 4070 and WARP found a WARP-next-to-hardware test fails on main and passes with either. One edge noted in #2803: if the adapter lookup fails, no library is saved.

Which form to take is for the maintainers.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 18:46 UTC · [original](https://github.com/Marvisak/VIctory/issues/2637#issuecomment-7171379181) · edited 2026-11-26 06:48 UTC <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-26T04:22:33Z at=2026-11-26T07:24:00Z --> Automated triage for the maintainers. Confirmed in `main`: `crates/victory-gpu/src/pipeline/library.rs` uses one file name, `LIBRARY_FILE = "host-pipelines.bin"`, for every adapter. `library()` reads that file, and if the device rejects the blob `open()` starts an empty library, which is later saved over the same file. A WARP run therefore replaces the hardware library, and the next hardware run does the same to the WARP one. Open PRs: - #2646 gives a WARP host its own `host-pipelines-warp.bin` and keeps the hardware name, so existing caches stay valid; two different hardware adapters sharing one cache folder would still share a file. It now has a small conflict in `host.rs` and needs a rebase. - #2803 (new since the last triage) keys the library by adapter in its own folder, which also covers hybrid-GPU machines; it merges cleanly. A comparison on an RTX 4070 and WARP found a WARP-next-to-hardware test fails on `main` and passes with either. One edge noted in #2803: if the adapter lookup fails, no library is saved. Which form to take is for the maintainers. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠pawrenity on GitHub · 2026-11-26 04:22 UTC · original

#2646 and #2803 compared

Hardware: NVIDIA GeForce RTX 4070, Windows 11, plus WARP (--features diagnostics, VICTORY_D3D12_WARP=1). Base: main 63bcca4. I used no game data.

PR head own tests own test fails on main? neutral cross test (below) clippy -D warnings (victory-gpu, default + diagnostics) merges onto 63bcca4 defects
#2646 131993d pipeline::library: 13/13 pass n/a: the tests call the new library_file/prebuilt_file helpers and do not compile on main. They check only the file-name mapping, not the save path pass (saves host-pipelines-warp.bin and prebuilt-pipelines-warp.txt) clean conflict in crates/victory-gpu/src/host.rs. It is trivial: the new software field sits next to depth_bounds_supported from 842b0cb, in the struct and in the initializer. I resolved it locally by keeping both for testing none found. Scope limit: two hardware adapters still share host-pipelines.bin (the PR says so)
#2803 d41fa99 pipeline::library: 13/13 pass, 1 ignored. The ignored each_d3d12_device_uses_its_own_dxgi_adapter also passes when run alone n/a: the tests call the new adapter_cache_dir/read_cache/write_cache and do not compile on main pass (saves adapters/software-1414-008c-00000000-00/{host-pipelines.bin,prebuilt-pipelines.txt}) clean clean one minor edge case (below)

Neutral cross test. The two PRs' own tests use different internal helpers, so neither runs against the other's fix. I wrote one behavioural test instead. It uses only code common to main and both PRs (use_pipeline_cache, note_prebuilt, save(true)), and it runs in its own process on a WARP host. It puts a 40-byte hardware library marker and a hardware prebuilt-pipelines.txt marker in the cache folder, runs a WARP save, and then checks that both markers are byte-identical and that a WARP library and list were written somewhere else.

  • main: fails. The 40-byte marker is replaced by the WARP library, which reproduces #2637.
  • #2646 (merged onto main) and #2803 (merged onto main): pass.

Wider suites (cargo test -p victory-gpu --features diagnostics --lib):

  • RTX: both PRs and main fail the same 2 known NVIDIA tests (dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views, #1744).
  • WARP: everything else passes. frame::tests::waits_end_on_ticks_and_count_frames, a 50 ms timing assertion, failed under concurrent load in two runs (#2646 on WARP, #2803 on RTX). It passed when re-run alone with --test-threads=1. Neither PR touches frame.rs.

Review notes

  • #2803, crates/victory-gpu/src/pipeline/library.rs:404-409: if the DXGI adapter lookup fails, save writes no library at all. main saves it in the cache root. This is unlikely on Windows, and the lookup is retried (it is no longer cached as None). The lookup also runs while the library state lock is held, which matters only while it keeps failing. This point was already raised in the PR thread.
  • #2803: this machine also exposes an AMD Radeon adapter besides the RTX 4070. The all-adapters test gave them distinct folders (hardware-10de-2786-… and hardware-1002-13c0-…), and WARP gets software-1414-008c-…. Under #2646 the two hardware adapters would share host-pipelines.bin. That matters only when the default adapter changes, for example through the Windows GPU preference on a hybrid machine. The issue's own suggestion was "by adapter … or by WARP versus hardware".
  • #2646 is smaller (2 files, +64/-5) and keeps every existing path. #2803 is larger (1 file, +241/-28). It also changes save: saves are serialised, the early list is written on its own, and the counters are restored when a write fails. It reads the legacy root files when an adapter has no cache yet and never writes them. I found no defect in that logic.

Recommendation. Both fix the reported WARP/hardware overwrite: the same behavioural test fails on main and passes on each. #2803 is the more complete fix: it keys the cache by adapter, which also covers hybrid GPUs, and it merges cleanly today. The cost is a larger diff and the root-fallback edge case above. #2646 is the minimal fix and needs a trivial rebase. If the maintainers want the per-adapter behaviour, #2803 supersedes #2646. If not, #2646 after a rebase is enough for the issue as reported.

Not tested: a title run, and a machine that actually switches its default adapter.

AI-assisted (Claude Code).

**@⁠pawrenity** on GitHub · 2026-11-26 04:22 UTC · [original](https://github.com/Marvisak/VIctory/issues/2637#issuecomment-7182539782) ## #2646 and #2803 compared Hardware: NVIDIA GeForce RTX 4070, Windows 11, plus WARP (`--features diagnostics`, `VICTORY_D3D12_WARP=1`). Base: `main` `63bcca4`. I used no game data. | PR | head | own tests | own test fails on `main`? | neutral cross test (below) | clippy `-D warnings` (`victory-gpu`, default + `diagnostics`) | merges onto `63bcca4` | defects | |---|---|---|---|---|---|---|---| | #2646 | `131993d` | `pipeline::library`: 13/13 pass | n/a: the tests call the new `library_file`/`prebuilt_file` helpers and do not compile on `main`. They check only the file-name mapping, not the save path | **pass** (saves `host-pipelines-warp.bin` and `prebuilt-pipelines-warp.txt`) | clean | **conflict** in `crates/victory-gpu/src/host.rs`. It is trivial: the new `software` field sits next to `depth_bounds_supported` from 842b0cb, in the struct and in the initializer. I resolved it locally by keeping both for testing | none found. Scope limit: two hardware adapters still share `host-pipelines.bin` (the PR says so) | | #2803 | `d41fa99` | `pipeline::library`: 13/13 pass, 1 ignored. The ignored `each_d3d12_device_uses_its_own_dxgi_adapter` also passes when run alone | n/a: the tests call the new `adapter_cache_dir`/`read_cache`/`write_cache` and do not compile on `main` | **pass** (saves `adapters/software-1414-008c-00000000-00/{host-pipelines.bin,prebuilt-pipelines.txt}`) | clean | clean | one minor edge case (below) | **Neutral cross test.** The two PRs' own tests use different internal helpers, so neither runs against the other's fix. I wrote one behavioural test instead. It uses only code common to `main` and both PRs (`use_pipeline_cache`, `note_prebuilt`, `save(true)`), and it runs in its own process on a WARP host. It puts a 40-byte hardware library marker and a hardware `prebuilt-pipelines.txt` marker in the cache folder, runs a WARP save, and then checks that both markers are byte-identical and that a WARP library and list were written somewhere else. - `main`: **fails**. The 40-byte marker is replaced by the WARP library, which reproduces #2637. - #2646 (merged onto `main`) and #2803 (merged onto `main`): **pass**. **Wider suites** (`cargo test -p victory-gpu --features diagnostics --lib`): - RTX: both PRs and `main` fail the same 2 known NVIDIA tests (`dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`, #1744). - WARP: everything else passes. `frame::tests::waits_end_on_ticks_and_count_frames`, a 50 ms timing assertion, failed under concurrent load in two runs (#2646 on WARP, #2803 on RTX). It passed when re-run alone with `--test-threads=1`. Neither PR touches `frame.rs`. **Review notes** - #2803, `crates/victory-gpu/src/pipeline/library.rs:404-409`: if the DXGI adapter lookup fails, `save` writes no library at all. `main` saves it in the cache root. This is unlikely on Windows, and the lookup is retried (it is no longer cached as `None`). The lookup also runs while the library state lock is held, which matters only while it keeps failing. This point was already raised in the PR thread. - #2803: this machine also exposes an AMD Radeon adapter besides the RTX 4070. The all-adapters test gave them distinct folders (`hardware-10de-2786-…` and `hardware-1002-13c0-…`), and WARP gets `software-1414-008c-…`. Under #2646 the two hardware adapters would share `host-pipelines.bin`. That matters only when the default adapter changes, for example through the Windows GPU preference on a hybrid machine. The issue's own suggestion was "by adapter … or by WARP versus hardware". - #2646 is smaller (2 files, +64/-5) and keeps every existing path. #2803 is larger (1 file, +241/-28). It also changes `save`: saves are serialised, the early list is written on its own, and the counters are restored when a write fails. It reads the legacy root files when an adapter has no cache yet and never writes them. I found no defect in that logic. **Recommendation.** Both fix the reported WARP/hardware overwrite: the same behavioural test fails on `main` and passes on each. #2803 is the more complete fix: it keys the cache by adapter, which also covers hybrid GPUs, and it merges cleanly today. The cost is a larger diff and the root-fallback edge case above. #2646 is the minimal fix and needs a trivial rebase. If the maintainers want the per-adapter behaviour, #2803 supersedes #2646. If not, #2646 after a rebase is enough for the issue as reported. Not tested: a title run, and a machine that actually switches its default adapter. AI-assisted (Claude Code).
This discussion has been locked. Commenting is limited to contributors.
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#2637
No description provided.