D3D12.X: XCL_PSO_MANIFEST=1 writes the order a run asks for its pipelines (#2088) #2096

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

@⁠Anon64 on GitHub · 2026-11-25 03:53 UTC · original
Anon64:d3d12x/pso-manifest → main · +215 −1 · 5 files · 1 commits · open

XCL_PSO_MANIFEST=1 writes the order in which a run asks for its pipelines, as it goes, to pso-manifest.txt beside used-pipelines.txt. It records which pipelines a title needs before each point of its start, in the order it needs them, and which ones it had to wait for. That is the input #2088's milestone precompile needs, and it is workstream 1's first part, as claimed there. Recording only, off by default: nothing is built, ordered or skipped differently. Part of #2088.

The file is new each run, one tab-separated event a line, numbered in file order, with milliseconds since the first event:

  • use: a pipeline's first use (pso_async's note_use, the same point that feeds used-pipelines.txt), its shader-set key, compute or graphics, and ready / cold (built by then or not);
  • build: each driver compile (driver_compile_identified): kind, DXIL bytes, the console record's hash and whether a driver blob was supplied, time in the driver, and time waiting for a compile slot;
  • present: the title's presents at milestones (1, 2, 4 … 1024, then every 1024th), so a manifest shows where presents stop and whether they come back.

What is in it

  • crates/xcl/src/hle/d3d12x/pso_manifest.rs (new): the switch, the line format, the file, and three unit tests (the line layout against the header, the present milestones, the order of a first use against a concurrent bind).
  • pso_async.rs: a use event in Pending::note_use, through pso_manifest::note_first: the line is written under the manifest's lock before the pipeline is marked used, so a second bind of it and anything recorded after come later in the file (found in review by @⁠ettehn; test a_second_bind_comes_after_the_first_use_line, which fails with the old order).
  • real.rs: a build event in driver_compile_identified.
  • present.rs: a present event at the milestones.
  • mod.rs: the module.

Tested

  • NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Windows 11 26200, 64 GB RAM, Rust stable MSVC.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 (debug) on 3b84de8: 1156 passed, 1 failed, 46 ignored. The failure is hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory, which fails the same way on main. SKIPPED (no wave64 / no dxil.dll / per-lane refusals on this adapter): ir_text_assembles_signs_and_runs, a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu, f16_programs_on_the_gpu, f32_programs_on_the_gpu, f64_programs_on_the_gpu, integer_programs_on_the_gpu, mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, heap_window_out_of_memory_falls_back_to_the_switch_form.
  • A retail title with XCL_PSO_MANIFEST=1 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_PSO_PRELOAD=0, release, 150 s, A pressed every 4 s. XCL's DXIL cache and the NVIDIA cache were warm from earlier runs; the driver-blob column says which builds got a blob. The run wrote 1 030 lines: 511 first uses (510 cold, as expected with lazy pipelines and no preload), 508 driver builds, and presents up to the 1024th at 36.5 s. 12 pipelines were first used before that present; the other ~500 came after it, in the world load, where presents stop before the 2048th. No crash, no device removal.

Regression run
scripts/smoke.ps1 -Game <title folder>, 60 s, release, default settings (XCL_PSO_MANIFEST unset), A pressed every 4 s from 20 s:

main:

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1454 (PresentX 1454)
presents per 2 s (last 3): 17 1 2
device removals: 0
crashes: 0
peak commit: 25606 MB

this PR:

xcl-smoke v1
commit: bb4dea405b5a108fc1a73e0de77537ed6fd93b59
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1524 (PresentX 1525)
presents per 2 s (last 3): 54 21 6
device removals: 0
crashes: 0
peak commit: 25204 MB

