gpu: create the empty pipeline library, skip hung pipelines at creation, and trace the queue #3
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/edsuuu--VI-BR-PORT!3
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/3/head"
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?
@vilja22 on GitHub · 2026-11-26 23:50 UTC · original
vilja22:pipeline-fixes→main· +58 −3 · 3 files · 1 commits · merged 2026-11-27 00:40 UTCThree small fixes that made it possible to test RT here, plus one finding about the
pipeline library. They are independent of the
LaneMirrorPR.1. The empty pipeline library is never created (
library.rs)open()builds an empty library withdevice.CreatePipelineLibrary(bytes)wherebytesis empty. The generated binding passesbytes.as_ptr(), which for an empty sliceis a dangling non-null pointer; vkd3d-proton rejects a non-null zero-length blob
(
E_INVALIDARG),open()returnsNone, and the library is never created or saved. Inour logs every save was
bytes=0.The fix calls the vtable directly with a null pointer and length 0 for the empty case.
2. Skipped pipelines are still created (
pipeline.rs,make.rs)VICTORY_SKIP_PIPELINEScurrently drops the draws, butstart()still queues and buildsthe pipeline. A few of these hang the driver's compiler, so several workers end up stuck
and the whole make queue stops (the game then holds the last frame).
creates_skipped(&shaders)is exposed frompipeline.rsandstart()returns early forthose pipelines; their draws were already dropped.
3.
VICTORY_PIPELINE_TRACE(make.rs)Writes
start <key> <shaders>before the build andend <key>after it, so a pipelinethat never finishes is named. A
Mutexserializes the writes; without it parallelworkers interleave lines (our first version did).
With it we found the queue stopping after the six known RT passes on
53c898f8332f08bc,b3744522a4662623,2da4beb386509b77(also the only "refused"one),
c2d3fdeffa839418,9ad3577822ed8af2,d50c03da6d935d87.4. Finding: the PSO library is keyed by shader hashes only
After any translator change (
VICTORY_FIRSTLANE_OWN,LaneMirror, a new build), thepipeline library is still accepted: its entries match the same shader hashes, but hold
PSOs built from the old DXIL. The game then serves stale pipelines (or re-translates
while holding a frame). Deleting
pipelines/host-pipelines.binis required for a cleantest. Worth documenting, or including the translator hash in the library key.
Testing
cargo xwin build --profile release -p victory --features diagnostics --target x86_64-pc-windows-msvc— clean.the trace names the pending pipelines (logs available on request).
Licence
GPL-3.0-or-later, same as the repository. The skip and trace are our own; the library fix
is the same one victory-perf carries (
CreatePipelineLibrary(NULL, 0)).