Shader compile time: DXC compiles without lifetime markers #1529

Open
github-bot wants to merge 2 commits from github-bot/gh-1529 into main AGit
Owner

@⁠Retried on GitHub · 2026-11-24 17:18 UTC · original
Retried:shader-compile-time → main · +106 −16 · 2 files · 2 commits · open

DXC now gets -disable-lifetime-markers for every recompiled program. With HLSL 2021 and SM 6.6 it wraps every local in a lifetime.start / lifetime.end pair. The pair only tells the optimiser that the local is undefined where its scope starts. Without it, the local keeps its last value there, which is one of the values "undefined" already allowed, so no program changes meaning. Programs compile about 6 % faster and their DXIL is 0.6 % smaller. A caller that passes -enable-lifetime-markers (or its own -O) still wins.

Refs #1269

What is in it

  • Tests: retail_pipeline_cost times DXC and the driver per program (crates/xcl/src/gpu/recomp/tests.rs): an ignored test that translates retail records (picked by offset) the way a title gets them, including the split wave64 form, and creates them as compute pipelines. It prints the translation + DXC time, the DXIL size and the driver time. xcl shaders --compile cannot measure the driver: its HLSL is not the split form, and NVIDIA refuses [WaveSize(64)].
  • Recompiler: DXC compiles without lifetime markers (crates/xcl/src/gpu/recomp/dxc.rs): the arguments are now built in arguments(), which adds the flag. Two tests: the exact arguments per size and caller overrides, and a compile with real DXC.

Tested

  • NVIDIA GeForce RTX 2070 SUPER (driver 621.35), Ryzen 7 5800X3D, 32 GB, Windows 10.0.26300.9974, rustc 1.100.0, DXC 1.9.2602.17 (Windows SDK 10.0.26100.0)

  • cargo build --workspace && cargo test --workspace -- --test-threads=4 (debug, XCL_SAMPLE_RPF set): 772 passed, 0 failed, 42 ignored

  • SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64)

  • Compile time on a retail shaders.rpf, before → after:

    measurement before after
    retail_translation_survey, seed 1269, 63 programs, DXC in process (release), b7aa9f3 and this PR run alternately, two rounds; total 62 s / 61 s 58 s / 58 s (−5.7 %)
    same: median / p90 / max 0.24–0.25 / 2.61–2.68 / 9.5–9.6 s 0.23–0.24 / 2.39–2.40 / 9.0–9.1 s
    130 random programs, dxc.exe 141.2 s 133.1 s (−5.7 %), DXIL −0.6 %
    5 heavy compute programs (retail_pipeline_cost), DXC −4 to −16 %
    same, driver (CreateComputePipelineState, DXIL the driver had not seen) −6 to −10 %, one +2 %

    The first version of this description gave 71 s → 64 / 65 s for the sample. The 71 s was measured on an older main, so it was replaced by the alternating runs above.

Regression run

Both runs used an empty XCL_DXIL_CACHE and XCL_TRANSLATED_CACHE=0. Order: main, this PR, main again, and this PR again after the commit message was corrected (same tree). The blocks are the second main run and the last run. The first main run, made while the game files were not yet in the OS file cache, showed 454 frames (same exit, no removals or crashes, peak commit 15737 MB).

xcl-smoke v1
commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7
gpu: NVIDIA GeForce RTX 2070 SUPER
title: hehe
seconds: 60
exit: 0x0
frames shown: 1072 (PresentX 1072)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15596 MB
xcl-smoke v1
commit: 3386385bb1b701238b9030a883380adc5ac3e56e
gpu: NVIDIA GeForce RTX 2070 SUPER
title: hehe
seconds: 60
exit: 0x0
frames shown: 1048 (PresentX 1048)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15593 MB

Not tested

  • AMD and Intel GPUs, and the driver time on them; GPUs with wave64.
  • Older DXC versions (the flag exists since 1.6.2106).
  • The smoke run does not show the speedup: after warm-up both runs hold 60 presents per 2 s. The compile measurements above do.
  • Cached DXIL from before stays in use, because the cache key has no flags. It is still valid, but it is not recompiled with the flag until the HLSL changes.

AI use

  • Claude Code, Claude Opus 5.5: wrote the code, the tests and this description, and ran the measurements and the test suite on the hardware above.

🤖 Generated with Claude Code

