Repository navigation
Conversation
This was referenced Nov 24, 2026
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
Open
This was referenced Nov 24, 2026
oishigeso
force-pushed
the
pipelines-2-journal
branch
from
November 24, 2026 17:08
b617c88 to
5eaf7b3
Compare
…tion prep_graphics: what translated_graphics_pso did between its checks and the driver call (the translated shaders, XCL's ABI root signature with their static samplers, the rect list GS, PC formats and topology), returned with the DXIL it points at. No change in behaviour; a later change makes the same desc outside the title (xcl pipelines). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lines.bin) Every pipeline with console shaders that goes to pso_async (its DXIL not in the cache yet, or made lazily: a retail title queues ~58 000 in its first minute) is appended to a journal: its desc field by field (no pointers, no padding: the same pipeline always hashes the same), its input layout and its shaders by hash, each shader once, with the run's memory windows. A pipeline's first build is marked as used. Entries of earlier runs are not written again (found from the frames' headers, the shaders stay on disk); a torn last frame is cut off. One title process writes it at a time (others get none). The reader (replay) gives the desc back with everything it points to owned and no pointer from the file. Another process can compile the title's pipelines from it; XCL_PSO_JOURNAL=0 turns it off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…al for the run A frame is now noted as written only once all of it is on disk; a failed write (a full disk) is cut back to where it started, so later frames stay readable, and the journal is off for the rest of the run. An input layout count read from the file is checked against the bytes there before anything is allocated for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since xcl-dev#680 `pso::mem_windows` carries HEAP_WINDOWS (0x100) when the title's shaders take the memory windows from the descriptor heap (XCL_HEAP_WINDOWS=1). The frame's windows byte cut it off, so a heap-window run's pipelines read as the switch form's. The count stays in the low 7 bits and the flag goes in the top bit (`windows_byte`, `mem_windows_of`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013hQzywPUY9kSTPQPh31CWh
oishigeso
force-pushed
the
pipelines-2-journal
branch
from
November 24, 2026 18:11
5eaf7b3 to
0cc1dee
Compare
…s only to append The first pipeline the title noted read the frame headers of every earlier run (about 63 000 for a 123 MB journal) with the journal's lock held, and each later one hashed its shaders and desc under the same lock, so the title's pipeline threads waited on one another. An entry is now built and hashed with no lock held, and the lock covers its append only. The journal is opened on a thread of its own; what is noted meanwhile waits in memory, each frame once (up to 256 MB, past which the journal is off for the run), and is written in order once it is open. `XCL_PSO_JOURNAL` is read once, and a journal turned off stops entries being built at all. A panic on another thread while it held the lock no longer ends the journal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013hQzywPUY9kSTPQPh31CWh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 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
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 Recompiler: memory windows from the descriptor heap (no per-access switch) #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, on f4ce27ccargo 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