D3D12.X: pipelines an earlier run used are built ahead of their first use #690

Manually merged
github merged 1 commit from gh-pr/690/head into gh-pr/690/base 2026-11-26 04:29:34 +00:00
Owner

@⁠theaustinayers on GitHub · 2026-11-24 03:32 UTC · original
theaustinayers:pso-preload → main · +245 −21 · 3 files · 1 commits · merged 2026-11-24 03:38 UTC

A lazy pipeline (#162) is built at its first use: until then a graphics one draws nothing and a compute one is waited for on the title's thread. A retail title's first frames of its world use hundreds of pipelines for the first time at once. This keeps which pipelines a title used and builds those ahead of their first use in the next run, while the title loads.

I searched the open PRs first: #628 orders the worker pool's queue, #533 / #267 bound the waits, #214 / #567 the compile concurrency; none builds a pipeline before its first use. This works with any of them.

What is in it

  • crates/xcl/src/hle/d3d12x/pso_async.rs: mod used – the shader-set keys of pipelines a run used, appended to used-pipelines.txt beside the DXIL cache and read at the start of the next run; preload – two to four workers at the lowest thread priority, apart from the ones a bind sends to, that build a lazy pipeline as soon as it is made when an earlier run used one of its shaders (whoever takes the job first builds it, so a bind is never held up by them). submit_lazy takes the key; resolve / resolve_wait note the first use. XCL_PSO_PRELOAD=0 turns it off. Pipelines no run used stay lazy as before.
  • crates/xcl/src/hle/d3d12x/real.rs: shaders_key (a hash of the pipeline's shader blobs in their order), passed from go_background.
  • crates/xcl/src/hle/d3d12x/bind.rs: the three submit_lazy calls of an existing test get the new argument.
  • Tests: the_keys_of_a_file_are_read_and_other_lines_passed_over, a_pipeline_an_earlier_run_used_is_built_ahead_of_its_first_use (built with no bind when an earlier run used it, still pending when none did, and a first use is kept), a_key_follows_the_shaders_and_their_order_and_is_never_zero.

Tested

  • RTX 5090 (driver 621.14), Ryzen 9 9950X3D, 128 GB, Windows 11 build 26300, rustc 1.100.0.
  • cargo build --workspace, then cargo test --workspace -- --test-threads=4 on 2e36ce0: 695 passed, 0 failed, 41 ignored. The head commit 7296a8b differs from it in a doc comment and the commit message only; on it I reran cargo test --release -p xcl --lib -- used_tests shaders_key_tests: 3 passed.
  • SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • A retail title, release build, with a used-pipelines.txt of 1197 shader sets from earlier runs: 512 pipelines were built ahead within 5.2 s of the start (the log line is printed at powers of two), in the smoke run below and in a 200 s run into the title's world.
  • What it buys depends on what happens to a pipeline that is not ready. On main a compute pipeline is waited for, and the title's world still ends at its watchdog with this PR as without it (102 s without, 106 s with: no difference I can claim). On a build of mine that skips a dispatch instead of waiting (bounded waits, as #533 does), the title's first world frames skipped ~2 170 dispatches without this and 94 – 150 with it, in runs on this machine.

Regression run

Both runs had the same scripted input (XCL_PRESS_AT, A at 20 s and so on), so they leave the title's first menu and go on into its loading, where its pipelines are made.

main:
```
xcl-smoke v1
commit: 91f9a5e9f0
gpu: NVIDIA GeForce RTX 5090
title: NYCMain
seconds: 60
exit: 0x0
frames shown: 1311 (PresentX 1311)
presents per 2 s (last 3): 2 2 0
device removals: 0
crashes: 0
peak commit: 22607 MB


this PR:
```
xcl-smoke v1
commit: 7296a8bd42a2e96c22c1a7dbb1f39b252cf4e589
gpu: NVIDIA GeForce RTX 5090
title: NYCMain
seconds: 60
exit: 0x0
frames shown: 1339 (PresentX 1339)
presents per 2 s (last 3): 3 10 0
device removals: 0
crashes: 0
peak commit: 23008 MB

Not tested

  • A first run with no used-pipelines.txt: nothing is built ahead then (covered by the unit test's pipeline that no run used, not by a title run with the file removed).
  • The memory of the pipelines built ahead over a long session: the file only grows (1197 keys after ~20 runs to the start of the title's world); the smoke runs show 23.0 GB peak commit against 22.6 GB on main.
  • AMD and Intel GPUs; other titles.

AI use

  • Claude Code, Claude Fable 5.2: wrote the change, the tests and this description, and ran the builds, tests and runs above on the hardware named.
**@⁠theaustinayers** on GitHub · 2026-11-24 03:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/690) `theaustinayers:pso-preload` → `main` · +245 −21 · 3 files · 1 commits · merged 2026-11-24 03:38 UTC A lazy pipeline (#162) is built at its first use: until then a graphics one draws nothing and a compute one is waited for on the title's thread. A retail title's first frames of its world use hundreds of pipelines for the first time at once. This keeps which pipelines a title used and builds those ahead of their first use in the next run, while the title loads. I searched the open PRs first: #628 orders the worker pool's queue, #533 / #267 bound the waits, #214 / #567 the compile concurrency; none builds a pipeline before its first use. This works with any of them. **What is in it** - `crates/xcl/src/hle/d3d12x/pso_async.rs`: `mod used` – the shader-set keys of pipelines a run used, appended to `used-pipelines.txt` beside the DXIL cache and read at the start of the next run; `preload` – two to four workers at the lowest thread priority, apart from the ones a bind sends to, that build a lazy pipeline as soon as it is made when an earlier run used one of its shaders (whoever takes the job first builds it, so a bind is never held up by them). `submit_lazy` takes the key; `resolve` / `resolve_wait` note the first use. `XCL_PSO_PRELOAD=0` turns it off. Pipelines no run used stay lazy as before. - `crates/xcl/src/hle/d3d12x/real.rs`: `shaders_key` (a hash of the pipeline's shader blobs in their order), passed from `go_background`. - `crates/xcl/src/hle/d3d12x/bind.rs`: the three `submit_lazy` calls of an existing test get the new argument. - Tests: `the_keys_of_a_file_are_read_and_other_lines_passed_over`, `a_pipeline_an_earlier_run_used_is_built_ahead_of_its_first_use` (built with no bind when an earlier run used it, still pending when none did, and a first use is kept), `a_key_follows_the_shaders_and_their_order_and_is_never_zero`. **Tested** - RTX 5090 (driver 621.14), Ryzen 9 9950X3D, 128 GB, Windows 11 build 26300, rustc 1.100.0. - `cargo build --workspace`, then `cargo test --workspace -- --test-threads=4` on 2e36ce0: 695 passed, 0 failed, 41 ignored. The head commit 7296a8b differs from it in a doc comment and the commit message only; on it I reran `cargo test --release -p xcl --lib -- used_tests shaders_key_tests`: 3 passed. - SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - A retail title, release build, with a `used-pipelines.txt` of 1197 shader sets from earlier runs: 512 pipelines were built ahead within 5.2 s of the start (the log line is printed at powers of two), in the smoke run below and in a 200 s run into the title's world. - What it buys depends on what happens to a pipeline that is not ready. On `main` a compute pipeline is waited for, and the title's world still ends at its watchdog with this PR as without it (102 s without, 106 s with: no difference I can claim). On a build of mine that skips a dispatch instead of waiting (bounded waits, as #533 does), the title's first world frames skipped ~2 170 dispatches without this and 94 – 150 with it, in runs on this machine. **Regression run** Both runs had the same scripted input (`XCL_PRESS_AT`, A at 20 s and so on), so they leave the title's first menu and go on into its loading, where its pipelines are made. main: ``` xcl-smoke v1 commit: 91f9a5e9f03156ea82dc55a18f7704862da7a5db gpu: NVIDIA GeForce RTX 5090 title: NYCMain seconds: 60 exit: 0x0 frames shown: 1311 (PresentX 1311) presents per 2 s (last 3): 2 2 0 device removals: 0 crashes: 0 peak commit: 22607 MB ``` this PR: ``` xcl-smoke v1 commit: 7296a8bd42a2e96c22c1a7dbb1f39b252cf4e589 gpu: NVIDIA GeForce RTX 5090 title: NYCMain seconds: 60 exit: 0x0 frames shown: 1339 (PresentX 1339) presents per 2 s (last 3): 3 10 0 device removals: 0 crashes: 0 peak commit: 23008 MB ``` **Not tested** - A first run with no `used-pipelines.txt`: nothing is built ahead then (covered by the unit test's pipeline that no run used, not by a title run with the file removed). - The memory of the pipelines built ahead over a long session: the file only grows (1197 keys after ~20 runs to the start of the title's world); the smoke runs show 23.0 GB peak commit against 22.6 GB on `main`. - AMD and Intel GPUs; other titles. **AI use** - Claude Code, Claude Fable 5.2: wrote the change, the tests and this description, and ran the builds, tests and runs above on the hardware named.
A lazy pipeline is built at its first use: until then a graphics one
draws nothing and a compute one is waited for on the title's thread. A
retail title's first frames of its world use hundreds of pipelines for
the first time at once.

The pipelines a title uses are now kept by a hash of their shaders
(used-pipelines.txt beside the DXIL cache), and a lazy pipeline of
shaders an earlier run used is sent to workers of its own when it is
made: two to four threads at the lowest priority, apart from the ones a
bind sends to, so a pipeline that is bound is not held up by the ones
made ahead. XCL_PSO_PRELOAD=0 turns it off. Pipelines no run used stay
lazy, as before (the memory of ~51 000 built pipelines was the reason
for making them lazy).

Measured on an RTX 5090 with a build that skips a dispatch instead of
waiting for its pipeline: ~2 170 dispatches skipped in the title's first
world frames without this, 94 - 150 with it.

Assisted-by: Claude Code (Claude Fable 5.2)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:29:31 +00:00
github manually merged commit 7296a8bd42 into gh-pr/690/base 2026-11-26 04:29:34 +00:00
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-24 03:35 UTC · original

Tested

On 7296a8b, I checked the real D3D12 pipeline hook in three fresh processes using an isolated synthetic cache. A scratch extension to gpu_compute_e2e observed the stand-in and translated-pipeline count before the first call to resolve_wait.

  • Cold cache: the pipeline stayed pending before first use. First use built it and wrote one key to used-pipelines.txt.
  • Second process: the preload worker built the pipeline before first use. The translated-pipeline count increased by one and XCL logged the completed ahead-of-use build.
  • XCL_PSO_PRELOAD=0: with the same saved key, the pipeline stayed pending before first use and no ahead-of-use build completed. The startup line still said the recorded shader sets are built ahead. The stand-in state and completion log distinguished the disabled behavior.

Each dispatch matched all 1,536 readback words. The focused test passed 1/1 in each process with the D3D12 debug layer enabled and no errors or runtime skips. Runtime code was stock.

Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, DXC 1.8.2502.11, Rust 1.99.1 MSVC, debug. cargo test --offline --locked -p xcl --test gpu_compute_e2e console_wave64_compute_through_the_pso_hook_dispatch_and_read_back -- --exact --nocapture --test-threads=1.

Not tested

Graphics pipeline preload, contention with a large history, and retail loading.

AI use

Codex with GPT-6.2 Sol adapted the scratch fixture, ran the tests, and drafted the report.

**@⁠thehollowedone** on GitHub · 2026-11-24 03:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/690#issuecomment-7121243126) **Tested** On [`7296a8b`](https://github.com/ivall/xcl/commit/7296a8bd42a2e96c22c1a7dbb1f39b252cf4e589), I checked the real D3D12 pipeline hook in three fresh processes using an isolated synthetic cache. A scratch extension to `gpu_compute_e2e` observed the stand-in and translated-pipeline count before the first call to `resolve_wait`. - Cold cache: the pipeline stayed pending before first use. First use built it and wrote one key to `used-pipelines.txt`. - Second process: the preload worker built the pipeline before first use. The translated-pipeline count increased by one and XCL logged the completed ahead-of-use build. - `XCL_PSO_PRELOAD=0`: with the same saved key, the pipeline stayed pending before first use and no ahead-of-use build completed. The startup line still said the recorded shader sets are built ahead. The stand-in state and completion log distinguished the disabled behavior. Each dispatch matched all 1,536 readback words. The focused test passed 1/1 in each process with the D3D12 debug layer enabled and no errors or runtime skips. Runtime code was stock. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, DXC 1.8.2502.11, Rust 1.99.1 MSVC, debug. `cargo test --offline --locked -p xcl --test gpu_compute_e2e console_wave64_compute_through_the_pso_hook_dispatch_and_read_back -- --exact --nocapture --test-threads=1`. **Not tested** Graphics pipeline preload, contention with a large history, and retail loading. **AI use** Codex with GPT-6.2 Sol adapted the scratch fixture, ran the tests, and drafted the report.
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 03:42 UTC · original

Test run of 7296a8bd42a2e96c22c1a7dbb1f39b252cf4e589 on AMD RDNA4. I merged it onto current main 91f9a5e locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 695 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 655 passed, 0 failed, 21 ignored
  • 0 SKIPPED; a_pipeline_an_earlier_run_used_is_built_ahead_of_its_first_use passes.

Review: The set written this run starts as the file's set, so only keys that are new append a line: used-pipelines.txt grows by distinct shader sets, not by every run. Under cfg(test) the file is neither read nor written. A small thing: keys are never removed, so after a title update its stale keys stay in the file (they only cost a lookup, since a key with no lazy pipeline builds nothing). I found nothing to change.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

**@⁠MesshM** on GitHub · 2026-11-24 03:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/690#issuecomment-7121351754) Test run of `7296a8bd42a2e96c22c1a7dbb1f39b252cf4e589` on AMD RDNA4. I merged it onto current `main` `91f9a5e` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **695 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 655 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `a_pipeline_an_earlier_run_used_is_built_ahead_of_its_first_use` passes. **Review:** The set written this run starts as the file's set, so only keys that are new append a line: `used-pipelines.txt` grows by distinct shader sets, not by every run. Under `cfg(test)` the file is neither read nor written. A small thing: keys are never removed, so after a title update its stale keys stay in the file (they only cost a lookup, since a key with no lazy pipeline builds nothing). I found nothing to change. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Author
Owner

@⁠crosettiremi on GitHub · 2026-11-24 03:56 UTC · original · edited 2026-11-24 04:05 UTC

Independent Windows 11 / RX 7900 XT result on retail 1.0.2.1, with DXC 1.9.2602.17. I tested the preload change at 7296a8b on a local combined build with bounded graphics and compute waits, first-use tracking on those paths, and a sparse-buffer release fix. The prior-use file started with 180 shader sets. I had seeded 177 from earlier traces before the preceding run.

The log recorded 128 pipelines built ahead of first use by 6.643 s. The account picker held 60 presents per two seconds and accepted A at 37.004 s. The game displayed the loading artwork and began streaming. It later hit the known world-loading watchdog at 154.691 s (0xc0000005 at title+0x23cf683), with no device removal. The submission thread logged 14 two-second Wait64BitValueX timeouts. Peak process commit was 40,842 MB.

This verifies preloading on AMD. The build and warmed cache do not isolate its effect on frame rate or time to the watchdog. The combined workspace passed 722 tests with 41 ignored.

Upstream change tested: 7296a8b. Workspace command: cargo test --workspace --locked --offline -- --test-threads=4. Codex (GPT-6) ran the checks and summarized the local logs.

**@⁠crosettiremi** on GitHub · 2026-11-24 03:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/690#issuecomment-7121564526) · edited 2026-11-24 04:05 UTC Independent Windows 11 / RX 7900 XT result on retail 1.0.2.1, with DXC 1.9.2602.17. I tested the preload change at 7296a8b on a local combined build with bounded graphics and compute waits, first-use tracking on those paths, and a sparse-buffer release fix. The prior-use file started with 180 shader sets. I had seeded 177 from earlier traces before the preceding run. The log recorded 128 pipelines built ahead of first use by 6.643 s. The account picker held 60 presents per two seconds and accepted A at 37.004 s. The game displayed the loading artwork and began streaming. It later hit the known world-loading watchdog at 154.691 s (0xc0000005 at title+0x23cf683), with no device removal. The submission thread logged 14 two-second Wait64BitValueX timeouts. Peak process commit was 40,842 MB. This verifies preloading on AMD. The build and warmed cache do not isolate its effect on frame rate or time to the watchdog. The combined workspace passed 722 tests with 41 ignored. Upstream change tested: 7296a8b. Workspace command: `cargo test --workspace --locked --offline -- --test-threads=4`. Codex (GPT-6) ran the checks and summarized the local logs.
Author
Owner

@⁠crosettiremi on GitHub · 2026-11-24 04:50 UTC · original

Follow-up to my earlier AMD test. I repeated a Series S-profile run on the RX 7900 XT with the exact same release executable, saved profile and A press at 37 s. The second launch used the complete application caches written by the first. Both builds had #690 enabled, so this measures repeat-launch behavior on the integration stack.

The 512th pipeline finished preloading at 9.883 s on the repeat, compared with 16.952 s on the first run. The repeat accepted driver blobs on 282 successful compute pipeline creations. It still encountered 21 successful cold creations and two cold creations that returned E_OUTOFMEMORY.

The two failed compute compilations were serialized. ScreenProbes ActivateProbes (22,909,544 bytes of DXIL) took 91.119 s and ActivateRays (13,015,316 bytes) took 54.018 s. Both were started by a preload worker. Peak process commit was 68,701 MB. The repeat recorded 2,215 presents and zero device removals before a title access violation in world loading at 174.409 s. The trace establishes driver memory pressure; it does not establish the cause of the title exception.

The local integration workspace reported 737 passed, 0 failed and 41 ignored. One counted pass printed a skip for the missing xgameruntime.dll debug-layer fixture. The same binary was used for both game runs. Codex (GPT-6) ran the tests and prepared this report.

**@⁠crosettiremi** on GitHub · 2026-11-24 04:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/690#issuecomment-7122392858) Follow-up to my earlier AMD test. I repeated a Series S-profile run on the RX 7900 XT with the exact same release executable, saved profile and A press at 37 s. The second launch used the complete application caches written by the first. Both builds had #690 enabled, so this measures repeat-launch behavior on the integration stack. The 512th pipeline finished preloading at 9.883 s on the repeat, compared with 16.952 s on the first run. The repeat accepted driver blobs on 282 successful compute pipeline creations. It still encountered 21 successful cold creations and two cold creations that returned `E_OUTOFMEMORY`. The two failed compute compilations were serialized. ScreenProbes ActivateProbes (22,909,544 bytes of DXIL) took 91.119 s and ActivateRays (13,015,316 bytes) took 54.018 s. Both were started by a preload worker. Peak process commit was 68,701 MB. The repeat recorded 2,215 presents and zero device removals before a title access violation in world loading at 174.409 s. The trace establishes driver memory pressure; it does not establish the cause of the title exception. The local integration workspace reported 737 passed, 0 failed and 41 ignored. One counted pass printed a skip for the missing xgameruntime.dll debug-layer fixture. The same binary was used for both game runs. Codex (GPT-6) ran the tests and prepared this report.
Author
Owner

@⁠WarmMilkCodes on GitHub · 2026-11-24 05:31 UTC · original

<html> <html><head></head>

Title: Pipeline preload (#690): committed memory climbs ~1.4 GB/s on AMD RDNA2 until Windows runs out (retail title from #505)

Hardware: AMD Radeon RX 6600 XT (8 GB, RDNA2), Ryzen 5 5500, 32 GB RAM, page file on a second drive (commit limit 130 GB), Windows 11, DXC 1.8.2502.11.

Build: a local test branch: main with #690 and #713, plus #533 and two local changes that bound pipeline waits (no changes to pso_async's preload code). #762 was in some of the runs; #688 in one (taken out after). The leak follows XCL_PSO_PRELOAD in every run, with or without those.

What happens

Once used-pipelines.txt holds a few hundred entries, a run logs 512 pipelines built ahead of their first use about 11 s in. From then on, the process's committed memory grows at about 1.4 GB/s until the commit limit is reached. Committed memory, sampled every 2 s with \Memory\Committed Bytes:

Time Committed Free RAM
23:12:54 57.4 GB 0.1 GB
23:13:29 100.0 GB 0.2 GB
23:14:31 127.7 GB 0.2 GB
23:15:06 131.2 GB 0.8 GB

The title sat at its account picker the whole time. XCL's log is nearly silent after ~100 s, with no pipeline builds or uploads logged while memory climbs. The desktop stopped drawing (blank icon boxes, error dialogs) until a reboot. Two other runs with the same list ended at ~130 s with memory allocation of 4920320 bytes failed and exit 0xc0000409, with no crash dump.

With XCL_PSO_PRELOAD=0, the same build:

  • At the same account picker for ~3 min: committed memory flat at 25.0–25.1 GB.
  • A full run: 25 GB → 35 GB over 8 min of world streaming, reaching 578 s and 14 700 frames. No leak; the run ended on an unrelated title crash.

When it started: an earlier run with a short list (32 pipelines built ahead) had no leak (294 s, past the world loading screen). The leak appeared once the list reached 512+ (605 shader sets at the last run).

Not checked yet:

  • Whether the memory is held in the driver (pipelines built ahead and kept) or in XCL.
  • Whether a smaller preload list, or one preload thread, still leaks.
  • NVIDIA, or a fresh used-pipelines.txt.
</html> </html>
**@⁠WarmMilkCodes** on GitHub · 2026-11-24 05:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/690#issuecomment-7123027024) <html> <body> <!--StartFragment--><html><head></head><body><p><strong>Title:</strong> Pipeline preload (#690): committed memory climbs ~1.4 GB/s on AMD RDNA2 until Windows runs out (retail title from #505)</p> <p><strong>Hardware:</strong> AMD Radeon RX 6600 XT (8 GB, RDNA2), Ryzen 5 5500, 32 GB RAM, page file on a second drive (commit limit 130 GB), Windows 11, DXC 1.8.2502.11.</p> <p><strong>Build:</strong> a local test branch: main with #690 and #713, plus #533 and two local changes that bound pipeline waits (no changes to <code>pso_async</code>'s preload code). #762 was in some of the runs; #688 in one (taken out after). The leak follows <code>XCL_PSO_PRELOAD</code> in every run, with or without those.</p> <p><strong>What happens</strong></p> <p>Once <code>used-pipelines.txt</code> holds a few hundred entries, a run logs <code>512 pipelines built ahead of their first use</code> about 11 s in. From then on, the process's committed memory grows at about 1.4 GB/s until the commit limit is reached. Committed memory, sampled every 2 s with <code>\Memory\Committed Bytes</code>:</p> Time | Committed | Free RAM -- | -- | -- 23:12:54 | 57.4 GB | 0.1 GB 23:13:29 | 100.0 GB | 0.2 GB 23:14:31 | 127.7 GB | 0.2 GB 23:15:06 | 131.2 GB | 0.8 GB <p>The title sat at its account picker the whole time. XCL's log is nearly silent after ~100 s, with no pipeline builds or uploads logged while memory climbs. The desktop stopped drawing (blank icon boxes, error dialogs) until a reboot. Two other runs with the same list ended at ~130 s with <code>memory allocation of 4920320 bytes failed</code> and exit 0xc0000409, with no crash dump.</p> <p><strong>With <code>XCL_PSO_PRELOAD=0</code>, the same build:</strong></p> <ul> <li>At the same account picker for ~3 min: committed memory flat at 25.0–25.1 GB.</li> <li>A full run: 25 GB → 35 GB over 8 min of world streaming, reaching 578 s and 14 700 frames. No leak; the run ended on an unrelated title crash.</li> </ul> <p><strong>When it started:</strong> an earlier run with a short list (<code>32 pipelines built ahead</code>) had no leak (294 s, past the world loading screen). The leak appeared once the list reached 512+ (605 shader sets at the last run).</p> <p><strong>Not checked yet:</strong></p> <ul> <li>Whether the memory is held in the driver (pipelines built ahead and kept) or in XCL.</li> <li>Whether a smaller preload list, or one preload thread, still leaks.</li> <li>NVIDIA, or a fresh <code>used-pipelines.txt</code>.</li> </ul> </body></html><!--EndFragment--> </body> </html>
Author
Owner

@⁠crosettiremi on GitHub · 2026-11-24 05:39 UTC · original

Follow-up to my RX 7900 XT report about the two cold world-loading compute PSOs. I tested an experimental offline compute backend built from XCL's existing instruction emitter. This is on a separate integration worktree. The #690 PR itself is unchanged.

Compute shader Original DXIL Compact DXIL + separate instruction buffer First native PSO Peak job private commit
ActivateProbes 22,909,544 B 102,020 B + 418,732 B 46.501 s 1,734 MiB
ActivateRays 13,015,316 B 127,820 B + 466,304 B 68.766 s 3,378 MiB

Both complete programs created a native PSO under a 10 GiB job limit. A new process offered the 954-byte driver blob returned for each shader. Creation still took 48.836 s and 68.559 s respectively. In-process repeat dispatches were substantially faster. These are single observations for each cache condition.

For execution coverage I dispatched the full ActivateRays program, with controlled resource descriptors, on a path that clears output records and exits before lighting samples. The conventional translation of the reachable prefix and an independent expected memory image agreed. With 256 workgroups and two loop iterations the shader wrote 262,144 32-bit words. A second D3D12 queue waited for the producer's actual fence and ran a compute consumer on the output. All 278,544 words, including the consumer result and the surrounding memory, matched. I also checked 64 differential cases on small wave32 and wave64 branch regions, including nonzero memory-window reads and a failing window-zero negative control.

This experiment has no in-title integration or playable-world result. The complete ActivateProbes program has native creation coverage. The ActivateRays test covers one real control-flow path with synthetic input. Neither establishes correct scene lighting. The results support testing live-device prewarming for these two large pipelines and measuring actual dispatch dimensions.

AI use: Codex (GPT-6) implemented the local prototype, ran these checks and prepared this report.

**@⁠crosettiremi** on GitHub · 2026-11-24 05:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/690#issuecomment-7123150065) Follow-up to my RX 7900 XT report about the two cold world-loading compute PSOs. I tested an experimental **offline** compute backend built from XCL's existing instruction emitter. This is on a separate integration worktree. The #690 PR itself is unchanged. | Compute shader | Original DXIL | Compact DXIL + separate instruction buffer | First native PSO | Peak job private commit | | --- | ---: | ---: | ---: | ---: | | ActivateProbes | 22,909,544 B | 102,020 B + 418,732 B | 46.501 s | 1,734 MiB | | ActivateRays | 13,015,316 B | 127,820 B + 466,304 B | 68.766 s | 3,378 MiB | Both complete programs created a native PSO under a 10 GiB job limit. A new process offered the 954-byte driver blob returned for each shader. Creation still took 48.836 s and 68.559 s respectively. In-process repeat dispatches were substantially faster. These are single observations for each cache condition. For execution coverage I dispatched the **full ActivateRays program**, with controlled resource descriptors, on a path that clears output records and exits before lighting samples. The conventional translation of the reachable prefix and an independent expected memory image agreed. With 256 workgroups and two loop iterations the shader wrote 262,144 32-bit words. A second D3D12 queue waited for the producer's actual fence and ran a compute consumer on the output. All 278,544 words, including the consumer result and the surrounding memory, matched. I also checked 64 differential cases on small wave32 and wave64 branch regions, including nonzero memory-window reads and a failing window-zero negative control. This experiment has no in-title integration or playable-world result. The complete ActivateProbes program has native creation coverage. The ActivateRays test covers one real control-flow path with synthetic input. Neither establishes correct scene lighting. The results support testing live-device prewarming for these two large pipelines and measuring actual dispatch dimensions. AI use: Codex (GPT-6) implemented the local prototype, ran these checks and prepared this report.
Author
Owner

@⁠crosettiremi on GitHub · 2026-11-24 05:57 UTC · original · edited 2026-11-24 05:58 UTC

Following up on the two lighting pipelines from my previous test on Windows / RX 7900 XT. I ran the opt-in compact compute prototype on the retail title's actual D3D12 device, with a saved player profile and device_type set to anaconda (Series X) and a 28 GiB Windows job commit limit.

  • Prewarming ActivateProbes took 10.688 s and ActivateRays 17.691 s. The title entered at process uptime 29.822 s. Its later native creation calls for those same shaders both returned S_OK in 0.000 s at the log's millisecond precision. This is a single same-process sample.
  • The run reached loading artwork and continued issuing draws and dispatches. At 196.172 s DRED reported a page fault at GPU VA 0xd000 and DXGI_ERROR_DEVICE_HUNG (0x887a0006). Three command lists on different queues had completed 6 of 20 operations, with DISPATCH at the next breadcrumb. Neither compact shader had a recorded bind before removal. No playable scene was verified.
  • Peak reported process commit was 27,313 MB. Following five-star-recomp's measurement of queued pipeline memory, I counted copied shader bytes in queued/active XCL builds separately from the in-memory translation cache. Their sampled peaks were 589 MiB and 42 MiB. These counters exclude driver allocations.
  • The runtime prototype with per-PSO program binding passes the workspace suite (738 passed, 0 failed, 41 ignored; one counted pass self-skipped for missing xgameruntime.dll). This is a local integration build, so the device fault cannot be attributed to #690 alone.

Reference for the memory comparison: github.com/ThatRecompDev/five-star-recomp@dbbdb0746c

**@⁠crosettiremi** on GitHub · 2026-11-24 05:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/690#issuecomment-7123428197) · edited 2026-11-24 05:58 UTC Following up on the two lighting pipelines from my previous test on Windows / RX 7900 XT. I ran the opt-in compact compute prototype on the retail title's actual D3D12 device, with a saved player profile and device_type set to anaconda (Series X) and a 28 GiB Windows job commit limit. - Prewarming ActivateProbes took 10.688 s and ActivateRays 17.691 s. The title entered at process uptime 29.822 s. Its later native creation calls for those same shaders both returned S_OK in 0.000 s at the log's millisecond precision. This is a single same-process sample. - The run reached loading artwork and continued issuing draws and dispatches. At 196.172 s DRED reported a page fault at GPU VA 0xd000 and DXGI_ERROR_DEVICE_HUNG (0x887a0006). Three command lists on different queues had completed 6 of 20 operations, with DISPATCH at the next breadcrumb. Neither compact shader had a recorded bind before removal. No playable scene was verified. - Peak reported process commit was 27,313 MB. Following five-star-recomp's measurement of queued pipeline memory, I counted copied shader bytes in queued/active XCL builds separately from the in-memory translation cache. Their sampled peaks were 589 MiB and 42 MiB. These counters exclude driver allocations. - The runtime prototype with per-PSO program binding passes the workspace suite (738 passed, 0 failed, 41 ignored; one counted pass self-skipped for missing xgameruntime.dll). This is a local integration build, so the device fault cannot be attributed to #690 alone. Reference for the memory comparison: https://github.com/ThatRecompDev/five-star-recomp/commit/dbbdb0746c75ad2946ccc8ed136cb3b9a2c0cc2c
This discussion has been locked. Commenting is limited to contributors.
No description provided.