**@⁠Retried** on GitHub · 2026-11-24 17:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/1529) `Retried:shader-compile-time` → `main` · +106 −16 · 2 files · 2 commits · open DXC now gets `-disable-lifetime-markers` for every recompiled program. With HLSL 2021 and SM 6.6 it wraps every local in a `lifetime.start` / `lifetime.end` pair. The pair only tells the optimiser that the local is undefined where its scope starts. Without it, the local keeps its last value there, which is one of the values "undefined" already allowed, so no program changes meaning. Programs compile about 6 % faster and their DXIL is 0.6 % smaller. A caller that passes `-enable-lifetime-markers` (or its own `-O`) still wins. Refs #1269 **What is in it** - `Tests: retail_pipeline_cost times DXC and the driver per program` (`crates/xcl/src/gpu/recomp/tests.rs`): an ignored test that translates retail records (picked by offset) the way a title gets them, including the split wave64 form, and creates them as compute pipelines. It prints the translation + DXC time, the DXIL size and the driver time. `xcl shaders --compile` cannot measure the driver: its HLSL is not the split form, and NVIDIA refuses `[WaveSize(64)]`. - `Recompiler: DXC compiles without lifetime markers` (`crates/xcl/src/gpu/recomp/dxc.rs`): the arguments are now built in `arguments()`, which adds the flag. Two tests: the exact arguments per size and caller overrides, and a compile with real DXC. **Tested** - NVIDIA GeForce RTX 2070 SUPER (driver 621.35), Ryzen 7 5800X3D, 32 GB, Windows 10.0.26300.9974, rustc 1.100.0, DXC 1.9.2602.17 (Windows SDK 10.0.26100.0) - `cargo build --workspace && cargo test --workspace -- --test-threads=4` (debug, `XCL_SAMPLE_RPF` set): 772 passed, 0 failed, 42 ignored - SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64) - Compile time on a retail `shaders.rpf`, before → after: | measurement | before | after | |---|---|---| | `retail_translation_survey`, seed 1269, 63 programs, DXC in process (release), `b7aa9f3` and this PR run alternately, two rounds; total | 62 s / 61 s | 58 s / 58 s (−5.7 %) | | same: median / p90 / max | 0.24–0.25 / 2.61–2.68 / 9.5–9.6 s | 0.23–0.24 / 2.39–2.40 / 9.0–9.1 s | | 130 random programs, `dxc.exe` | 141.2 s | 133.1 s (−5.7 %), DXIL −0.6 % | | 5 heavy compute programs (`retail_pipeline_cost`), DXC | | −4 to −16 % | | same, driver (`CreateComputePipelineState`, DXIL the driver had not seen) | | −6 to −10 %, one +2 % | The first version of this description gave 71 s → 64 / 65 s for the sample. The 71 s was measured on an older `main`, so it was replaced by the alternating runs above. **Regression run** Both runs used an empty `XCL_DXIL_CACHE` and `XCL_TRANSLATED_CACHE=0`. Order: main, this PR, main again, and this PR again after the commit message was corrected (same tree). The blocks are the second main run and the last run. The first main run, made while the game files were not yet in the OS file cache, showed 454 frames (same exit, no removals or crashes, peak commit 15737 MB). ``` xcl-smoke v1 commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7 gpu: NVIDIA GeForce RTX 2070 SUPER title: hehe seconds: 60 exit: 0x0 frames shown: 1072 (PresentX 1072) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15596 MB ``` ``` xcl-smoke v1 commit: 3386385bb1b701238b9030a883380adc5ac3e56e gpu: NVIDIA GeForce RTX 2070 SUPER title: hehe seconds: 60 exit: 0x0 frames shown: 1048 (PresentX 1048) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15593 MB ``` **Not tested** - AMD and Intel GPUs, and the driver time on them; GPUs with wave64. - Older DXC versions (the flag exists since 1.6.2106). - The smoke run does not show the speedup: after warm-up both runs hold 60 presents per 2 s. The compile measurements above do. - Cached DXIL from before stays in use, because the cache key has no flags. It is still valid, but it is not recompiled with the flag until the HLSL changes. **AI use** - Claude Code, Claude Opus 5.5: wrote the code, the tests and this description, and ran the measurements and the test suite on the hardware above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
An ignored test for compile-time work (#1269): each record named by its
offset in XCL_SAMPLE_RPF (XCL_RECORDS) is translated and compiled the
way a title gets it (split wave64 on 32-lane GPUs, XCL_RECOMP_WINDOWS),
and then created as a compute pipeline. It prints the translation + DXC
time, the DXIL size and the driver's CreateComputePipelineState time.

`xcl shaders --compile` cannot measure the driver: its HLSL is not the
split form, and NVIDIA refuses [WaveSize(64)]. Run it with
XCL_DXIL_CACHE set to an empty folder and XCL_TRANSLATED_CACHE=0. The
driver keeps its own disk cache, so only DXIL it has not seen gives a
real time. On RTX 2070 SUPER the slowest RT resolve program
(0xd73cab0) takes 9.1 s in DXC and 8.5 s in the driver.

Refs #1269

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With HLSL 2021 and SM 6.6, DXC puts a lifetime.start / lifetime.end
pair around every local. They only tell the optimiser that a local is
undefined where its scope starts. Without them (-disable-lifetime-markers)
the local holds its last value there, which is one of the values
"undefined" allowed, so no program changes meaning. A caller's own
-enable-lifetime-markers still wins. The DXC arguments are built in
arguments() now, so a test can check them.

Measured on a retail pack, DXC 1.9.2602.17, RTX 2070 SUPER, Ryzen 7 5800X3D:
- seeded sample of 63 programs (retail_translation_survey, seed 1269,
  in-process DXC, main and this commit run alternately, two rounds):
  total 62 / 61 s -> 58 / 58 s (-5.7 %), median 0.24-0.25 -> 0.23-0.24 s,
  p90 2.61-2.68 -> 2.39-2.40 s, max 9.5-9.6 -> 9.0-9.1 s
- 130 random programs, dxc.exe: 141.2 -> 133.1 s (-5.7 %), DXIL -0.6 %
- 5 heavy compute programs as a title compiles them
  (retail_pipeline_cost): DXC -4 to -16 %; driver -6 to -10 %, one +2 %

Cached DXIL from before stays valid (the key has no flags), so nothing
has to be thrown away.

Refs #1269

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

@⁠MatyEjsr on GitHub · 2026-11-24 17:45 UTC · original

Verified PR #1529 at head commit e06ffce08bdca11410bcba022ec4dbd58f5fbd42 on NVIDIA RTX 3090 (wave32 / split wave64).

Environment

  • OS: Windows 11 Pro for Workstations (10.0.26200, build 26200)
  • CPU: AMD Ryzen 7 7800X3D (8C/8T)
  • GPU: NVIDIA GeForce RTX 3090 (driver 617.42)
  • RAM: 31.4 GB
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09), debug build
  • DXC: dxcompiler 1.9.2602.17 (21d28f72), dxil 1.9.2602.17 (Windows SDK 10.0.26100.0)

