D3D12.X: journal a pipeline when the title first binds it #892
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/898"
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 ivall/xcl. Originally posted by JFyuhong on 2026-11-24T07:56:16Z.
Stacked on #758. Only the top commit
dc4300da36dabelongs to this PR.The journal's
Urecord determines which queued pipeline an offline compiler should prepare first. #758 emits it when a build succeeds. That gives speculative preloads priority and loses a requested pipeline when the title exits during its build.What is in it
real::go_backgroundtopso_async::Pendingand record demand once, before the first bind starts or waits for a build. The on-disk format stays compatible. Existing journals retain the meaning of marks their older writers already emitted.Tested
cargo test -p xcl --lib bind_journal_tests -- --nocapturewith the new cases on the old writer: 0 passed, 4 failed. On this patch: 4 passed, 0 failed, 0 ignored. Cases exercise failed builds, in-flight builds, eager work and historical speculative preloads.cargo build --workspaceandcargo test --workspace --no-fail-fast -- --test-threads=4: #758 parentb617c88: Cargo reported 702 passed, 0 failed, 41 ignored. Of the reported passes, 2 skipped GPU execution. PR head: Cargo reported 706 passed, 0 failed, 41 ignored. Of the reported passes, 2 skipped GPU execution. The same two tests,gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware, require wave64.xcl run, matched saved profile, 51 previously used shader sets and a fresh pipeline journal per run. On the parent, 43/47 newly bound, single-descriptor compute shader sets carried a use marker. The first parent run stopped in the display driver before the title screen and is excluded from this comparison. On the patched writer, 46/46 newly bound compute sets were marked. Each of the 6 newly bound graphics shader sets had a marked descriptor (6 of 208 recorded variants). Its last sampled image was loading artwork and the title still exited at+0x23cf683.cargo build --release --locked -p xclandscripts/smoke.ps1 -Game <read-only retail executable> -Seconds 60on both clean commits.Regression run
Main:
PR head:
Not tested
AI use
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T09:34:21Z.
Linux / AMD RDNA3 datapoint.
Merged state: head
dc4300donto main09940bb, clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 714 passed, 7 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows. pipeline journaling tests green.Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. My Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Imported from ivall/xcl. Originally posted by Aruku448 on 2026-11-24T14:58:01Z.
Tested #758 + #898 on a retail title (1.0.2.1, RX 7800 XT 16 GB, Ryzen 7 5700X3D, 32 GB, Windows 11, xcl
930e8b4+ #758's three commits + this one, MSVC release). The journal works; it does not move the load stall yet. Numbers, in case they help:pipeline journal: …\cache\pipelines.bin (0 entries from earlier runs); at the end the file is 127,914,049 bytes (122 MB).(65,948 entries from earlier runs)— 65,948 pipelines the title really bound.XCL_PSO_PRELOAD=0the journal is not consumed at all (expected — it feeds the preload queue). With preload on (default) the run still shows0 presents, 0 drawsat 118 s: ordering alone does not help, because throughput is the wall.xcl pipelinescommand the journal line mentions does not exist in this build:xcl pipelines --helpprints the general usage, and there is nopipelinessubcommand in the source of this stack. Is that CLI part of a follow-up PR?XCL_PIPELINE_THREADS=10) with the journal loaded gives the same shape as 4 or 6: a first interval with ~1,039 draws / 7,564 dispatches, then0x887a0006. Host commit reached 30,986 MB of 32 GB, so there is not much headroom to raise it further.The wall on this title: loading needs ~10 pipelines at once, one big translated program takes 16–50 s of driver time on this card (
862820 B DXIL → 49,947 ms), and the title's own watchdog fires 30 s after it stops getting GPU progress (+0x23cf683, "GPU Loc Sig", see #505).What does get the world drawing here:
XCL_PSO_WAIT_MS=50with a warm driver cache — 1,096 draws / 7,707 dispatches in one 2 s interval before0x887a0006. That is the best this machine reaches, and it matches what @Sr-0w reported in #891.Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:50:44Z.
Empirical test report (
dc4300da)Hardware / environment
dc4300da36dac7bc39ac69744af617c0214390c0on Windows x64 build10.0.26200.0, CPUAMD64 Family 23 Model 113 Stepping 0, AuthenticAMD. These fixtures used CPU, file I/O, and fake pipeline objects. They created no D3D12 device.rustc 1.100.0 (0ef1bc386 2026-11-09), hostx86_64-pc-windows-msvc. DXC version output wasdxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47). Cargo used the unoptimized test profile with debug info and incremental compilation disabled.Commands and results
cargo test --workspace --no-runexited 0 and compiled the workspace test targets. The build emitted a deprecation warning forAtomicU32::fetch_updatein XGameRuntime.cargo test -p xcl --lib bind_journal_testsexited 0 withXCL_ADAPTER=NONE_CPU_ONLYandRUST_TEST_NOCAPTURE=1, outsideInvoke-ArcTest.ps1. Libtest reported 4 passed, 0 failed, 0 ignored, and 682 filtered out in 1.38 s. The captured log contained 0SKIPPEDlines.Observed behavior
Not tested
The full GPU workspace suite and game smoke runs were omitted. The focused run covered the four fixtures added by this commit. Real D3D12 pipeline creation, shader execution, and driver behavior were outside those fixtures.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr898-focused.logand published.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T09:42:04Z.
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.Imported from ivall/xcl. Originally posted by S1m0ne1997 on 2026-11-25T14:06:09Z.
Test report for
dc4300da36dac7bc39ac69744af617c0214390c0(this PR's head), for #1607.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09)x86_64-pc-windows-msvc, debug.cargo build --workspace, thencargo test --workspace -- --test-threads=4at the head: 706 passed, 0 failed, 41 ignored.gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64).Regression run (retail title,
scripts/smoke.ps1 -Seconds 60, release;mainbuilt from the commit in its block, this PR from its head, no uncommitted changes)main:
this PR:
Not tested
AI use: Claude Code with Claude Opus 5.5 ran the build, the suite and the regression run and wrote this report at my request.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:26:36Z.
Triage (#1607) – head
dc4300dThis PR is stacked on #758 (its first three commits are #757's and #758's journal commits); only
dc4300dbelongs here, so it is not a duplicate of #757, #758 or #759. Main has no pipeline journal (pso_journal.rs), so it cannot land before #758.The top commit moves the
Umark from a successful build to the first bind (Pending::note_use, now aOnce).submit_askeeps the old send / key behaviour for the lazy and non-lazy paths, andused::notestill ignores key 0. No problems found in the diff. The PR will need a rebase onto #758's current head (c02d059).Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.