Not tested

  • AMD; Linux / Wine.
  • The milestone precompile that would consume this (#2088's workstream 1, second part); not in this PR.
  • A cold-cache run: the manifest records cache state per build, but I did not clear the caches for this run.
  • XCL_LAZY_PSO=0: reviewers measured that a compute pipeline built at creation gets a build record but no use record (@⁠itsSio, @⁠ettehn on bb4dea4). With the default lazy pipelines the use record is there. A manifest captured with XCL_LAZY_PSO=0 is incomplete.

AI use

  • Claude Code (Claude Opus 5.5) wrote the code, the tests and this description, and ran the tests and the title runs on this machine.

🤖 Generated with Claude Code

**@⁠Anon64** on GitHub · 2026-11-25 03:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096) `Anon64:d3d12x/pso-manifest` → `main` · +215 −1 · 5 files · 1 commits · open `XCL_PSO_MANIFEST=1` writes the order in which a run asks for its pipelines, as it goes, to `pso-manifest.txt` beside `used-pipelines.txt`. It records which pipelines a title needs before each point of its start, in the order it needs them, and which ones it had to wait for. That is the input #2088's milestone precompile needs, and it is workstream 1's first part, as claimed there. Recording only, off by default: nothing is built, ordered or skipped differently. Part of #2088. The file is new each run, one tab-separated event a line, numbered in file order, with milliseconds since the first event: - `use`: a pipeline's first use (`pso_async`'s `note_use`, the same point that feeds `used-pipelines.txt`), its shader-set key, compute or graphics, and `ready` / `cold` (built by then or not); - `build`: each driver compile (`driver_compile_identified`): kind, DXIL bytes, the console record's hash and whether a driver blob was supplied, time in the driver, and time waiting for a compile slot; - `present`: the title's presents at milestones (1, 2, 4 … 1024, then every 1024th), so a manifest shows where presents stop and whether they come back. **What is in it** - `crates/xcl/src/hle/d3d12x/pso_manifest.rs` (new): the switch, the line format, the file, and three unit tests (the line layout against the header, the present milestones, the order of a first use against a concurrent bind). - `pso_async.rs`: a `use` event in `Pending::note_use`, through `pso_manifest::note_first`: the line is written under the manifest's lock before the pipeline is marked used, so a second bind of it and anything recorded after come later in the file (found in review by @⁠ettehn; test `a_second_bind_comes_after_the_first_use_line`, which fails with the old order). - `real.rs`: a `build` event in `driver_compile_identified`. - `present.rs`: a `present` event at the milestones. - `mod.rs`: the module. **Tested** - NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Windows 11 26200, 64 GB RAM, Rust stable MSVC. - `cargo test --workspace --no-fail-fast -- --test-threads=4` (debug) on `3b84de8`: 1156 passed, 1 failed, 46 ignored. The failure is `hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory`, which fails the same way on `main`. SKIPPED (no wave64 / no dxil.dll / per-lane refusals on this adapter): `ir_text_assembles_signs_and_runs`, `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu`, `f16_programs_on_the_gpu`, `f32_programs_on_the_gpu`, `f64_programs_on_the_gpu`, `integer_programs_on_the_gpu`, `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `heap_window_out_of_memory_falls_back_to_the_switch_form`. - A retail title with `XCL_PSO_MANIFEST=1 XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_PSO_PRELOAD=0`, release, 150 s, A pressed every 4 s. XCL's DXIL cache and the NVIDIA cache were warm from earlier runs; the driver-blob column says which builds got a blob. The run wrote 1 030 lines: 511 first uses (510 cold, as expected with lazy pipelines and no preload), 508 driver builds, and presents up to the 1024th at 36.5 s. 12 pipelines were first used before that present; the other ~500 came after it, in the world load, where presents stop before the 2048th. No crash, no device removal. **Regression run** `scripts/smoke.ps1 -Game <title folder>`, 60 s, release, default settings (`XCL_PSO_MANIFEST` unset), A pressed every 4 s from 20 s: main: ``` xcl-smoke v1 commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1454 (PresentX 1454) presents per 2 s (last 3): 17 1 2 device removals: 0 crashes: 0 peak commit: 25606 MB ``` this PR: ``` xcl-smoke v1 commit: bb4dea405b5a108fc1a73e0de77537ed6fd93b59 gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1524 (PresentX 1525) presents per 2 s (last 3): 54 21 6 device removals: 0 crashes: 0 peak commit: 25204 MB ``` **Not tested** - AMD; Linux / Wine. - The milestone precompile that would consume this (#2088's workstream 1, second part); not in this PR. - A cold-cache run: the manifest records cache state per build, but I did not clear the caches for this run. - `XCL_LAZY_PSO=0`: reviewers measured that a compute pipeline built at creation gets a `build` record but no `use` record (@⁠itsSio, @⁠ettehn on `bb4dea4`). With the default lazy pipelines the `use` record is there. A manifest captured with `XCL_LAZY_PSO=0` is incomplete. **AI use** - Claude Code (Claude Opus 5.5) wrote the code, the tests and this description, and ran the tests and the title runs on this machine. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Part of #2088, workstream 1 (the recording only): which pipelines a title
needs before each point of its start, in the order it needs them, and which
it had to wait for.

With XCL_PSO_MANIFEST=1, pso-manifest.txt beside used-pipelines.txt (a new
file each run) gets one tab-separated event a line, numbered in file order
with the milliseconds since the first:
- use: a pipeline's first use (pso_async's note_use), its shader-set key,
  compute or graphics, and whether it was built by then (ready / cold);
- build: each driver compile (driver_compile_identified): kind, DXIL bytes,
  the console record's hash and whether a driver blob was supplied, time in
  the driver and time waiting for a compile slot;
- present: the title's presents at milestones (1, 2, 4 ... 1024, then every
  1024th), so a manifest shows where presents stop and whether they return.

A first use's line is written, under the manifest's lock, before the
pipeline is marked used: a second bind of it (and a present after that) comes
after the line in the file (found in review by ettehn).

Recording only, off by default: nothing is built, ordered or skipped
differently.

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

@⁠anes66 on GitHub · 2026-11-25 05:10 UTC · original

CPU-only file-writer verification on exact head 5ffbb5ec8b5b4b475c603a3c14da1ed5d3847b9d passed. Optional test companion d098ec2 is directly on that head and adds one integration test only.