Tested

  • Clean merge check against origin/main (9e3831e): git merge-tree --write-tree 9e3831e e06ffce exited 0 (no conflicts).
  • cargo build --workspace -j 8: succeeded (10.82s).
  • cargo test --workspace -j 8 -- --test-threads=4: 772 passed, 0 failed, 42 ignored.
    • SKIPPED (4):
      • gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64)
      • gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64)
      • test_title_draws_with_a_root_signature_under_the_debug_layer (no d3d12SDKLayers.dll)
      • uploads_start_from_each_subresources_state (no D3D12 debug layer (0x887A002D))
  • Targeted new tests (arguments_pick_the_level_by_size_and_leave_out_lifetime_markers, dxc_accepts_the_arguments): 2 passed, 0 failed, 0 ignored.
  • Deterministic single-threaded GPU recompiler timing check (cargo test -p xcl --lib gpu::recomp::tests::gpu_ -j 8 -- --test-threads=1, 85 passed, 0 failed, 1 ignored, 2 SKIPPED):
    • Parent main (b7aa9f3): 4.69s, 4.64s, 4.66s (median 4.66s)
    • PR #1529 (e06ffce): 4.57s, 4.56s, 4.51s (median 4.56s, -2.1% end-to-end across the synthetic GPU suite including PSO creation and execution)
  • Note on high thread counts: under --test-threads=8, gpu_sparse_vram_descriptors_buffers_and_xmem intermittently fails (submit 1 lane 0 mismatch, left 0 vs right 1077) when another test opens UMA concurrently; confirmed pre-existing on main (b7aa9f3, 2/3 runs) and unrelated to PR #1529 (passes 3/3 solo and passes under --test-threads=4).

Code review

  • arguments() cleanly isolates DXC argument construction, preserves caller -O* and *lifetime-markers overrides by placing extra last, and leaves the DXIL cache key unchanged so existing cached entries remain valid.
  • retail_pipeline_cost properly drops ManuallyDrop::into_inner(desc.pRootSignature) and stays #[ignore]d behind XCL_SAMPLE_RPF and XCL_RECORDS.

Not tested

  • AMD RDNA / native wave64 and Intel GPUs
  • Release build and older DXC versions
  • D3D12 debug-layer tests (SDK layers DLL not installed)
  • Retail shader pack benchmarks (retail_pipeline_cost, retail_translation_survey) and retail smoke run (XCL_SAMPLE_* unset)

AI use

  • agy with gemini-4-neon-high: ran the builds, test suites, timing comparisons, and code review, and drafted this report.
