GPU: keep unrelated pipeline library loads from blocking each other #1442
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1442"
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?
Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-27T07:25:34Z.
Summary
Serialize D3D12 library loads when they refer to the same pipeline name. The current 64 shared lock slots can also serialize unrelated names. A foreground compute load can then wait seconds for a different pipeline's native load.
A warmed checkpoint replay on an RTX 5060 Laptop showed two such collisions on the title thread during the same loading frame. The wait before the native call was 7.627 s for a load taking 1.128 ms, and 14.819 s for a load taking 42.419 ms. In each case the delay matched a different name holding the same slot. The title reached its loading watchdog.
Track names only for the duration of each load and release the registry lock before calling D3D12. A load of the same name still waits until the first completes. The existing all-library lock option and store/save synchronization keep their current behavior.
Verification
9a9091dand passed with the patch. The same-name serialization test passed on both builds.cae8353ed7959c4+).Assisted by Codex (GPT-6.2-Sol High).
Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-27T07:28:33Z.
I replayed the checkpoint on the RTX 5060 with the same GE-Proton11-14 runtime, launch settings and starting native caches. Changing only the name-lock implementation reduced the two measured waits before the native load from 7.627 s and 14.819 s to 26 µs and 37 µs. Both loads returned successfully.
The later recording threads still spent up to 28.1 s on a series of compute pipeline builds in one loading frame, and the title still reached its watchdog. This verifies removal of the unrelated-name delays on hardware. World entry remains open.
The first Windows CI run stops in unchanged shader code at the Clippy errors addressed by #1440. The staged asset policy for this PR passes; a full local scan also reports the file-size failures already present on this base in
host.rsandlower.rs.A separate CI integration branch combines this patch with the shared lint and file-size fixes at
0206a5a6ac6aa089a906649bb04cfefb13e9e5a4. Both Windows MSVC workspace Clippy modes, the full 246-file policy scan, the pipeline regressions, and the RTX IEEE comparison fixture passed locally. The PR branch remains scoped to the pipeline lock.Assisted by Codex (GPT-6.2-Sol High).
Imported from fxceless/victory-fork. Originally posted by UwUCammie on 2026-11-27T07:36:05Z.
Both name-lock tests passed on my RX 7900 XT with RADV 26.3.1, Wine 11.22 and GE vkd3d-proton
cae8353ed7959c4. The AMD branch's existing empty-library test failed on that stack until I also applied the null-blob fix from AMD #4. With both patches, all seven library tests passed. The AMD backport keeps the name-lock change separate. A cold story boot still needs its own timing.Imported from fxceless/victory-fork. Originally posted by lukinhasnojento on 2026-11-27T14:53:36Z.
Follow-up test context (2026-11-27): a later build using the pipeline pre-build approach in PR #1226, with early-use keys identified from a prior run involving the #1450/#1442 changes, advanced into the prologue without reproducing +0x23cf683 in the observed window. The tested build was based on the pre-build PR, not this PR, so this is not evidence that #1442 prevents the watchdog. Performance remained very low and draws were still dropped; this is a preliminary single-run observation, not a confirmed fix. No game files, derived assets, screenshots, or raw logs are attached.
Imported from fxceless/victory-fork. Originally posted by akimfomin on 2026-11-28T01:56:30Z.
For
c13e2a39, I compared the relevant behavior with klbf-lab #56. Compare two unrelated cache keys populated concurrently, with a same-key writer as a serialization control. Keep adapter-key generation and atomic publication explicit. This is a pinned source comparison; the suggested case still needs a receiving-side run.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.