The unit-test build intentionally disables file creation, so this test compiles the unchanged pso_manifest.rs into a small non-test executable. Only cache-directory lookup and logging are supplied by the harness; the recorder, formatting, environment switch, file I/O and synchronization come from the real module. No GPU or title is involved.

Tested

  • Windows 10 Pro 19045, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug. The machine has an RTX 3060; it was not used by these tests.
  • Eight isolated child invocations: unset / 0 / true leave a missing cache directory untouched; 1 and whitespace-padded 1 each record 1,024 mixed events from eight synchronized threads; an unset process preserves an existing file; a fresh enabled process replaces that file and restarts sequence numbering; an invalid destination remains intact and the recorder returns without crashing.
  • Every recorded event is checked for its payload, column layout, contiguous file sequence, nondecreasing timestamp, per-thread order, and absence of missing/duplicate events.
  • cargo test --locked -p xcl --test pso_manifest_processes -j 2 -- --nocapture --test-threads=1: 1 passed, 0 failed, 0 ignored, 0 skips.
  • cargo test --locked -p xcl --lib hle::d3d12x::pso_manifest::tests:: -j 2 -- --nocapture --test-threads=1: 2 passed, 0 failed, 0 ignored, 0 skips.
  • Three temporary negative controls failed as expected: append instead of truncate, bypass the enabled check, and allocate sequence numbers before acquiring the file lock (with a scheduling delay to expose reordering). All changes were restored before the final passing runs and commit.

Not tested

Actual note_use / driver / present call sites, first-use deduplication, correlation across event types, real cache-directory selection, GPU execution, retail milestones, release, full workspace suite, or performance. The test validates the recorder's file contract; it does not establish a startup speedup or first playable frame. No competing runtime PR.

AI use

Codex (GPT-6; exact variant unavailable) wrote the test and temporary negative controls, ran CPU verification and prepared this report.

**@⁠anes66** on GitHub · 2026-11-25 05:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096#issuecomment-7153511720) CPU-only file-writer verification on exact head `5ffbb5ec8b5b4b475c603a3c14da1ed5d3847b9d` passed. Optional test companion [d098ec2](https://github.com/anes66/xcl/commit/d098ec289b31b6cc7a00b88bc31994709fac9811) is directly on that head and adds one integration test only. The unit-test build intentionally disables file creation, so this test compiles the unchanged `pso_manifest.rs` into a small non-test executable. Only cache-directory lookup and logging are supplied by the harness; the recorder, formatting, environment switch, file I/O and synchronization come from the real module. No GPU or title is involved. **Tested** - Windows 10 Pro 19045, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug. The machine has an RTX 3060; it was not used by these tests. - Eight isolated child invocations: unset / `0` / `true` leave a missing cache directory untouched; `1` and whitespace-padded `1` each record 1,024 mixed events from eight synchronized threads; an unset process preserves an existing file; a fresh enabled process replaces that file and restarts sequence numbering; an invalid destination remains intact and the recorder returns without crashing. - Every recorded event is checked for its payload, column layout, contiguous file sequence, nondecreasing timestamp, per-thread order, and absence of missing/duplicate events. - `cargo test --locked -p xcl --test pso_manifest_processes -j 2 -- --nocapture --test-threads=1`: **1 passed, 0 failed, 0 ignored, 0 skips**. - `cargo test --locked -p xcl --lib hle::d3d12x::pso_manifest::tests:: -j 2 -- --nocapture --test-threads=1`: **2 passed, 0 failed, 0 ignored, 0 skips**. - Three temporary negative controls failed as expected: append instead of truncate, bypass the enabled check, and allocate sequence numbers before acquiring the file lock (with a scheduling delay to expose reordering). All changes were restored before the final passing runs and commit. **Not tested** Actual `note_use` / driver / present call sites, first-use deduplication, correlation across event types, real cache-directory selection, GPU execution, retail milestones, release, full workspace suite, or performance. The test validates the recorder's file contract; it does not establish a startup speedup or first playable frame. No competing runtime PR. **AI use** Codex (GPT-6; exact variant unavailable) wrote the test and temporary negative controls, ran CPU verification and prepared this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 05:43 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 05:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096#issuecomment-7154081833) 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

@⁠JoaoPauluu on GitHub · 2026-11-25 05:47 UTC · original

A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with main (1353 here; 1360 and 1374 on the two main runs). This PR's run is with XCL_PSO_MANIFEST=1; the two new tests pass under Wine.

With XCL_PSO_MANIFEST=1 the run logged pipeline requests are written to C:\users\steamuser\AppData\Local\xcl\dxil\pso-manifest.txt at 3.9 s and wrote 245 events after the header:

  • 228 build: 227 graphics with cold, 1 with a driver blob. Their driver_ms sum to 17 ms and waited_ms to 0. I have not checked why the driver times are this low under vkd3d-proton. Three record hashes account for 222 of the builds (102, 102 and 18).
  • 6 use: 5 graphics ready, 1 compute ready.
  • 11 present, up to present 1024 at 45120 ms.