**@⁠MatyEjsr** on GitHub · 2026-11-24 17:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7139651271) Verified PR #1529 at head commit `e06ffce08bdca11410bcba022ec4dbd58f5fbd42` on NVIDIA RTX 3090 (wave32 / split wave64). **Environment** - OS: Windows 11 Pro for Workstations (10.0.26200, build 26200) - CPU: AMD Ryzen 7 7800X3D (8C/8T) - GPU: NVIDIA GeForce RTX 3090 (driver 617.42) - RAM: 31.4 GB - Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09), debug build - DXC: dxcompiler 1.9.2602.17 (21d28f72), dxil 1.9.2602.17 (Windows SDK 10.0.26100.0) **Tested** - Clean merge check against `origin/main` (`9e3831e`): `git merge-tree --write-tree 9e3831e e06ffce` exited 0 (no conflicts). - `cargo build --workspace -j 8`: succeeded (10.82s). - `cargo test --workspace -j 8 -- --test-threads=4`: 772 passed, 0 failed, 42 ignored. - `SKIPPED` (4): - `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` (`no wave64`) - `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (`no wave64`) - `test_title_draws_with_a_root_signature_under_the_debug_layer` (`no d3d12SDKLayers.dll`) - `uploads_start_from_each_subresources_state` (`no D3D12 debug layer (0x887A002D)`) - Targeted new tests (`arguments_pick_the_level_by_size_and_leave_out_lifetime_markers`, `dxc_accepts_the_arguments`): 2 passed, 0 failed, 0 ignored. - Deterministic single-threaded GPU recompiler timing check (`cargo test -p xcl --lib gpu::recomp::tests::gpu_ -j 8 -- --test-threads=1`, 85 passed, 0 failed, 1 ignored, 2 SKIPPED): - Parent `main` (`b7aa9f3`): `4.69s`, `4.64s`, `4.66s` (median `4.66s`) - PR #1529 (`e06ffce`): `4.57s`, `4.56s`, `4.51s` (median `4.56s`, -2.1% end-to-end across the synthetic GPU suite including PSO creation and execution) - Note on high thread counts: under `--test-threads=8`, `gpu_sparse_vram_descriptors_buffers_and_xmem` intermittently fails (`submit 1 lane 0 mismatch`, left `0` vs right `1077`) when another test opens UMA concurrently; confirmed pre-existing on `main` (`b7aa9f3`, 2/3 runs) and unrelated to PR #1529 (passes 3/3 solo and passes under `--test-threads=4`). **Code review** - `arguments()` cleanly isolates DXC argument construction, preserves caller `-O*` and `*lifetime-markers` overrides by placing `extra` last, and leaves the DXIL cache key unchanged so existing cached entries remain valid. - `retail_pipeline_cost` properly drops `ManuallyDrop::into_inner(desc.pRootSignature)` and stays `#[ignore]`d behind `XCL_SAMPLE_RPF` and `XCL_RECORDS`. **Not tested** - AMD RDNA / native wave64 and Intel GPUs - Release build and older DXC versions - D3D12 debug-layer tests (SDK layers DLL not installed) - Retail shader pack benchmarks (`retail_pipeline_cost`, `retail_translation_survey`) and retail smoke run (`XCL_SAMPLE_*` unset) **AI use** - agy with gemini-4-neon-high: ran the builds, test suites, timing comparisons, and code review, and drafted this report.
Author
Owner

@⁠nnonno91 on GitHub · 2026-11-24 17:46 UTC · original

Independent AMD run and lifetime-marker comparison on e06ffce08bdca11410bcba022ec4dbd58f5fbd42.

Tested

  • Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug. Integrated AMD Radeon(TM) Graphics (32.0.21042.62) and NVIDIA GeForce RTX 5090 (32.0.16.1742), selected with XCL_ADAPTER.
  • On AMD with DXC 1.8.2502.11, cargo build --workspace --locked passed. cargo test --locked -p xcl --lib gpu::recomp::dxc::cache_tests -- --test-threads=4 --nocapture passed all 12. cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output reported 772 passed, 0 failed, 42 ignored, and zero GPU skips. The bundled title passed.
  • I ran cargo test --locked -p xcl --test lifetime_marker_probe -- --exact lifetime_marker_outputs_match_cpu --nocapture --test-threads=1 using a temporary synthetic compute shader with initialized arrays scoped inside two branches of a loop. In four fresh test processes (DXC 1.8.2502.11 and 1.9.2609.5 on each adapter), XCL compiled to cs_6_6 at -O1 once with the PR default and once with -enable-lifetime-markers. Both versions matched a CPU calculation across all 64 lanes on AMD and 32 on NVIDIA. All unwritten buffer words kept their initial values.
  • dxc.exe -dumpbin showed two llvm.lifetime.start and two llvm.lifetime.end calls when explicitly enabled and zero with the PR default in all four comparisons. The default DXIL was 184 bytes smaller in each pair.

Not tested

Retail shaders, retail title runs, and compile or driver timings. The GPU comparison checks one synthetic shader.

AI use

OpenAI Codex (GPT-6 family, exact variant unavailable) wrote the temporary probe, ran the checks, and drafted this report.

