Shader compile time: DXC compiles without lifetime markers #1519

Closed
Retried wants to merge 2 commits from upstream-pr/1529 into main
Retried commented 2026-11-24 17:18:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Retried on 2026-11-24T17:18:19Z.


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

<!-- greyfinch-sync:ivall/xcl:issue:5476955091 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1529). Originally posted by [Retried](https://github.com/Retried) on 2026-11-24T17:18:19Z. --- 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)
MatyEjsr commented 2026-11-24 18:09:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MatyEjsr on 2026-11-24T17:45:05Z.


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.
<!-- greyfinch-sync:ivall/xcl:comment:7139651271 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7139651271). Originally posted by [MatyEjsr](https://github.com/MatyEjsr) on 2026-11-24T17:45:05Z. --- 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.
nnonno91 commented 2026-11-24 18:09:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-24T17:46:24Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7139683272 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7139683272). Originally posted by [nnonno91](https://github.com/nnonno91) on 2026-11-24T17:46:24Z. --- 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.
karthik765 commented 2026-11-24 19:07:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by karthik765 on 2026-11-24T18:21:50Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7140538581 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7140538581). Originally posted by [karthik765](https://github.com/karthik765) on 2026-11-24T18:21:50Z. --- **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.
DavidM1911 commented 2026-11-24 19:07:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:58:42Z.


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

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

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141418136 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7141418136). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:58:42Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. Thanks!
kais7654 commented 2026-11-24 21:08:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by kais7654 on 2026-11-24T19:36:57Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7142349410 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7142349410). Originally posted by [kais7654](https://github.com/kais7654) on 2026-11-24T19:36:57Z. --- 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.
kleborgn commented 2026-11-24 21:09:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by kleborgn on 2026-11-24T19:48:38Z.


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.
<!-- greyfinch-sync:ivall/xcl:comment:7142620768 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7142620768). Originally posted by [kleborgn](https://github.com/kleborgn) on 2026-11-24T19:48:38Z. --- 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.
Retried commented 2026-11-24 23:08:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Retried on 2026-11-24T22:28:15Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7146268189 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7146268189). Originally posted by [Retried](https://github.com/Retried) on 2026-11-24T22:28:15Z. --- 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.
jennydeth commented 2026-11-25 23:09:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jennydeth on 2026-11-25T23:02:50Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7177084381 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7177084381). Originally posted by [jennydeth](https://github.com/jennydeth) on 2026-11-25T23:02:50Z. --- **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.
DavidM1911 commented 2026-11-26 06:06:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:40:37Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7183703471 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1529#issuecomment-7183703471). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T05:40:37Z. --- 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.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1519
No description provided.