So this run has 6 first uses against 228 builds. Your run had 511 first uses. I have not checked whether the gap is expected, for example because builds that go through the stand-in path have no use event.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 5ffbb5e as it is (based on cbc296a) and main 6020a33, no uncommitted changes. Retail title 1.0.2.1, scripts/linux/smoke.sh (#257) for 60 s, no input. Runs in order: main, this PR (with other PRs in between), main. The new lib tests ran under Wine, one test per process.

Regression run

main (first run):

xcl-smoke v1
commit: 6020a33b16ba2de25b3aef5947552f2dc1831f09
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1360 (PresentX 1360)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

this PR:

xcl-smoke v1
commit: 5ffbb5ec8b5b4b475c603a3c14da1ed5d3847b9d
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1353 (PresentX 1354)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

The second main run: 1374 frames, exit: 0x0, no device removal, no crash. Under Wine, peak commit reads 0 MB, so these blocks do not check memory.

Not tested

  • the whole test suite on this head, a run with input, XCL_DIRECT_DXIL=1, a cold driver cache, native Windows.

AI use

  • Claude Code (Claude Opus 5.5) built both commits, ran the tests and the runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
**@⁠JoaoPauluu** on GitHub · 2026-11-25 05:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096#issuecomment-7154143824) A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with `main` (1353 here; 1360 and 1374 on the two `main` runs). This PR's run is with `XCL_PSO_MANIFEST=1`; the two new tests pass under Wine. With `XCL_PSO_MANIFEST=1` the run logged `pipeline requests are written to C:\users\steamuser\AppData\Local\xcl\dxil\pso-manifest.txt` at 3.9 s and wrote 245 events after the header: - 228 `build`: 227 `graphics` with `cold`, 1 with a driver `blob`. Their `driver_ms` sum to 17 ms and `waited_ms` to 0. I have not checked why the driver times are this low under vkd3d-proton. Three record hashes account for 222 of the builds (102, 102 and 18). - 6 `use`: 5 `graphics ready`, 1 `compute ready`. - 11 `present`, up to `present 1024` at 45120 ms. So this run has 6 first uses against 228 builds. Your run had 511 first uses. I have not checked whether the gap is expected, for example because builds that go through the stand-in path have no `use` event. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `5ffbb5e` as it is (based on `cbc296a`) and `main` `6020a33`, no uncommitted changes. Retail title 1.0.2.1, `scripts/linux/smoke.sh` (#257) for 60 s, no input. Runs in order: main, this PR (with other PRs in between), main. The new lib tests ran under Wine, one test per process. **Regression run** main (first run): ``` xcl-smoke v1 commit: 6020a33b16ba2de25b3aef5947552f2dc1831f09 gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1360 (PresentX 1360) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` this PR: ``` xcl-smoke v1 commit: 5ffbb5ec8b5b4b475c603a3c14da1ed5d3847b9d gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1353 (PresentX 1354) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` The second `main` run: 1374 frames, `exit: 0x0`, no device removal, no crash. Under Wine, `peak commit` reads 0 MB, so these blocks do not check memory. **Not tested** - the whole test suite on this head, a run with input, `XCL_DIRECT_DXIL=1`, a cold driver cache, native Windows. **AI use** - Claude Code (Claude Opus 5.5) built both commits, ran the tests and the runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-25 06:02 UTC · original

Independent native Windows check of exact PR head 5ffbb5ec8b5b4b475c603a3c14da1ed5d3847b9d against main 6020a33b16ba2de25b3aef5947552f2dc1831f09.

Hardware/toolchain: Windows 11 build 26200, Ryzen 9 5980HX, Radeon RX 6800M driver 30.0.13002.13003, Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5.

Tested

  • cargo test --locked -p xcl --lib -j 2 pso_manifest::tests -- --test-threads=1 --show-output: 2 passed, 0 failed, 0 ignored on the exact PR head.
  • cargo build --locked --workspace --release -j 2: passed.
  • Paired 7-second launches of my owned 1.0.2.1 title, each with isolated data and shader caches and a commit-memory guard. XCL_PSO_MANIFEST=1 was set on the PR run only. Both completed without the guard firing:
xcl-smoke v1
commit: 6020a33b16ba2de25b3aef5947552f2dc1831f09
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 7
exit: 0x0
frames shown: 1 (PresentX 1)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 6969 MB
xcl-smoke v1
commit: 5ffbb5ec8b5b4b475c603a3c14da1ed5d3847b9d
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 7
exit: 0x0
frames shown: 1 (PresentX 1)
presents per 2 s (last 3): 0 0 1
device removals: 0
crashes: 0
peak commit: 7057 MB

The PR created pso-manifest.txt in the isolated DXIL cache. It contained the v1 header and exactly one event, 0\t0\tpresent\t1, consistent with the one shown frame. used-pipelines.txt was empty. This short run did not reach a pipeline use or build event, a world-loading milestone, or a meaningful performance comparison. It checks the enabled recorder's startup, file location, and first-present event on this AMD setup; the two unit tests check line formatting and milestone selection.

No game data was uploaded. AI-assisted testing and report drafting with OpenAI Codex (GPT-6); I checked the exact revisions and local logs before posting.

**@⁠luckyteagirl** on GitHub · 2026-11-25 06:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096#issuecomment-7154388274) Independent native Windows check of exact PR head `5ffbb5ec8b5b4b475c603a3c14da1ed5d3847b9d` against `main` `6020a33b16ba2de25b3aef5947552f2dc1831f09`. Hardware/toolchain: Windows 11 build 26200, Ryzen 9 5980HX, Radeon RX 6800M driver `30.0.13002.13003`, Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5. **Tested** - `cargo test --locked -p xcl --lib -j 2 pso_manifest::tests -- --test-threads=1 --show-output`: **2 passed, 0 failed, 0 ignored** on the exact PR head. - `cargo build --locked --workspace --release -j 2`: passed. - Paired 7-second launches of my owned 1.0.2.1 title, each with isolated data and shader caches and a commit-memory guard. `XCL_PSO_MANIFEST=1` was set on the PR run only. Both completed without the guard firing: ```text xcl-smoke v1 commit: 6020a33b16ba2de25b3aef5947552f2dc1831f09 gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 7 exit: 0x0 frames shown: 1 (PresentX 1) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 6969 MB ``` ```text xcl-smoke v1 commit: 5ffbb5ec8b5b4b475c603a3c14da1ed5d3847b9d gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 7 exit: 0x0 frames shown: 1 (PresentX 1) presents per 2 s (last 3): 0 0 1 device removals: 0 crashes: 0 peak commit: 7057 MB ``` The PR created `pso-manifest.txt` in the isolated DXIL cache. It contained the v1 header and exactly one event, `0\t0\tpresent\t1`, consistent with the one shown frame. `used-pipelines.txt` was empty. This short run did **not** reach a pipeline `use` or `build` event, a world-loading milestone, or a meaningful performance comparison. It checks the enabled recorder's startup, file location, and first-present event on this AMD setup; the two unit tests check line formatting and milestone selection. No game data was uploaded. AI-assisted testing and report drafting with OpenAI Codex (GPT-6); I checked the exact revisions and local logs before posting.
Author
Owner

@⁠ettehn on GitHub · 2026-11-25 07:14 UTC · original

CPU-only A/B for two binds of the same pending pipeline. On Windows 11 25H2 (26200.9974), Ryzen 9 8945HX and rustc 1.97.1 MSVC, I compiled the actual Pending::note_use body from 5ffbb5e, the real manifest writer, and the compute_prefix parser from #2104 in a small harness. It pauses the first bind inside used::note, then lets a second thread bind the same pending pipeline and emit Present(1) before releasing the first thread. The harness controls thread scheduling and writes to an isolated directory.

  • 5ffbb5e, 20/20: the file had present then use. The parser selected [] through present 1.
  • Local candidate, 20/20: the file had use then present. The parser selected [1]. The candidate writes the first-use event under the manifest lock before publishing the used flag when recording is enabled.

The candidate also passed the 3 manifest and 6 async-pipeline unit tests with cargo test --locked --offline -j 2 -p xcl --lib <filter> -- --test-threads=1. This is a controlled interleaving. Frequency during retail runs and recording overhead are unmeasured. No GPU or title was used.

Verification and local patch assisted by OpenAI Codex (GPT-6).

**@⁠ettehn** on GitHub · 2026-11-25 07:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096#issuecomment-7155646743) **CPU-only A/B for two binds of the same pending pipeline.** On Windows 11 25H2 (26200.9974), Ryzen 9 8945HX and rustc 1.97.1 MSVC, I compiled the actual `Pending::note_use` body from `5ffbb5e`, the real manifest writer, and the `compute_prefix` parser from #2104 in a small harness. It pauses the first bind inside `used::note`, then lets a second thread bind the same pending pipeline and emit `Present(1)` before releasing the first thread. The harness controls thread scheduling and writes to an isolated directory. - `5ffbb5e`, **20/20**: the file had `present` then `use`. The parser selected `[]` through present 1. - Local candidate, **20/20**: the file had `use` then `present`. The parser selected `[1]`. The candidate writes the first-use event under the manifest lock before publishing the `used` flag when recording is enabled. The candidate also passed the 3 manifest and 6 async-pipeline unit tests with `cargo test --locked --offline -j 2 -p xcl --lib <filter> -- --test-threads=1`. This is a controlled interleaving. Frequency during retail runs and recording overhead are unmeasured. No GPU or title was used. Verification and local patch assisted by OpenAI Codex (GPT-6).
Author
Owner

@⁠Anon64 on GitHub · 2026-11-25 07:27 UTC · original

@⁠ettehn thanks, you're right. used.swap(true) published the flag before the line was written, so a second bind could go on, and a present could get into the file, ahead of the first use. Fixed in 3b84de8 (squashed into the PR's commit):

  • The fix: pso_manifest::note_first checks the flag, writes the use line and only then sets the flag, all under the manifest's lock. Pending::note_use goes through it. With recording off it is the old swap.
  • New test a_second_bind_comes_after_the_first_use_line: two threads bind one pipeline at once for 200 rounds. The losing one records a present as soon as its bind returns, and the test checks that the use line comes first and appears once.
  • Checked against the old order: I put that order (flag set, lock dropped, line written after) into the same function. The test failed at round 139 with present before use, your interleaving. That was with a yield_now added to widen the window, so in a real run it would be much rarer.