**@⁠nnonno91** on GitHub · 2026-11-24 17:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7139683272) Independent AMD run and lifetime-marker comparison on `e06ffce08bdca11410bcba022ec4dbd58f5fbd42`. **Tested** - Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug. Integrated AMD Radeon(TM) Graphics (32.0.21042.62) and NVIDIA GeForce RTX 5090 (32.0.16.1742), selected with `XCL_ADAPTER`. - On AMD with DXC 1.8.2502.11, `cargo build --workspace --locked` passed. `cargo test --locked -p xcl --lib gpu::recomp::dxc::cache_tests -- --test-threads=4 --nocapture` passed all 12. `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output` reported 772 passed, 0 failed, 42 ignored, and zero GPU skips. The bundled title passed. - I ran `cargo test --locked -p xcl --test lifetime_marker_probe -- --exact lifetime_marker_outputs_match_cpu --nocapture --test-threads=1` using a temporary synthetic compute shader with initialized arrays scoped inside two branches of a loop. In four fresh test processes (DXC 1.8.2502.11 and 1.9.2609.5 on each adapter), XCL compiled to `cs_6_6` at `-O1` once with the PR default and once with `-enable-lifetime-markers`. Both versions matched a CPU calculation across all 64 lanes on AMD and 32 on NVIDIA. All unwritten buffer words kept their initial values. - `dxc.exe -dumpbin` showed two `llvm.lifetime.start` and two `llvm.lifetime.end` calls when explicitly enabled and zero with the PR default in all four comparisons. The default DXIL was 184 bytes smaller in each pair. **Not tested** Retail shaders, retail title runs, and compile or driver timings. The GPU comparison checks one synthetic shader. **AI use** OpenAI Codex (GPT-6 family, exact variant unavailable) wrote the temporary probe, ran the checks, and drafted this report.
Author
Owner

@⁠karthik765 on GitHub · 2026-11-24 18:21 UTC · original

Tested on AMD Radeon RX 7800 XT with driver 32.0.32029.2010, Windows 11 build 26300.9974, Rust 1.100.0 (MSVC), and DXC 1.9.2602.17.

Both revisions built successfully with cargo build --workspace --locked. Results from cargo test --workspace --locked --no-fail-fast -- --test-threads=4:

Revision Passed Failed Ignored Explicit GPU skips
Upstream merge base b7aa9f3bd212088e0d927439284dc5ed325ce3c7 770 0 41 0
PR head e06ffce08bdca11410bcba022ec4dbd58f5fbd42 772 0 42 0

The native wave64 compute and mesh shader cases and XCL’s synthetic end-to-end title test passed on both revisions. The separate gpu_wave64_ps_whole_wave_reductions run also passed on both with XCL_REQUIRE_GPU=wave64,mesh. The PR’s DXC argument-handling and compiler acceptance tests both passed.

Not tested: Retail game files or shader packs, compile-time speedup, driver pipeline build times, or in-game loading. All XCL_SAMPLE_* variables were unset.

AI use: Codex (GPT-6) ran the tests on the hardware above and drafted this report.

**@⁠karthik765** on GitHub · 2026-11-24 18:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7140538581) **Tested on AMD Radeon RX 7800 XT** with driver `32.0.32029.2010`, Windows 11 build `26300.9974`, Rust `1.100.0` (MSVC), and DXC `1.9.2602.17`. Both revisions built successfully with `cargo build --workspace --locked`. Results from `cargo test --workspace --locked --no-fail-fast -- --test-threads=4`: | Revision | Passed | Failed | Ignored | Explicit GPU skips | | --- | ---: | ---: | ---: | ---: | | Upstream merge base `b7aa9f3bd212088e0d927439284dc5ed325ce3c7` | 770 | 0 | 41 | 0 | | PR head `e06ffce08bdca11410bcba022ec4dbd58f5fbd42` | 772 | 0 | 42 | 0 | The native wave64 compute and mesh shader cases and XCL’s synthetic end-to-end title test passed on both revisions. The separate `gpu_wave64_ps_whole_wave_reductions` run also passed on both with `XCL_REQUIRE_GPU=wave64,mesh`. The PR’s DXC argument-handling and compiler acceptance tests both passed. **Not tested:** Retail game files or shader packs, compile-time speedup, driver pipeline build times, or in-game loading. All `XCL_SAMPLE_*` variables were unset. **AI use:** Codex (GPT-6) ran the tests on the hardware above and drafted this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 18:58 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 18:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7141418136) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. Thanks!
Author
Owner

@⁠kais7654 on GitHub · 2026-11-24 19:36 UTC · original

Ran on the PR's head (3386385): RTX 5070 Laptop (Blackwell, driver 616.87),
Windows 11 26H2, rustc 1.100.0.

