Repository navigation
Description
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 the
title'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 a
shader 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 in
its 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 that
work, 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 change
in behaviour).- The journal: each desc field by field, its input layout, and its shaders by hash (each once),
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's
adapter, 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):
- 60 s run: the title queued 57 798 pipelines from 5 651 shaders (journal 123 MB).
- Run A with an empty DXIL cache: the title compiled 4 programs itself. Then
xcl pipelinesfor
8 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.) - Smoke runs,
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).
Activity
oishigeso commentedon Nov 24, 2026
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.