The full suite and the smoke pair on the new head are running; I'll update the description with both.

Written with Claude Code (Claude Opus 5.5).

**@⁠Anon64** on GitHub · 2026-11-25 07:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096#issuecomment-7155884865) @⁠ettehn thanks, you're right. `used.swap(true)` published the flag before the line was written, so a second bind could go on, and a present could get into the file, ahead of the first use. Fixed in `3b84de8` (squashed into the PR's commit): - **The fix:** `pso_manifest::note_first` checks the flag, writes the `use` line and only then sets the flag, all under the manifest's lock. `Pending::note_use` goes through it. With recording off it is the old `swap`. - **New test** `a_second_bind_comes_after_the_first_use_line`: two threads bind one pipeline at once for 200 rounds. The losing one records a present as soon as its bind returns, and the test checks that the `use` line comes first and appears once. - **Checked against the old order:** I put that order (flag set, lock dropped, line written after) into the same function. The test failed at round 139 with `present` before `use`, your interleaving. That was with a `yield_now` added to widen the window, so in a real run it would be much rarer. The full suite and the smoke pair on the new head are running; I'll update the description with both. Written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠Gevroska on GitHub · 2026-11-25 08:14 UTC · original

Could you add a sentence to the manifest docs explaining when a build record is written? As I read the patch, it’s emitted when the driver compilation returns. Until then, the absence of a build line can mean the request is still waiting for a compile slot or the driver call is still in progress. The manifest alone can’t distinguish those cases.

