GPU: one host pipeline library for every adapter, so a WARP run discards the hardware one #2637
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#2637
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@CocoBeans64 on GitHub · 2026-11-25 17:22 UTC · original
host-pipelines.binis a single file in the cache folder. Aftertranslate --cache --pipelineson the GPU, a run withVICTORY_D3D12_WARP=1rejects 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. Runningtranslate --cache --pipelinesagain 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 referenced this issue2026-11-26 05:11:07 +00:00
@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.binstays 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.
@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.rsuses one file name,LIBRARY_FILE = "host-pipelines.bin", for every adapter.library()reads that file, and if the device rejects the blobopen()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:
host-pipelines-warp.binand 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 inhost.rsand needs a rebase.mainand 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
@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:main63bcca4. I used no game data.main?-D warnings(victory-gpu, default +diagnostics)63bcca4131993dpipeline::library: 13/13 passlibrary_file/prebuilt_filehelpers and do not compile onmain. They check only the file-name mapping, not the save pathhost-pipelines-warp.binandprebuilt-pipelines-warp.txt)crates/victory-gpu/src/host.rs. It is trivial: the newsoftwarefield sits next todepth_bounds_supportedfrom842b0cb, in the struct and in the initializer. I resolved it locally by keeping both for testinghost-pipelines.bin(the PR says so)d41fa99pipeline::library: 13/13 pass, 1 ignored. The ignoredeach_d3d12_device_uses_its_own_dxgi_adapteralso passes when run aloneadapter_cache_dir/read_cache/write_cacheand do not compile onmainadapters/software-1414-008c-00000000-00/{host-pipelines.bin,prebuilt-pipelines.txt})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
mainand 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 hardwareprebuilt-pipelines.txtmarker 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.main) and #2803 (merged ontomain): pass.Wider suites (
cargo test -p victory-gpu --features diagnostics --lib):mainfail the same 2 known NVIDIA tests (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views, #1744).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 touchesframe.rs.Review notes
crates/victory-gpu/src/pipeline/library.rs:404-409: if the DXGI adapter lookup fails,savewrites no library at all.mainsaves it in the cache root. This is unlikely on Windows, and the lookup is retried (it is no longer cached asNone). 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.hardware-10de-2786-…andhardware-1002-13c0-…), and WARP getssoftware-1414-008c-…. Under #2646 the two hardware adapters would sharehost-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".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
mainand 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).