D3D12.X: a journal of the pipelines a title queues (<data>\cache\pipelines.bin) #758
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!758
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-758"
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?
@oishigeso on GitHub · 2026-11-24 04:44 UTC · original
oishigeso:pipelines-2-journal→main· +647 −25 · 3 files · 5 commits · draftPart 2 of 3 for #755. Stacked on #757; its own commits are the four after #757's head (the journal, its write-error handling, the heap-window flag, the journal off the title's threads).
Every pipeline with console shaders that goes to
pso_async(DXIL not cached yet, or madelazily) is appended to
<data>\cache\pipelines.bin. Each entry holds its desc field by field,with no pointers and no padding, so the same pipeline always hashes the same. It also holds the
input layout and its shaders by hash (each shader written once), together with the run's memory
windows. A pipeline's first build is marked as used. On open, only the frames' headers are read
to skip entries of earlier runs, and a torn last frame is cut off. One title process writes at a
time; a second one gets no journal.
replayreads an entry back with everything it points toowned and no pointer taken from the file. Part 3 (
xcl pipelines) compiles from it.XCL_PSO_JOURNAL=0turns it off.It is on by default in this PR: per pipeline the journal costs an fnv64 of its desc and shader bytes, made with
no lock held, and for a new one an append under the journal's lock. The frame headers of earlier
runs (about 63 000 for a 123 MB journal) are read on a thread of its own; what the title notes
meanwhile waits in memory (each frame once, at most 256 MB) and is written once it is open. The
tool in part 3 has nothing to read without it. 605 lines (
pso_journal.rs597), about 150 of them the reader and the tests.What is in it
gives the same hash (
crates/xcl/src/hle/d3d12x/pso_journal.rs)go_background(crates/xcl/src/hle/d3d12x/real.rs) and the module(
crates/xcl/src/hle/d3d12x/mod.rs)windows_byte,mem_windows_of), with a testTested
c02d059(opened on its own thread, the lock for appends only):cargo test -p xcl --lib -- pso_journal --test-threads=1: 3 passed, 0 failed, with the newwhat_is_noted_while_the_journal_opens_is_written_after_in_order; the run below opened a journal of 122 806 entries from earlier runs and appended to itmain9e3831e:cargo test -p xcl --lib -- pso_journal --test-threads=1: 2 passed, 0 failed, with the newthe_heap_windows_flag_is_kept(0cc1dee: since #680mem_windowscarriesHEAP_WINDOWS= 0x100, which the frame's windows byte cut off; the count is now in its low 7 bits and the flag in the top bit). The workspace run below is from before the rebase, onf4ce27ccargo test --workspace -- --test-threads=4: 659 passed, 3 failed, 21 ignored; the 3 failures (title_textures::placed_title_textures_share_vram_and_preserve_pixels,title_textures::transitions_apply_when_their_list_is_submitted,vram::d32s8_targets_take_their_own_size_of_video_memory) fail onmain(f4ce27c) the same way in a full run (657 passed, 3 failed there) and pass alone; no GPU test SKIPPED(
pipelines.bin: 123 MB)Regression run
main:
PR (this PR's head commit; the title is run through a folder named RetailTitle):
The first smoke run on this commit crashed at 31.7 s in the title's own code (a write to 0,
game_scarlett_master.exe+0x2215c35, during the Series S startup stall upstream still has); the run above, on the same build, is the re-run.Not tested
AI use
@futurepro62 on GitHub · 2026-11-24 07:06 UTC · original
Full-suite run, since this PR has no test report yet. Tested exact head
b617c88(on its basef4ce27c).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 702 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.graphics_round_trip.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 11:16 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.