I ran into that ambiguity when reviewing two RTX 3080 world-loading traces captured before this PR. The ordinary logs showed three driver calls in one run and four in the other. The earliest logged call started about 12 seconds after the last shown-present interval in the first run and 11 seconds after it in the second. None of the seven logged calls spanned the point where presentation stopped. That leaves earlier unlogged work unresolved. A short note would help anyone reading a manifest that ends during a stall.

I used Codex with GPT-6.2 Sol to analyze the saved traces. A separate GPT-6.2 Sol agent independently verified the timing comparison.

**@⁠Gevroska** on GitHub · 2026-11-25 08:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096#issuecomment-7156780975) Could you add a sentence to the manifest docs explaining when a `build` record is written? As I read the patch, it’s emitted when the driver compilation returns. Until then, the absence of a `build` line can mean the request is still waiting for a compile slot or the driver call is still in progress. The manifest alone can’t distinguish those cases. I ran into that ambiguity when reviewing two RTX 3080 world-loading traces captured before this PR. The ordinary logs showed three driver calls in one run and four in the other. The earliest logged call started about 12 seconds after the last shown-present interval in the first run and 11 seconds after it in the second. None of the seven logged calls spanned the point where presentation stopped. That leaves earlier unlogged work unresolved. A short note would help anyone reading a manifest that ends during a stall. I used Codex with GPT-6.2 Sol to analyze the saved traces. A separate GPT-6.2 Sol agent independently verified the timing comparison.
Author
Owner

@⁠Anon64 on GitHub · 2026-11-25 08:21 UTC · original

Added in bb4dea4, in the module docs: a build line is written when the driver call returns, so a compile that is still waiting for a slot or still in the driver has no line yet, and a manifest that ends in a stall cannot tell those two apart. Smoke blocks in the description are rerun on the new head.

(Claude Code, Claude Opus 5.5)

**@⁠Anon64** on GitHub · 2026-11-25 08:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096#issuecomment-7156932863) Added in `bb4dea4`, in the module docs: a `build` line is written when the driver call returns, so a compile that is still waiting for a slot or still in the driver has no line yet, and a manifest that ends in a stall cannot tell those two apart. Smoke blocks in the description are rerun on the new head. (Claude Code, Claude Opus 5.5)
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 10:47 UTC · original

Code review on bb4dea4:

  • pso_manifest::note_first_on cleanly checks and sets pending.used under the manifest mutex so losing concurrent binds never emit a present before the winning use line (a_second_bind_comes_after_the_first_use_line).
  • Diff audited and CI workflow approved (running).

Remaining before merge: Fix PR description, Build and test green, and dual-vendor verification on bb4dea4.

**@⁠raylitebull** on GitHub · 2026-11-25 10:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096#issuecomment-7160178806) Code review on `bb4dea4`: - `pso_manifest::note_first_on` cleanly checks and sets `pending.used` under the manifest mutex so losing concurrent binds never emit a `present` before the winning `use` line (`a_second_bind_comes_after_the_first_use_line`). - Diff audited and CI workflow approved (running). **Remaining before merge:** Fix `PR description`, `Build and test` green, and dual-vendor verification on `bb4dea4`.
Author
Owner

@⁠itsSio on GitHub · 2026-11-25 11:57 UTC · original · edited 2026-11-25 12:02 UTC

