Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,19 +240,27 @@ Fill the reusable DXIL cache ahead of a run with the read-only package wrapper.
<details>
<summary><b>Switches, caches, logs and the files XCL writes</b></summary>

- When a game folder contains a `shaders.rpf` shader pack or loose `.dxbc` files under
`shaders/`, XCL shows shader preparation in the game window before executing title code.
The same window then presents the game. The percentage counts
processed records. The timer counts seconds since one finished (or preparation started);
five seconds without progress counts as a stall, and the window shows when the last one ended.
XCL prepares supported shader stages and compute pipelines, including
split pieces and their whole fallback. Graphics pipelines are created during play the first
time; the ones a run used are recorded with their state (`used-graphics-pipelines.bin` beside
the shader cache, at most `XCL_GFX_RECORDS_MB`, default 64) and built before the title starts
on the next launch, with their driver blobs kept, so the title makes them from those in
milliseconds. `XCL_PREPARE_GRAPHICS=0` leaves that pass out. Later launches reuse matching cache entries.
Closing the window cancels the launch. A compiler or driver failure stops it and reports
the cause. Null-renderer runs skip shader preparation. With presentation disabled, the gate runs without a window.
- XCL uses the game window to show preparation progress before executing title code. It prepares
supported shader packs, supported loose shaders under `shaders/`, recorded graphics history and
staged pipeline recipes. Closing the window cancels launch. A failed staged recipe stops launch.
With presentation disabled, preparation runs without a window. A staged corpus still gates
launch when the null renderer is selected.
- To prepare known graphics, two-pass mesh and compute recipes offline, use a local
[archive layout profile](scripts/pso_corpus/archive-profile.md) with the following commands.
The staging command accepts several journals and deduplicates their recipes.

```powershell
python scripts/pso_corpus/pso_archive.py profile.json archive.bin pipelines.bin
python scripts/pso_corpus/stage.py --title <title-folder> pipelines.bin
xcl shaders <title-folder> --prepare-corpus --threads 8
```

The offline command accepts up to 32 workers. Normal launch also prepares the staged corpus.
When a shader pack or local history overlaps the corpus, XCL prepares each exact match once.
Use the same adapter and memory-window
configuration for offline preparation and play so the driver can reuse the results.
Graphics state combinations absent from the supplied recipes and local history can still
require a first-use compile during play.
- For compute shaders that XCL can split, the runtime first tries the saved driver blob for
the whole shader. A usable blob lets the GPU run it in one dispatch. If the blob is missing
or the driver rejects it, XCL builds the split pieces.
Expand Down
Loading
Loading