Compile a title's queued pipelines outside the title (xcl pipelines) #755
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#755
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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:43 UTC · original
Problem. A retail title queues ~58 000 pipelines with console shaders in its first minute
(
pso_async, lazy). Every one is translated, compiled by DXC and then by the driver inside thetitle's process, at the latest when the title first binds it. #690 builds the pipelines an
earlier run used ahead of their first use, and #634 keeps compute blobs on disk. Both of those
work inside the title, from the second run on, and only for pipelines already used.
xcl shaders --precompile [--pipelines]covers single programs and compute pipelines from ashader package, but not the graphics pipelines (VS + PS + state, input layout, target formats)
the title creates. Those are only known at run time.
Proposal. The title writes the pipelines it queues to a journal
(
<data>\cache\pipelines.bin). A new command,xcl pipelines <game> [--watch], makes them inits own process: before the next run, or next to a running title. It fills the DXIL cache, the
driver's cache and #634's
driver_cache, so neither the title's process nor its threads do thatwork, including for pipelines no run has used yet.
Three stacked PRs:
prep_graphics: the PC desc of a translated VS / PS pipeline in its own function (no changein behaviour).
with the run's memory windows; pipelines the title built are marked as used. It is
append-only, written by one title process at a time;
XCL_PSO_JOURNAL=0turns it off.xcl pipelines: makes each pipeline on its own device as the title would (the title'sadapter, the used ones first), at below-normal priority on half the cores. It can be resumed,
and failures are retried. GS / HS / DS and mesh pipelines are left to the title.
Measured (RX 6700 XT, retail title, 60 s smoke runs, each with its own empty DXIL cache):
xcl pipelinesfor8 min into another empty cache. Run B with only that cache: 4 hits, 0 compilations in the
title. (Few in absolute terms: the title builds lazily, and 60 s ends in its loading screen.)
mainand the stack: exit 0x0, no crash or device removal, 395 / 479 frames.Is this a direction you would take? The three PRs are open as drafts (#757, #758 and #759, stacked in that order) and wait for your answer here. Written with Claude Code (Claude Opus 5.5).
title_memory_budget_mbis 13,824 MB regardless of the adapter's memory #1337@oishigeso on GitHub · 2026-11-24 06:06 UTC · original
A fuller measurement, as the first one counted only the 4 programs a 60 s run compiles before its loading screen.
For it, a local build of #759's head adds a read-only counter (
XCL_PSO_PROBE, not part of the PRs): on a thread of its own it checks, for every pipeline the title hands topso_async, whether its DXIL is already in the cache as the title would ask for it (same device, memory windows and wave width), without compiling anything. RX 6700 XT, Series S profile, a fresh data folder and DXIL cache per run, 60 s each:xcl pipelines, title closed, 10 min51210 done before.--watchnext to a running title.Written with Claude Code (Claude Opus 5.5); the runs were made on my PC.