The manifest omits the first-use event for a compute pipeline built synchronously with XCL_LAZY_PSO=0, even when its dispatch and readback succeed. Lazy-on runs recorded that event, including a new process reusing the DXIL cache directory. This is a limitation of the tested synchronous path, not evidence that a reused DXIL cache alone drops events. #2104 selects use rather than build records, so these manifests should not be assumed complete for milestone precompile.

Tested: Clean bb4dea405b5a108fc1a73e0de77537ed6fd93b59, Windows 11 Pro build 26200, NVIDIA 610.88, debug MSVC:

  • RTX 5080 16 GB, Ryzen 7 9800X3D, 32 GiB, Rust 1.97.0, DXC 1.9.2609.5.
  • RTX 2080 SUPER 8 GB, Ryzen 5 5600X, 16 GiB, Rust 1.99.1, DXC 1.8.2502.11.

On each PC ran cargo test -p xcl --locked -j 4 --test gpu_compute_e2e console_wave64_compute_through_the_pso_hook_dispatch_and_read_back -- --exact --nocapture --test-threads=1 with XCL_PSO_MANIFEST=1, XCL_ASYNC_PSO=1, and XCL_PSO_DISK_CACHE=0. Each run was 1 passed, 0 failed, 0 ignored, 0 runtime skips. With XCL_LAZY_PSO=1, both a fresh XCL DXIL cache and a subsequent process reusing it recorded one use, one build per PC (key b3b2fd750cde2d8d). With XCL_LAZY_PSO=0 and a separate fresh XCL DXIL cache, each PC recorded zero use, one build. The built record was f762fc1473e87d61 in all six runs. A targeted docs note about XCL_LAZY_PSO=0 would prevent readers from treating those captures as complete.

Downstream CLI check: On both machines cargo build --workspace --locked -j 4 succeeded at clean #2104 head f1810d0c362e73822e08bacf789e7422736ffafc. I appended one synthetic present 1 event to each capture because the readback test does not present. In xcl shaders <unrelated-synthetic-record> --precompile --pipelines --pso-manifest <capture> --through-present 1, both lazy-on captures selected the recorded key and exited 2 with unmatched compute keys (1): b3b2fd750cde2d8d, as expected for the deliberately unrelated input. The lazy-off build-only capture exited 0 with present 1: 0 compute pipelines in first-use order on both PCs. This confirms the CLI behavior, not a real startup milestone or a pipeline build.

Not tested: A matching #2104 precompile build, XCL_ASYNC_PSO=0, graphics, a retail title, AMD, or the whole workspace on these heads.

AI use

Ran via Samaritan:

  • OpenCode (Claude Opus 5.5): identified the manifest coverage gap and suggested a targeted replay.
  • OpenCode (GPT-6.2 Sol): ran both PC controls, checked the lazy deferral path, and drafted the report.
**@⁠itsSio** on GitHub · 2026-11-25 11:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096#issuecomment-7161730101) · edited 2026-11-25 12:02 UTC The manifest omits the first-use event for a compute pipeline built synchronously with `XCL_LAZY_PSO=0`, even when its dispatch and readback succeed. Lazy-on runs recorded that event, including a new process reusing the DXIL cache directory. This is a limitation of the tested synchronous path, not evidence that a reused DXIL cache alone drops events. #2104 selects `use` rather than `build` records, so these manifests should not be assumed complete for milestone precompile. **Tested:** Clean `bb4dea405b5a108fc1a73e0de77537ed6fd93b59`, Windows 11 Pro build 26200, NVIDIA 610.88, debug MSVC: - RTX 5080 16 GB, Ryzen 7 9800X3D, 32 GiB, Rust 1.97.0, DXC 1.9.2609.5. - RTX 2080 SUPER 8 GB, Ryzen 5 5600X, 16 GiB, Rust 1.99.1, DXC 1.8.2502.11. On each PC ran `cargo test -p xcl --locked -j 4 --test gpu_compute_e2e console_wave64_compute_through_the_pso_hook_dispatch_and_read_back -- --exact --nocapture --test-threads=1` with `XCL_PSO_MANIFEST=1`, `XCL_ASYNC_PSO=1`, and `XCL_PSO_DISK_CACHE=0`. Each run was **1 passed, 0 failed, 0 ignored, 0 runtime skips**. With `XCL_LAZY_PSO=1`, both a fresh XCL DXIL cache and a subsequent process reusing it recorded **one `use`, one `build`** per PC (key `b3b2fd750cde2d8d`). With `XCL_LAZY_PSO=0` and a separate fresh XCL DXIL cache, each PC recorded **zero `use`, one `build`**. The built record was `f762fc1473e87d61` in all six runs. A targeted docs note about `XCL_LAZY_PSO=0` would prevent readers from treating those captures as complete. **Downstream CLI check:** On both machines `cargo build --workspace --locked -j 4` succeeded at clean #2104 head `f1810d0c362e73822e08bacf789e7422736ffafc`. I appended one synthetic `present 1` event to each capture because the readback test does not present. In `xcl shaders <unrelated-synthetic-record> --precompile --pipelines --pso-manifest <capture> --through-present 1`, both lazy-on captures selected the recorded key and exited **2** with `unmatched compute keys (1): b3b2fd750cde2d8d`, as expected for the deliberately unrelated input. The lazy-off build-only capture exited **0** with `present 1: 0 compute pipelines in first-use order` on both PCs. This confirms the CLI behavior, not a real startup milestone or a pipeline build. **Not tested:** A matching #2104 precompile build, `XCL_ASYNC_PSO=0`, graphics, a retail title, AMD, or the whole workspace on these heads. **AI use** Ran via Samaritan: - OpenCode (Claude Opus 5.5): identified the manifest coverage gap and suggested a targeted replay. - OpenCode (GPT-6.2 Sol): ran both PC controls, checked the lazy deferral path, and drafted the report.
Author
Owner