cargo build --workspace: ok
cargo test -p xcl --lib gpu::recomp: 191 passed, 0 failed, 19 ignored
(includes the new arguments_pick_the_level_by_size_and_leave_out_lifetime_markers)

One sequencing question: this keeps the >8 MB -O0 band while #1526 removes it —
both touch the same threshold block in dxc.rs, so whichever merges second needs
a rebase of arguments(). Is the intent that #1529 lands first on main and
#1526 rebases on it, or the other way?

Not tested: the 5.7 % compile-time claim itself (no retail pack here), and no
GPU-side check that dropping lifetime markers changes no program's result.
AI use: my local Mistral Vibe agent fetched the branch, ran the build/tests
above and drafted this comment; I checked the diff.

**@⁠kais7654** on GitHub · 2026-11-24 19:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7142349410) Ran on the PR's head (3386385): RTX 5070 Laptop (Blackwell, driver 616.87), Windows 11 26H2, rustc 1.100.0. cargo build --workspace: ok cargo test -p xcl --lib gpu::recomp: 191 passed, 0 failed, 19 ignored (includes the new arguments_pick_the_level_by_size_and_leave_out_lifetime_markers) One sequencing question: this keeps the >8 MB -O0 band while #1526 removes it — both touch the same threshold block in dxc.rs, so whichever merges second needs a rebase of `arguments()`. Is the intent that #1529 lands first on main and #1526 rebases on it, or the other way? Not tested: the 5.7 % compile-time claim itself (no retail pack here), and no GPU-side check that dropping lifetime markers changes no program's result. AI use: my local Mistral Vibe agent fetched the branch, ran the build/tests above and drafted this comment; I checked the diff.
Author
Owner

@⁠kleborgn on GitHub · 2026-11-24 19:48 UTC · original

Hardware: AMD Radeon RX 7900 XTX (driver 32.0.32029.2010), Ryzen 9 7950X3D, 32 GB, Windows 11 Pro 10.0.26300, rustc 1.100.0; tests in debug, timings in release. DXC 1.8.2505.32 (Windows SDK 10.0.28000.0).

Tested (AMD)

  • Commit 3386385, on its own base: cargo test --workspace -- --test-threads=4: 772 passed, 0 failed, 42 ignored. No SKIPPED lines.

  • The same diff applied to main c160d86 (applies cleanly): 860 passed, 0 failed, 43 ignored (main alone: 858 / 0 / 42). SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).

  • retail_translation_survey, seed 1269, 1 in 420 (63 programs, 98,123 instructions), DXC in process, release, parent b7aa9f3 and 3386385 run alternately, two rounds each, 0 DXC errors:

    parent this PR
    total 50 s / 50 s 47 s / 49 s
    median 0.23 / 0.24 s 0.22 / 0.23 s
    p90 2.49 / 2.51 s 2.24 / 2.39 s
    max 10.6 / 10.7 s 10.2 / 10.4 s
  • retail_pipeline_cost, three CS_RaytracingResolve_c5cb017e programs (about 72 KB of console code), fresh XCL_DXIL_CACHE, XCL_TRANSLATED_CACHE=0; translation + DXC, parent -> PR (the test file from this PR was copied onto the parent):

    windows DXC DXIL
    1 10.5 -> 9.8 s 818 -> 807 KB
    2 15.9-16.7 -> 13.6-14.9 s 1053 -> 1043 KB
    3 15.3-18.1 -> 14.9-15.9 s 1159 -> 1150 KB

Not tested

  • Driver compile time on AMD: the numbers I have do not separate the PR from run order (whichever side ran first had the faster driver time in all three configurations), so I am not reporting a driver result.
  • Smoke run / retail title (I have the shader pack only), Intel, Nvidia.
  • DXC 1.9.x (the PR author used 1.9.2602.17).

AI use

  • Claude Code, Claude Sonnet 5.5: ran the tests and measurements and drafted this report; the numbers are from real runs on the hardware above.
