D3D12.X: only a title's run reads and writes used-pipelines.txt #1113

Open
github-bot wants to merge 1 commit from github-bot/gh-1113 into main AGit
Owner

@⁠einfachama on GitHub · 2026-11-24 11:45 UTC · original
einfachama:overnight/pso-used-list-title-runs → main · +41 −2 · 2 files · 1 commits · open

used-pipelines.txt (#690) is kept out of tests with cfg!(test), but only the crate's own unit tests have that cfg. The integration tests in crates/xcl/tests/ link the crate without it, so they read the user's list (beside the DXIL cache) and add their own pipelines to it.

What that did here: after full test runs with XCL_SAMPLE_RPF set, the user's list held 10 keys. gpu_pso_e2e, run on its own into an empty cache, writes 9 keys, 4 of them among those 10; none of the 27 title runs since then changed the file. Every later run of my retail title then built its pipelines of those shaders ahead: 228 translated pipelines at its first menu instead of 6 (report.json translated_pipelines). A PR needs both a suite run and smoke.ps1 runs on the same machine, so a tester's smoke runs can start from a list the tests wrote.

The list is now read and written only when a title runs (state::boot() is set; the host sets it at start, before any pipeline).

What is in it

  • crates/xcl/src/hle/d3d12x/pso_async.rs: used::get() returns the empty, file-less list unless a title runs (cfg!(test) || state::boot().is_none()).
  • crates/xcl/tests/used_pipelines.rs (new): with XCL_DXIL_CACHE set to a temporary folder holding a list, a test binary neither builds the pipeline of a listed key ahead nor adds a used pipeline to the list. It fails without the change (a test binary built a pipeline ahead from the user's list). No GPU needed.

Tested

  • NVIDIA GeForce RTX 4060 8 GB (Ada, 32-lane waves), driver 621.24; Ryzen 7 5800X; 32 GB RAM; Windows 11 Pro 26300; Rust 1.100.0 MSVC; DXC 1.9.2602.17; debug for the tests, release for the smoke runs.
  • cargo test --workspace -- --test-threads=4 at 8aef294 (on main 6567c5f): 998 passed, 0 failed, 45 ignored, on the first run. SKIPPED: 19 "no wave64" (the lower / lower_dxil wave64 cases, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware), 3 per-lane f16 / f32 conversion cases refused by the per-lane form, heap_window_out_of_memory_falls_back_to_the_switch_form, and pso_measurement_compiles_an_exact_synthetic_record (no Developer Mode).
  • cargo test -p xcl --test used_pipelines: passes at the head, fails on main 6567c5f with only the test added.
  • My retail title at its first menu, scripts/smoke.ps1 -Seconds 60, each run from the same restored shader caches (used-pipelines.txt 1 125 lines) and 50.7 GB of free system commit: the blocks below (main 1 534 frames, this change 1 562). A title run still reads and writes the list, so these runs show that title runs are unchanged, not the effect on tests.
  • One thing to know when comparing smoke runs: with under 17 GB of system commit free at start, XCL gives the title a 512 MB coherent window instead of the learned one (uma.rs, a WARN in the log), with far fewer frames (#284).

Regression run

xcl-smoke v1
commit: 6567c5ffa38fbc7039b2d6bf520154689cc1f482
gpu: NVIDIA GeForce RTX 4060
title: aaf23206
seconds: 60
exit: 0x0
frames shown: 1534 (PresentX 1534)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16162 MB
xcl-smoke v1
commit: 8aef2946818bf7547a34efae7fc5133773d9b591
gpu: NVIDIA GeForce RTX 4060
title: aaf23206
seconds: 60
exit: 0x0
frames shown: 1562 (PresentX 1562)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16052 MB

Not tested

  • Whether building those ~220 pipelines ahead costs frames at the menu: the runs I have are confounded by the coherent-window fallback above, so I make no claim about it.
  • e2e.rs runs the test title as a real title run (boot set), so it can still write the list; with XCL_DXIL_CACHE pointed at an empty folder it wrote no key here.
  • AMD / Intel GPUs (the change has no GPU path).

AI use

  • Claude Code with Claude Opus 5.5 found this while comparing smoke runs, wrote the change, the test and this description, ran the tests and smoke runs in an unattended session, and rebased it onto 6567c5f with new runs; I reviewed it before posting.
**@⁠einfachama** on GitHub · 2026-11-24 11:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/1113) `einfachama:overnight/pso-used-list-title-runs` → `main` · +41 −2 · 2 files · 1 commits · open `used-pipelines.txt` (#690) is kept out of tests with `cfg!(test)`, but only the crate's own unit tests have that cfg. The integration tests in `crates/xcl/tests/` link the crate without it, so they read the user's list (beside the DXIL cache) and add their own pipelines to it. What that did here: after full test runs with `XCL_SAMPLE_RPF` set, the user's list held 10 keys. `gpu_pso_e2e`, run on its own into an empty cache, writes 9 keys, 4 of them among those 10; none of the 27 title runs since then changed the file. Every later run of my retail title then built its pipelines of those shaders ahead: **228 translated pipelines at its first menu instead of 6** (`report.json` `translated_pipelines`). A PR needs both a suite run and `smoke.ps1` runs on the same machine, so a tester's smoke runs can start from a list the tests wrote. The list is now read and written only when a title runs (`state::boot()` is set; the host sets it at start, before any pipeline). **What is in it** - `crates/xcl/src/hle/d3d12x/pso_async.rs`: `used::get()` returns the empty, file-less list unless a title runs (`cfg!(test) || state::boot().is_none()`). - `crates/xcl/tests/used_pipelines.rs` (new): with `XCL_DXIL_CACHE` set to a temporary folder holding a list, a test binary neither builds the pipeline of a listed key ahead nor adds a used pipeline to the list. It fails without the change (`a test binary built a pipeline ahead from the user's list`). No GPU needed. **Tested** - NVIDIA GeForce RTX 4060 8 GB (Ada, 32-lane waves), driver 621.24; Ryzen 7 5800X; 32 GB RAM; Windows 11 Pro 26300; Rust 1.100.0 MSVC; DXC 1.9.2602.17; debug for the tests, release for the smoke runs. - `cargo test --workspace -- --test-threads=4` at `8aef294` (on `main` `6567c5f`): **998 passed, 0 failed, 45 ignored**, on the first run. SKIPPED: 19 "no wave64" (the `lower` / `lower_dxil` wave64 cases, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`), 3 per-lane f16 / f32 conversion cases refused by the per-lane form, `heap_window_out_of_memory_falls_back_to_the_switch_form`, and `pso_measurement_compiles_an_exact_synthetic_record` (no Developer Mode). - `cargo test -p xcl --test used_pipelines`: passes at the head, fails on `main` `6567c5f` with only the test added. - My retail title at its first menu, `scripts/smoke.ps1 -Seconds 60`, each run from the same restored shader caches (`used-pipelines.txt` 1 125 lines) and 50.7 GB of free system commit: the blocks below (`main` 1 534 frames, this change 1 562). A title run still reads and writes the list, so these runs show that title runs are unchanged, not the effect on tests. - One thing to know when comparing smoke runs: with under 17 GB of system commit free at start, XCL gives the title a 512 MB coherent window instead of the learned one (`uma.rs`, a WARN in the log), with far fewer frames (#284). **Regression run** ``` xcl-smoke v1 commit: 6567c5ffa38fbc7039b2d6bf520154689cc1f482 gpu: NVIDIA GeForce RTX 4060 title: aaf23206 seconds: 60 exit: 0x0 frames shown: 1534 (PresentX 1534) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16162 MB ``` ``` xcl-smoke v1 commit: 8aef2946818bf7547a34efae7fc5133773d9b591 gpu: NVIDIA GeForce RTX 4060 title: aaf23206 seconds: 60 exit: 0x0 frames shown: 1562 (PresentX 1562) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16052 MB ``` **Not tested** - Whether building those ~220 pipelines ahead costs frames at the menu: the runs I have are confounded by the coherent-window fallback above, so I make no claim about it. - `e2e.rs` runs the test title as a real title run (boot set), so it can still write the list; with `XCL_DXIL_CACHE` pointed at an empty folder it wrote no key here. - AMD / Intel GPUs (the change has no GPU path). **AI use** - Claude Code with Claude Opus 5.5 found this while comparing smoke runs, wrote the change, the test and this description, ran the tests and smoke runs in an unattended session, and rebased it onto `6567c5f` with new runs; I reviewed it before posting.
The list of the pipelines a title used was kept out of tests with
cfg!(test), which only the crate's own unit tests have: the integration
tests in tests/ link the crate without it, so they read the user's
used-pipelines.txt and add their pipelines to it. After full test runs with
XCL_SAMPLE_RPF on an RTX 4060, the user's list held 10 keys (gpu_pso_e2e,
run alone into an empty cache, writes 9 keys, 4 of them among those 10), and
every later run of my retail title built its pipelines of those shaders
ahead: 228 translated pipelines at its first menu instead of 6.

The list is now read and written only when a title runs (state::boot set).
The new integration test fails without the change: the pipeline of a key in
the list was built ahead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:43:49 +00:00
Author
Owner

@⁠Aniseto on GitHub · 2026-11-24 12:06 UTC · original

Ran the new test binary at e03852f:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

cargo test -p xcl --test used_pipelines
1 passed; 0 failed; 0 ignored      (exit 0)

a_test_binary_neither_reads_nor_writes_the_used_pipelines_list passes. This is a file-level test, so the GPU is not the variable; the datapoint is the Windows 11 build 26200 / MSVC 14.44.35207 toolchain next to the author's run.

Not tested: the retail-title path this PR is about (no unpacked title here), RDNA2/RDNA4 and Intel GPUs, Wine, release profile.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the test binary, wrote this report; the worktree was not modified.

**@⁠Aniseto** on GitHub · 2026-11-24 12:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/1113#issuecomment-7130970657) Ran the new test binary at `e03852f`: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build. ``` cargo test -p xcl --test used_pipelines 1 passed; 0 failed; 0 ignored (exit 0) ``` `a_test_binary_neither_reads_nor_writes_the_used_pipelines_list` passes. This is a file-level test, so the GPU is not the variable; the datapoint is the Windows 11 build 26200 / MSVC 14.44.35207 toolchain next to the author's run. Not tested: the retail-title path this PR is about (no unpacked title here), RDNA2/RDNA4 and Intel GPUs, Wine, release profile. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash 1017** - checked out the PR's head commit in a detached worktree, built it, ran the test binary, wrote this report; the worktree was not modified.
Author
Owner

@⁠einfachama on GitHub · 2026-11-25 01:12 UTC · original

Rebased onto main 6567c5f (it was on 47efa2e, 215 commits behind). No conflicts. The commit itself is unchanged: git range-diff shows the old e03852f and the new head 8aef294 as the same patch, still pso_async.rs (+5 / −2) and the new tests/used_pipelines.rs. I updated Tested and Regression run in the description with the numbers and blocks below.

Tested (head 8aef294, on main 6567c5f)

  • Machine: NVIDIA GeForce RTX 4060 8 GB (Ada, 32-lane waves), driver 621.24; Ryzen 7 5800X; 32 GB RAM; Windows 11 Pro 26300; Rust 1.100.0 MSVC; DXC 1.9.2602.17. Debug for the tests, release for the smoke runs.
  • cargo test --workspace -- --test-threads=4: 998 passed, 0 failed, 45 ignored (21 test binaries), on the first run. 24 SKIPPED lines:
    • 19 "no wave64" (the lower / lower_dxil wave64 cases, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware);
    • 3 per-lane f16 / f32 conversion cases refused by the per-lane form;
    • heap_window_out_of_memory_falls_back_to_the_switch_form;
    • pso_measurement_compiles_an_exact_synthetic_record (Developer Mode is off here).
  • cargo test -p xcl --test used_pipelines: passes at the head, and fails on main 6567c5f with only the test added (a_test_binary_neither_reads_nor_writes_the_used_pipelines_list).
  • Smoke runs: my retail title at its first menu, scripts/smoke.ps1 -Seconds 60. Each run started from the same restored shader caches (the same used-pipelines.txt, 1 125 lines), with 50.7 GB of free system commit (the learned coherent window). main shows 1 534 frames and this change 1 562.
    • The title: line is now the hash smoke.ps1 prints since #677, not the folder name the earlier blocks had. It is the same folder.

Regression run

xcl-smoke v1
commit: 6567c5ffa38fbc7039b2d6bf520154689cc1f482
gpu: NVIDIA GeForce RTX 4060
title: aaf23206
seconds: 60
exit: 0x0
frames shown: 1534 (PresentX 1534)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16162 MB
xcl-smoke v1
commit: 8aef2946818bf7547a34efae7fc5133773d9b591
gpu: NVIDIA GeForce RTX 4060
title: aaf23206
seconds: 60
exit: 0x0
frames shown: 1562 (PresentX 1562)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16052 MB

Not tested

  • AMD / Intel GPUs (the change has no GPU path).

AI use

  • Claude Code (Claude Opus 5.5) rebased the branch, ran the suite and the smoke runs, and wrote this comment. I checked it before posting.
**@⁠einfachama** on GitHub · 2026-11-25 01:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/1113#issuecomment-7149321673) Rebased onto `main` `6567c5f` (it was on `47efa2e`, 215 commits behind). No conflicts. The commit itself is unchanged: `git range-diff` shows the old `e03852f` and the new head `8aef294` as the same patch, still `pso_async.rs` (+5 / −2) and the new `tests/used_pipelines.rs`. I updated **Tested** and **Regression run** in the description with the numbers and blocks below. **Tested** (head `8aef294`, on `main` `6567c5f`) - **Machine:** NVIDIA GeForce RTX 4060 8 GB (Ada, 32-lane waves), driver 621.24; Ryzen 7 5800X; 32 GB RAM; Windows 11 Pro 26300; Rust 1.100.0 MSVC; DXC 1.9.2602.17. Debug for the tests, release for the smoke runs. - **`cargo test --workspace -- --test-threads=4`:** **998 passed, 0 failed, 45 ignored** (21 test binaries), on the first run. 24 `SKIPPED` lines: - 19 "no wave64" (the `lower` / `lower_dxil` wave64 cases, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`); - 3 per-lane f16 / f32 conversion cases refused by the per-lane form; - `heap_window_out_of_memory_falls_back_to_the_switch_form`; - `pso_measurement_compiles_an_exact_synthetic_record` (Developer Mode is off here). - **`cargo test -p xcl --test used_pipelines`:** passes at the head, and fails on `main` `6567c5f` with only the test added (`a_test_binary_neither_reads_nor_writes_the_used_pipelines_list`). - **Smoke runs:** my retail title at its first menu, `scripts/smoke.ps1 -Seconds 60`. Each run started from the same restored shader caches (the same `used-pipelines.txt`, 1 125 lines), with 50.7 GB of free system commit (the learned coherent window). `main` shows 1 534 frames and this change 1 562. - The `title:` line is now the hash `smoke.ps1` prints since #677, not the folder name the earlier blocks had. It is the same folder. **Regression run** ``` xcl-smoke v1 commit: 6567c5ffa38fbc7039b2d6bf520154689cc1f482 gpu: NVIDIA GeForce RTX 4060 title: aaf23206 seconds: 60 exit: 0x0 frames shown: 1534 (PresentX 1534) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16162 MB ``` ``` xcl-smoke v1 commit: 8aef2946818bf7547a34efae7fc5133773d9b591 gpu: NVIDIA GeForce RTX 4060 title: aaf23206 seconds: 60 exit: 0x0 frames shown: 1562 (PresentX 1562) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16052 MB ``` **Not tested** - AMD / Intel GPUs (the change has no GPU path). **AI use** - Claude Code (Claude Opus 5.5) rebased the branch, ran the suite and the smoke runs, and wrote this comment. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 08:16 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 08:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/1113#issuecomment-7156816212) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠einfachama on GitHub · 2026-11-25 16:15 UTC · original

Rebased onto main 06c9f55 (it was on 6567c5f, 275 commits behind). No conflicts; git range-diff shows the old head 8aef294 and the new head 5dc8f99 as the same patch. I updated Tested and Regression run in the description.

Tested (head 5dc8f99, on main 06c9f55)

  • cargo test --workspace -- --test-threads=4: 1266 passed, 0 failed, 46 ignored, on the first run. 18 tests print SKIPPED: 14 "no wave64" (two of them also print per-lane f16 / f32 cases the per-lane form refuses), 2 with no D3D12 debug layer, 1 with no heap windows, 1 with no Developer Mode.
  • cargo test -p xcl --test used_pipelines: passes at the head, and fails on main 06c9f55 with only the test added.
  • Smoke runs, my retail title, scripts/smoke.ps1 -Seconds 60, each from the same restored shader caches: main 1 472 frames, this change 1 503; no device removal, no crash. Both are lower than last time's 1 534 / 1 562, probably because main's translation identity is new since #2120, so both runs started with nothing translated for it.

Regression run

xcl-smoke v1
commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324
gpu: NVIDIA GeForce RTX 4060
title: aaf23206
seconds: 60
exit: 0x0
frames shown: 1472 (PresentX 1472)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16063 MB
xcl-smoke v1
commit: 5dc8f992d926d15883a461538dd6ff328beff128
gpu: NVIDIA GeForce RTX 4060
title: aaf23206
seconds: 60
exit: 0x0
frames shown: 1503 (PresentX 1503)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16223 MB

AI use

  • Claude Code (Claude Opus 5.5) rebased the branch, ran the suite and the smoke runs, and wrote this comment. Claude Fable 5.2 (in the Claude app) reviewed it. I checked it before posting.
**@⁠einfachama** on GitHub · 2026-11-25 16:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/1113#issuecomment-7167725309) Rebased onto `main` `06c9f55` (it was on `6567c5f`, 275 commits behind). No conflicts; `git range-diff` shows the old head `8aef294` and the new head `5dc8f99` as the same patch. I updated **Tested** and **Regression run** in the description. **Tested** (head `5dc8f99`, on `main` `06c9f55`) - `cargo test --workspace -- --test-threads=4`: **1266 passed, 0 failed, 46 ignored**, on the first run. 18 tests print `SKIPPED`: 14 "no wave64" (two of them also print per-lane f16 / f32 cases the per-lane form refuses), 2 with no D3D12 debug layer, 1 with no heap windows, 1 with no Developer Mode. - `cargo test -p xcl --test used_pipelines`: passes at the head, and fails on `main` `06c9f55` with only the test added. - Smoke runs, my retail title, `scripts/smoke.ps1 -Seconds 60`, each from the same restored shader caches: `main` 1 472 frames, this change 1 503; no device removal, no crash. Both are lower than last time's 1 534 / 1 562, probably because `main`'s translation identity is new since #2120, so both runs started with nothing translated for it. **Regression run** ``` xcl-smoke v1 commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324 gpu: NVIDIA GeForce RTX 4060 title: aaf23206 seconds: 60 exit: 0x0 frames shown: 1472 (PresentX 1472) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16063 MB ``` ``` xcl-smoke v1 commit: 5dc8f992d926d15883a461538dd6ff328beff128 gpu: NVIDIA GeForce RTX 4060 title: aaf23206 seconds: 60 exit: 0x0 frames shown: 1503 (PresentX 1503) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16223 MB ``` **AI use** - Claude Code (Claude Opus 5.5) rebased the branch, ran the suite and the smoke runs, and wrote this comment. Claude Fable 5.2 (in the Claude app) reviewed it. I checked it before posting.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1113/head:github-bot/gh-1113'
git switch 'github-bot/gh-1113'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1113'
git switch 'github-bot/gh-1113'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1113'
git switch 'github-bot/gh-1113'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1113'
git switch 'main'
git merge --squash 'github-bot/gh-1113'
git switch 'main'
git merge --ff-only 'github-bot/gh-1113'
git switch 'main'
git merge 'github-bot/gh-1113'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.