@⁠ettehn on GitHub · 2026-11-25 13:46 UTC · original

I reproduced @⁠itsSio’s missing compute use record on clean bb4dea4 with a synthetic dispatch/readback on Windows 11, RTX 5070 Ti Laptop (621.24), DXC 1.8.2502.11. With XCL_ASYNC_PSO=1 and XCL_LAZY_PSO=0, the readback passed but the manifest contained one build and zero use records.

A local follow-up covers both paths. The eager background submission now carries the same shader key into Pending when manifest logging is enabled. The already-translated synchronous path keeps the key until first bind (or final release) and records it as ready. Neither changes scheduling or which PSOs enter the lazy preload history.

On the patched build, cold eager, warm eager, lazy, and async-off runs each recorded exactly one compute use for b3b2fd750cde2d8d, with one build and correct readback. Trace-off produced no manifest. A new GPU regression also checks that synchronous creation has no use yet, then calls the real SetPipelineState hook twice and checks that only one ready use follows the build. gpu_compute_e2e reported 5 passed, 0 failed, with one explicit skip (the existing heap-window fallback test). Synthetic input only.

OpenAI Codex assisted.

**@⁠ettehn** on GitHub · 2026-11-25 13:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096#issuecomment-7164277244) I reproduced @⁠itsSio’s missing compute use record on clean `bb4dea4` with a synthetic dispatch/readback on Windows 11, RTX 5070 Ti Laptop (621.24), DXC 1.8.2502.11. With `XCL_ASYNC_PSO=1` and `XCL_LAZY_PSO=0`, the readback passed but the manifest contained one `build` and zero `use` records. A local follow-up covers both paths. The eager background submission now carries the same shader key into `Pending` when manifest logging is enabled. The already-translated synchronous path keeps the key until first bind (or final release) and records it as `ready`. Neither changes scheduling or which PSOs enter the lazy preload history. On the patched build, cold eager, warm eager, lazy, and async-off runs each recorded exactly one compute `use` for `b3b2fd750cde2d8d`, with one build and correct readback. Trace-off produced no manifest. A new GPU regression also checks that synchronous creation has no `use` yet, then calls the real `SetPipelineState` hook twice and checks that only one `ready` use follows the build. `gpu_compute_e2e` reported 5 passed, 0 failed, with one explicit skip (the existing heap-window fallback test). Synthetic input only. OpenAI Codex assisted.
Author
Owner

@⁠Anon64 on GitHub · 2026-11-25 17:32 UTC · original

@⁠itsSio @⁠ettehn thank you both: two machines and a third reproduction agree, so it's confirmed. With XCL_LAZY_PSO=0, a compute pipeline built at creation is never bound through a pending entry, so no use line is written for it. I've added this under Not tested in the description, so nobody treats such a capture as complete.

@⁠ettehn, your follow-up covers both the eager and the already-translated synchronous path and comes with a GPU regression test. Rather than write a second version, could you open it as a PR stacked on this one (Stacked on #2096)? Pushing it to d3d12x/pso-manifest would also work. Either way I'll run it on the RTX 3060 and post the results there.

AI use: Claude Code, Claude Opus 5.5 read the reports and wrote this reply.

**@⁠Anon64** on GitHub · 2026-11-25 17:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096#issuecomment-7169649573) @⁠itsSio @⁠ettehn thank you both: two machines and a third reproduction agree, so it's confirmed. With `XCL_LAZY_PSO=0`, a compute pipeline built at creation is never bound through a pending entry, so no `use` line is written for it. I've added this under **Not tested** in the description, so nobody treats such a capture as complete. @⁠ettehn, your follow-up covers both the eager and the already-translated synchronous path and comes with a GPU regression test. Rather than write a second version, could you open it as a PR stacked on this one (`Stacked on #2096`)? Pushing it to `d3d12x/pso-manifest` would also work. Either way I'll run it on the RTX 3060 and post the results there. AI use: Claude Code, Claude Opus 5.5 read the reports and wrote this reply.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 07:28 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 07:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/2096#issuecomment-7185500234) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
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/2096/head:github-bot/gh-2096'
git switch 'github-bot/gh-2096'

Merge

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