**@⁠kleborgn** on GitHub · 2026-11-24 19:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7142620768) Hardware: AMD Radeon RX 7900 XTX (driver 32.0.32029.2010), Ryzen 9 7950X3D, 32 GB, Windows 11 Pro 10.0.26300, rustc 1.100.0; tests in debug, timings in release. DXC 1.8.2505.32 (Windows SDK 10.0.28000.0). **Tested (AMD)** - Commit `3386385`, on its own base: `cargo test --workspace -- --test-threads=4`: 772 passed, 0 failed, 42 ignored. No SKIPPED lines. - The same diff applied to `main` `c160d86` (applies cleanly): 860 passed, 0 failed, 43 ignored (main alone: 858 / 0 / 42). SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `retail_translation_survey`, seed 1269, 1 in 420 (63 programs, 98,123 instructions), DXC in process, release, parent `b7aa9f3` and `3386385` run alternately, two rounds each, 0 DXC errors: | | parent | this PR | |---|---|---| | total | 50 s / 50 s | 47 s / 49 s | | median | 0.23 / 0.24 s | 0.22 / 0.23 s | | p90 | 2.49 / 2.51 s | 2.24 / 2.39 s | | max | 10.6 / 10.7 s | 10.2 / 10.4 s | - `retail_pipeline_cost`, three `CS_RaytracingResolve_c5cb017e` programs (about 72 KB of console code), fresh `XCL_DXIL_CACHE`, `XCL_TRANSLATED_CACHE=0`; translation + DXC, parent -> PR (the test file from this PR was copied onto the parent): | windows | DXC | DXIL | |---|---|---| | 1 | 10.5 -> 9.8 s | 818 -> 807 KB | | 2 | 15.9-16.7 -> 13.6-14.9 s | 1053 -> 1043 KB | | 3 | 15.3-18.1 -> 14.9-15.9 s | 1159 -> 1150 KB | **Not tested** - Driver compile time on AMD: the numbers I have do not separate the PR from run order (whichever side ran first had the faster driver time in all three configurations), so I am not reporting a driver result. - Smoke run / retail title (I have the shader pack only), Intel, Nvidia. - DXC 1.9.x (the PR author used 1.9.2602.17). **AI use** - Claude Code, Claude Sonnet 5.5: ran the tests and measurements and drafted this report; the numbers are from real runs on the hardware above.
Author
Owner

@⁠Retried on GitHub · 2026-11-24 22:28 UTC · original

I am not going to follow this PR up any further. Maintainers can edit the branch, take it over or close it.

On the open question about #1526: the two PRs change the same threshold block in dxc.rs arguments() independently. Whichever lands second needs a small rebase there and keeps both changes: -disable-lifetime-markers from this PR, and the >8 MB band at -O1 from #1526. I have no preference on the order.

**@⁠Retried** on GitHub · 2026-11-24 22:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7146268189) I am not going to follow this PR up any further. Maintainers can edit the branch, take it over or close it. On the open question about #1526: the two PRs change the same threshold block in `dxc.rs` `arguments()` independently. Whichever lands second needs a small rebase there and keeps both changes: `-disable-lifetime-markers` from this PR, and the >8 MB band at `-O1` from #1526. I have no preference on the order.
Author
Owner

@⁠jennydeth on GitHub · 2026-11-25 23:02 UTC · original

RTX 3060 12 GB / 32 GB RAM, exact head 3386385 against its base b7aa9f3, both with an empty XCL_DXIL_CACHE and XCL_TRANSLATED_CACHE=0 as in the description: the suite passes. On the retail title both arms crash the same way, with #846's game_scarlett_master.exe+0x23cf683, so this PR does not cause it, but neither run gets far enough to compare compile times. Current main 06c9f55 ran the same route for 600 s without that crash in an earlier run here (warm caches, and no frame after ~100 s either), so a useful regression run on this title probably needs the branch rebased.

Tested

  • NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.2101 (32-lane waves only); Ryzen 5 5600X; 32 GB RAM; Windows 11 Pro 10.0.26300.9974; Rust 1.100.0 (stable-x86_64-pc-windows-msvc); release build; DXC 1.9.2609.5 (XCL_DXC_DIR)
  • cargo test --workspace --release --no-fail-fast -- --test-threads=4 on 3386385: 772 passed, 0 failed, 42 ignored (20 test targets incl. doc-tests), including arguments_pick_the_level_by_size_and_leave_out_lifetime_markers and dxc_accepts_the_arguments. SKIPPED (2): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64)
  • Retail title, scripts/smoke.ps1 -Game <folder> -Seconds 600 (main's copy of the script; b7aa9f3's has no -OutDir), XCL_NETWORK=0, scripted pad presses from the start screens into the story load (XCL_PRESS_AT), a fresh empty XCL_DXIL_CACHE per arm, XCL_TRANSLATED_CACHE=0. Head run first, then the base.

Regression run

main b7aa9f3:

xcl-smoke v1
commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7
gpu: NVIDIA GeForce RTX 3060
title: 4a4b54dc
seconds: 600
exit: 0xc0000005
frames shown: none logged (the run did not reach its end)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 2
peak commit: 28688 MB

This PR, 3386385:

xcl-smoke v1
commit: 3386385bb1b701238b9030a883380adc5ac3e56e
gpu: NVIDIA GeForce RTX 3060
title: 4a4b54dc
seconds: 600
exit: 0xc0000005
frames shown: none logged (the run did not reach its end)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 2
peak commit: 28288 MB
  • Both logs end with unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0), rcx=0x70024c348: at 132 s on the base and 141 s with this PR, after the last present at 102 s / 112 s.
  • Compile times are not comparable either: the base built 74 translated compute pipelines before the crash and this PR 23 (programs the base also built). The driver's own shader cache was not cleared, and the base's pipeline creations took a median of 2 ms (3.3 s in all) against 127 ms (13.3 s) with this PR, which looks like the driver had the base's DXIL already; I have not confirmed that.

On the cache key (the description's Not tested already says the key has no flags): one detail it does not say. The translated cache is rebuilt by this change, since dxc.rs is one of build.rs's TRANSLATOR_SOURCES, but its misses go back to the DXIL cache, whose key (crate version, DXC dlls, profile, entry, HLSL) is unchanged, so existing users keep the old DXIL even after the translated cache is rebuilt. If the flag should reach them, the arguments (or a version for them) would need to go into the DXIL key.

Not tested

  • Compile time on this card (both runs crash first); the branch rebased onto current main; a warm-cache run; AMD / wave64

AI use: Claude Code (Claude Opus 5.5) built both commits, ran the suite and the two runs on my machine, read the logs and the cache-key code, and wrote this.

**@⁠jennydeth** on GitHub · 2026-11-25 23:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7177084381) **RTX 3060 12 GB / 32 GB RAM, exact head `3386385` against its base `b7aa9f3`, both with an empty `XCL_DXIL_CACHE` and `XCL_TRANSLATED_CACHE=0` as in the description: the suite passes. On the retail title both arms crash the same way, with #846's `game_scarlett_master.exe+0x23cf683`, so this PR does not cause it, but neither run gets far enough to compare compile times.** Current `main` `06c9f55` ran the same route for 600 s without that crash in an earlier run here (warm caches, and no frame after ~100 s either), so a useful regression run on this title probably needs the branch rebased. **Tested** - NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.2101 (32-lane waves only); Ryzen 5 5600X; 32 GB RAM; Windows 11 Pro 10.0.26300.9974; Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`); release build; DXC 1.9.2609.5 (`XCL_DXC_DIR`) - `cargo test --workspace --release --no-fail-fast -- --test-threads=4` on `3386385`: **772 passed, 0 failed, 42 ignored** (20 test targets incl. doc-tests), including `arguments_pick_the_level_by_size_and_leave_out_lifetime_markers` and `dxc_accepts_the_arguments`. SKIPPED (2): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64) - Retail title, `scripts/smoke.ps1 -Game <folder> -Seconds 600` (main's copy of the script; `b7aa9f3`'s has no `-OutDir`), `XCL_NETWORK=0`, scripted pad presses from the start screens into the story load (`XCL_PRESS_AT`), a fresh empty `XCL_DXIL_CACHE` per arm, `XCL_TRANSLATED_CACHE=0`. Head run first, then the base. **Regression run** `main` `b7aa9f3`: ``` xcl-smoke v1 commit: b7aa9f3bd212088e0d927439284dc5ed325ce3c7 gpu: NVIDIA GeForce RTX 3060 title: 4a4b54dc seconds: 600 exit: 0xc0000005 frames shown: none logged (the run did not reach its end) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 2 peak commit: 28688 MB ``` This PR, `3386385`: ``` xcl-smoke v1 commit: 3386385bb1b701238b9030a883380adc5ac3e56e gpu: NVIDIA GeForce RTX 3060 title: 4a4b54dc seconds: 600 exit: 0xc0000005 frames shown: none logged (the run did not reach its end) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 2 peak commit: 28288 MB ``` - Both logs end with `unhandled exception 0xc0000005 in game_scarlett_master.exe+0x23cf683 (write at address 0x0)`, `rcx=0x70024c348`: at 132 s on the base and 141 s with this PR, after the last present at 102 s / 112 s. - Compile times are not comparable either: the base built 74 translated compute pipelines before the crash and this PR 23 (programs the base also built). The driver's own shader cache was not cleared, and the base's pipeline creations took a median of 2 ms (3.3 s in all) against 127 ms (13.3 s) with this PR, which looks like the driver had the base's DXIL already; I have not confirmed that. **On the cache key** (the description's Not tested already says the key has no flags): one detail it does not say. The translated cache is rebuilt by this change, since `dxc.rs` is one of `build.rs`'s `TRANSLATOR_SOURCES`, but its misses go back to the DXIL cache, whose key (crate version, DXC dlls, profile, entry, HLSL) is unchanged, so existing users keep the old DXIL even after the translated cache is rebuilt. If the flag should reach them, the arguments (or a version for them) would need to go into the DXIL key. **Not tested** - Compile time on this card (both runs crash first); the branch rebased onto current `main`; a warm-cache run; AMD / wave64 AI use: Claude Code (Claude Opus 5.5) built both commits, ran the suite and the two runs on my machine, read the logs and the cache-key code, and wrote this.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 05:40 UTC · original

Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-26 05:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7183703471) Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/gpu/recomp/dxc.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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