Recompiler: oversized structured code falls back to pc blocks (#1307) #1321

Manually merged
github merged 1 commit from gh-pr/1321/head into gh-pr/1321/base 2026-11-26 04:50:41 +00:00
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-24 14:45 UTC · original
tiagonogueiraa-bit:structured-size-bound → main · +42 −0 · 2 files · 1 commits · merged 2026-11-24 21:00 UTC

Since b8b1f49, one compute program of the retail pack comes out as 148 MB of HLSL (334 KB of code), against 14 MB as pc blocks before. The structured form's guards each list every pending skip flag and reopen whenever the set changes, so they grow with the square of the flags: this program has 3 861 flags, guards of up to 597 terms, and 99 MB in guard lines. DXC on that fits #1307's commit growing about 1 GB/s with b8b1f49 and not without it. Fixes #1307 and #1332 (record 22619 of the pack, the same program), pending a run that confirms the title's memory.

Structured code longer than 128 bytes per byte of program is now translated as pc blocks.

What is in it

  • crates/xcl/src/gpu/recomp/mod.rs: STRUCTURED_BYTES_PER_CODE_BYTE. In translate, structured code past it goes through translate again with structured: false.
  • crates/xcl/src/gpu/recomp/tests.rs: oversized_structured_code_falls_back_to_pc_blocks (CPU only). 200 conditional forward jumps whose targets all follow them, in order, cross the bound; 50 do not.

Tested

  • Head 69a892c is 0936337 rebased onto main c160d86. The conflict with #680's HEAP_WINDOWS normalization at the top of translate is resolved by keeping both, as @⁠emirduran707 also did. 0936337 itself changed only tests.rs against 156b0de (review). The runs below were made on 156b0de / 0936337.
  • Every program of the retail pack's shaders.rpf, translated on the CPU with gpu::recomp built on its own (macOS) from main, from main with b8b1f49 reverted, and from this branch:
HLSL total programs as pc blocks largest
main 5108 MB 169 152.0 MB
b8b1f49 reverted 4707 MB 1670 29.6 MB
this PR 4970 MB 170 29.6 MB

Only one program changes against main: CS_ScreenProbes_ActivateRays in indirect_diffuse_lighting, 148.5 MB → 13.8 MB. The next largest structured program is at 61 bytes per byte.

  • macOS: cargo check -p xcl --lib --tests --target x86_64-pc-windows-msvc passes (C code stubbed, nothing linked). The new test's two cases give the expected result in the standalone build: main keeps 200 structured, so the test fails there.
  • Windows runs by others, on this head 156b0de:
    • @⁠fromthemoonx (RTX 3060, debug): cargo test --workspace --no-fail-fast -- --test-threads=4 752 passed, 0 failed, 41 ignored. The new test fails with the bound disabled. On the GPU, both forms of the test's programs agree with a CPU model in all 64 lanes. (report)
    • @⁠dervoxx (Windows SDK DXC 1.8.2502.11, 6 GiB commit cap), on the retail program itself: on 930e8b4, 154.6 MB of HLSL runs out of memory at the cap and makes no DXIL. On this head, 15.4 MB of HLSL compiles in 68 s, with a 2.8 GB peak commit. (report)
    • @⁠Rednaxeh (AMD RX 7800 XT, RDNA3): XCL_REQUIRE_GPU=wave64,mesh cargo test --workspace -- --test-threads=4 752 passed, 0 failed, 41 ignored, no SKIPPED. A second xcl-smoke pair on the retail title had no removal or crash: 95 % of main's frames, peak commit +0.9 %. Those 60 s may not reach the changed program. (report)
    • @⁠Royalflamejlh, the title on Linux / Wine with #1332's setup (156b0de): no out-of-memory in the first minute in 3 of 3 runs. On b8b1f49 it was killed for memory at 24–71 s in 4 of 4. xcl shaders --precompile --only cs --limit 23000 finished with 843 compiled and a 2.6 GB peak, where 930e8b4 was killed at the 30 GB limit after 34 s. Later growth at world load is the same with b8b1f49 reverted. (report)
    • @⁠WillyboPeep, native Windows, RTX 4090, on this head 0936337, title left at its start screen, no input: with this change the host's commit levels off at about 18 GB (18.6 GB at 50 s). On 930e8b4 and on b8b1f49 it grew about 2 GB/s and the run was killed at 72 GB at 47–50 s. cargo test --release -p xcl --lib recomp: 190 passed, 0 failed, 18 ignored. (report)
    • @⁠rntzaj, native Windows, RTX 3070 Ti, on 0936337: cargo test --workspace --no-fail-fast -- --test-threads=4 with XCL_SAMPLE_RPF / _DLLS / _BVH4 set gives 752 passed, 0 failed, 41 ignored. Peak commit at the start screen was 16.3 GB with this change, against 87.5 GB on 930e8b4. (report)
    • @⁠emirduran707, native Windows, RX 9060 XT (RDNA4), world load on main 9e3831e: alone, the process ends at 68 s at 43 GB. With this change (plus #1288, #751 and #684), commit peaks at 30.7–33.7 GB until the title's watchdog. (report)
    • @⁠JRamos1993, native Windows, i9-14900KF, 64 GB, DXC 1.9.2609.5, on this head 69a892c and on main c160d86, release builds: xcl shaders <pack> --precompile --only cs with XCL_DXC_THREADS=8 and an empty DXIL cache. On main, private bytes jumped to 39.1 GB at 270 s and the run was stopped at its 20 GB cap; the program this PR changes was a 151 MB source, and DXC on it alone passed 24 GB in 8 s. With this change, at most 8.7 GB, still compiling normally after 10 min. (report)
    • @⁠CoDrift, native Windows, RTX 3080 Ti, 32 GB, main c160d86 + 0936337: xcl shaders --precompile --only cs on the retail pack with an empty DXIL cache finishes: 2 689 compiled, 0 errors, peak 7.1 GB private, in 1 317 s. Without this change (9e3831e) it runs away at about record 22 600 every time, with 15 DXC threads, with one, and with DXC 1.8, ending in LLVM ERROR: out of memory at 35 GB. With --pipelines it now passes the point where the unfixed build crashed in the driver; the later driver-side growth there is #1598 / #1657, not this. (report)
    • @⁠einfachama, native Windows, RTX 4060 8 GB, XCL_HEAP_WINDOWS=1, this change as of 0936337 on c160d86 with #1288 / #1315 / #1316: the program compiles in DXC in about 80 s with no jump in commit, to 13 297 372 B of DXIL; the NVIDIA compiler had not finished it after 244–327 s, and the title ran to its 420 s limit in 3 of 3 runs. Without this change (another base) two of three runs had a 4–6 GB jump in seconds during an 80–94 s DXC compile and were ended by their memory guard. oversized_structured_code_falls_back_to_pc_blocks passes. (report)
    • @⁠phantom54, RTX 2070 Super: main 6c89285 merged with 69a892c no longer grows without bound. (#1704)

Regression run
The PR block on this head 69a892c is by @⁠CuteBooty (RTX 3070, 32 GB, scripts/smoke.ps1 -Seconds 60, no input, the title left at its start screen), unedited, from the report. The main block is @⁠IvyNotFound's (RTX 5080, XCL_PRESS_A_AT=15), from their report. They are from two machines, so this pair shows only that the PR's run ended by itself with no device removal or crash; its frames and commit are not a comparison with main. A pair from one machine is still welcome.

main:

xcl-smoke v1
commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56
gpu: NVIDIA GeForce RTX 5080
title: game
seconds: 60
exit: 0x0
frames shown: 1273 (PresentX 1273)
presents per 2 s (last 3): 11 6 14
device removals: 0
crashes: 0
peak commit: 26663 MB

PR, this head (@⁠CuteBooty):

xcl-smoke v1
commit: 69a892c16e555c405737fd8c502c578967ce67f1
gpu: NVIDIA GeForce RTX 3070
title: game
seconds: 60
exit: 0x0
frames shown: 1503 (PresentX 1504)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 19638 MB

PR, earlier head 156b0de (@⁠IvyNotFound, same machine as the main block above):

xcl-smoke v1
commit: 156b0de6de0dc303141e9d1906bdb4efb1ab8290
gpu: NVIDIA GeForce RTX 5080
title: game
seconds: 60
exit: 0x0
frames shown: 1297 (PresentX 1297)
presents per 2 s (last 3): 12 32 25
device removals: 0
crashes: 0
peak commit: 27707 MB

@⁠CuteBooty's process commit levelled off at 17.7–17.9 GB by 36 s in both runs on 69a892c, where main b7aa9f3 with a local change passed 30 GB by 34–36 s; base and input differ between those sides.

In @⁠IvyNotFound's report, two 140 s world-load runs of this head had no device removal and exited normally, like main. Their GPU queue.Wait timeouts were 63 and 133, against 19 for main. On that machine the count varies from 13 to 55 between runs of other builds, so the report does not attribute it to this change, and neither do I.

Not tested

  • The NVIDIA driver on the pc-block form's DXIL: @⁠einfachama's 8 GB card had not finished it after more than 4 minutes.
  • A one-machine xcl-smoke pair on this head.
  • The driver's PSO creation for the retail program.

AI use

  • Claude Code with Claude Opus 5.5. It built the CPU-side survey, found the program and the cause, and wrote the change, the test and this description.

🤖 Generated with Claude Code

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-24 14:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321) `tiagonogueiraa-bit:structured-size-bound` → `main` · +42 −0 · 2 files · 1 commits · merged 2026-11-24 21:00 UTC Since b8b1f49, one compute program of the retail pack comes out as **148 MB of HLSL** (334 KB of code), against 14 MB as `pc` blocks before. The structured form's guards each list every pending skip flag and reopen whenever the set changes, so they grow with the square of the flags: this program has 3 861 flags, guards of up to 597 terms, and 99 MB in guard lines. DXC on that fits #1307's commit growing about 1 GB/s with b8b1f49 and not without it. Fixes #1307 and #1332 (record 22619 of the pack, the same program), pending a run that confirms the title's memory. Structured code longer than 128 bytes per byte of program is now translated as `pc` blocks. **What is in it** - `crates/xcl/src/gpu/recomp/mod.rs`: `STRUCTURED_BYTES_PER_CODE_BYTE`. In `translate`, structured code past it goes through `translate` again with `structured: false`. - `crates/xcl/src/gpu/recomp/tests.rs`: `oversized_structured_code_falls_back_to_pc_blocks` (CPU only). 200 conditional forward jumps whose targets all follow them, in order, cross the bound; 50 do not. **Tested** - Head `69a892c` is `0936337` rebased onto `main` `c160d86`. The conflict with #680's `HEAP_WINDOWS` normalization at the top of `translate` is resolved by keeping both, as @⁠emirduran707 also did. `0936337` itself changed only `tests.rs` against `156b0de` (review). The runs below were made on `156b0de` / `0936337`. - Every program of the retail pack's `shaders.rpf`, translated on the CPU with `gpu::recomp` built on its own (macOS) from `main`, from `main` with b8b1f49 reverted, and from this branch: | | HLSL total | programs as `pc` blocks | largest | |---|---|---|---| | `main` | 5108 MB | 169 | 152.0 MB | | b8b1f49 reverted | 4707 MB | 1670 | 29.6 MB | | this PR | 4970 MB | 170 | 29.6 MB | Only one program changes against `main`: `CS_ScreenProbes_ActivateRays` in `indirect_diffuse_lighting`, 148.5 MB → 13.8 MB. The next largest structured program is at 61 bytes per byte. - macOS: `cargo check -p xcl --lib --tests --target x86_64-pc-windows-msvc` passes (C code stubbed, nothing linked). The new test's two cases give the expected result in the standalone build: `main` keeps 200 structured, so the test fails there. - Windows runs by others, on this head `156b0de`: - @⁠fromthemoonx (RTX 3060, debug): `cargo test --workspace --no-fail-fast -- --test-threads=4` **752 passed, 0 failed, 41 ignored**. The new test fails with the bound disabled. On the GPU, both forms of the test's programs agree with a CPU model in all 64 lanes. ([report](https://github.com/ivall/xcl/pull/1321#issuecomment-7135141798)) - @⁠dervoxx (Windows SDK DXC 1.8.2502.11, 6 GiB commit cap), on the retail program itself: on `930e8b4`, 154.6 MB of HLSL runs out of memory at the cap and makes no DXIL. On this head, 15.4 MB of HLSL compiles in 68 s, with a 2.8 GB peak commit. ([report](https://github.com/ivall/xcl/pull/1321#issuecomment-7135188221)) - @⁠Rednaxeh (AMD RX 7800 XT, RDNA3): `XCL_REQUIRE_GPU=wave64,mesh cargo test --workspace -- --test-threads=4` **752 passed, 0 failed, 41 ignored**, no `SKIPPED`. A second `xcl-smoke` pair on the retail title had no removal or crash: 95 % of `main`'s frames, peak commit +0.9 %. Those 60 s may not reach the changed program. ([report](https://github.com/ivall/xcl/pull/1321#issuecomment-7135596516)) - @⁠Royalflamejlh, the title on Linux / Wine with #1332's setup (`156b0de`): no out-of-memory in the first minute in 3 of 3 runs. On `b8b1f49` it was killed for memory at 24–71 s in 4 of 4. `xcl shaders --precompile --only cs --limit 23000` finished with 843 compiled and a 2.6 GB peak, where `930e8b4` was killed at the 30 GB limit after 34 s. Later growth at world load is the same with b8b1f49 reverted. ([report](https://github.com/ivall/xcl/pull/1321#issuecomment-7136731546)) - @⁠WillyboPeep, native Windows, RTX 4090, on this head `0936337`, title left at its start screen, no input: with this change the host's commit levels off at about 18 GB (18.6 GB at 50 s). On `930e8b4` and on `b8b1f49` it grew about 2 GB/s and the run was killed at 72 GB at 47–50 s. `cargo test --release -p xcl --lib recomp`: 190 passed, 0 failed, 18 ignored. ([report](https://github.com/ivall/xcl/pull/1321#issuecomment-7136814574)) - @⁠rntzaj, native Windows, RTX 3070 Ti, on `0936337`: `cargo test --workspace --no-fail-fast -- --test-threads=4` with `XCL_SAMPLE_RPF` / `_DLLS` / `_BVH4` set gives **752 passed, 0 failed, 41 ignored**. Peak commit at the start screen was 16.3 GB with this change, against 87.5 GB on `930e8b4`. ([report](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1321)) - @⁠emirduran707, native Windows, RX 9060 XT (RDNA4), world load on `main` `9e3831e`: alone, the process ends at 68 s at 43 GB. With this change (plus #1288, #751 and #684), commit peaks at 30.7–33.7 GB until the title's watchdog. ([report](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1321)) - @⁠JRamos1993, native Windows, i9-14900KF, 64 GB, DXC 1.9.2609.5, on this head `69a892c` and on `main` `c160d86`, release builds: `xcl shaders <pack> --precompile --only cs` with `XCL_DXC_THREADS=8` and an empty DXIL cache. On `main`, private bytes jumped to 39.1 GB at 270 s and the run was stopped at its 20 GB cap; the program this PR changes was a 151 MB source, and DXC on it alone passed 24 GB in 8 s. With this change, at most 8.7 GB, still compiling normally after 10 min. ([report](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1321)) - @⁠CoDrift, native Windows, RTX 3080 Ti, 32 GB, `main` `c160d86` + `0936337`: `xcl shaders --precompile --only cs` on the retail pack with an empty DXIL cache finishes: **2 689 compiled, 0 errors, peak 7.1 GB private**, in 1 317 s. Without this change (`9e3831e`) it runs away at about record 22 600 every time, with 15 DXC threads, with one, and with DXC 1.8, ending in `LLVM ERROR: out of memory` at 35 GB. With `--pipelines` it now passes the point where the unfixed build crashed in the driver; the later driver-side growth there is #1598 / #1657, not this. ([report](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1321)) - @⁠einfachama, native Windows, RTX 4060 8 GB, `XCL_HEAP_WINDOWS=1`, this change as of `0936337` on `c160d86` with #1288 / #1315 / #1316: the program compiles in DXC in about 80 s with no jump in commit, to 13 297 372 B of DXIL; the NVIDIA compiler had not finished it after 244–327 s, and the title ran to its 420 s limit in 3 of 3 runs. Without this change (another base) two of three runs had a 4–6 GB jump in seconds during an 80–94 s DXC compile and were ended by their memory guard. `oversized_structured_code_falls_back_to_pc_blocks` passes. ([report](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1321)) - @⁠phantom54, RTX 2070 Super: `main` `6c89285` merged with `69a892c` no longer grows without bound. ([#1704](https://git.gtahub.st/github/xcl-dev--xcl/issues/1704)) **Regression run** The PR block on this head `69a892c` is by @⁠CuteBooty (RTX 3070, 32 GB, `scripts/smoke.ps1 -Seconds 60`, no input, the title left at its start screen), unedited, from [the report](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1321). The `main` block is @⁠IvyNotFound's (RTX 5080, `XCL_PRESS_A_AT=15`), from [their report](https://github.com/ivall/xcl/pull/1321#issuecomment-7135434821). **They are from two machines**, so this pair shows only that the PR's run ended by itself with no device removal or crash; its frames and commit are not a comparison with `main`. A pair from one machine is still welcome. main: ``` xcl-smoke v1 commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56 gpu: NVIDIA GeForce RTX 5080 title: game seconds: 60 exit: 0x0 frames shown: 1273 (PresentX 1273) presents per 2 s (last 3): 11 6 14 device removals: 0 crashes: 0 peak commit: 26663 MB ``` PR, this head (@⁠CuteBooty): ``` xcl-smoke v1 commit: 69a892c16e555c405737fd8c502c578967ce67f1 gpu: NVIDIA GeForce RTX 3070 title: game seconds: 60 exit: 0x0 frames shown: 1503 (PresentX 1504) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 19638 MB ``` PR, earlier head `156b0de` (@⁠IvyNotFound, same machine as the `main` block above): ``` xcl-smoke v1 commit: 156b0de6de0dc303141e9d1906bdb4efb1ab8290 gpu: NVIDIA GeForce RTX 5080 title: game seconds: 60 exit: 0x0 frames shown: 1297 (PresentX 1297) presents per 2 s (last 3): 12 32 25 device removals: 0 crashes: 0 peak commit: 27707 MB ``` @⁠CuteBooty's process commit levelled off at 17.7–17.9 GB by 36 s in both runs on `69a892c`, where `main` `b7aa9f3` with a local change passed 30 GB by 34–36 s; base and input differ between those sides. In @⁠IvyNotFound's report, two 140 s world-load runs of this head had no device removal and exited normally, like `main`. Their `GPU queue.Wait` timeouts were 63 and 133, against 19 for `main`. On that machine the count varies from 13 to 55 between runs of other builds, so the report does not attribute it to this change, and neither do I. **Not tested** - The NVIDIA driver on the `pc`-block form's DXIL: @⁠einfachama's 8 GB card had not finished it after more than 4 minutes. - A one-machine `xcl-smoke` pair on this head. - The driver's PSO creation for the retail program. **AI use** - Claude Code with Claude Opus 5.5. It built the CPU-side survey, found the program and the cause, and wrote the change, the test and this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The structured form wraps the items that follow a forward jump in a guard
that lists every pending skip flag, and reopens it whenever the set
changes. With many flags pending at once that grows with the square of
the flags. Since b8b1f49 one compute program of the retail pack reaches
it: 148 MB of HLSL from 334 KB of code (3 861 flags, guards of up to 597
terms, 99 MB in guard lines), against 14 MB as pc blocks. DXC on that
fits the host's commit growing about 1 GB/s until it runs out, seen with
b8b1f49 and not without it.

Structured code longer than 128 bytes per byte of program is now
translated as pc blocks. Over the whole pack (CPU-side translation of
every program, macOS), only that program changes, to 13.8 MB. The next
largest structured program is at 61 bytes per byte. Every other program
comes out as it does on main, so b8b1f49's gain stays (1 670 -> 170
programs as pc blocks).

oversized_structured_code_falls_back_to_pc_blocks: 200 conditional
forward jumps whose targets all follow them, in order, cross the bound;
50 do not.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:50:38 +00:00
github manually merged commit 69a892c16e into gh-pr/1321/base 2026-11-26 04:50:41 +00:00
Author
Owner

@⁠fromthemoonx on GitHub · 2026-11-24 14:54 UTC · original

Windows run, since Tested says the suite was not run on Windows and Not tested lists any GPU.

Tested

  • NVIDIA GeForce RTX 3060 12 GB (32-lane waves, so wave64 runs split), driver 32.0.16.1088; AMD Ryzen 7 5700X; native Windows 11 Pro 26H2 (build 26300.9974), Graphics Tools (D3D12 debug layer) installed; rustc 1.100.0 stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug

  • Exact head 156b0de6de0dc303141e9d1906bdb4efb1ab8290, which is on current main 930e8b4 (so also the merged result): cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4: 752 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.

  • Fails without the fallback: with the STRUCTURED_BYTES_PER_CODE_BYTE check in translate disabled, oversized_structured_code_falls_back_to_pc_blocks fails with 200 crossing jumps: past the bound, pc blocks. 10 runs with it: 10 of 10 passed.

  • Both forms on the GPU (a scratch test, not pushed): I took your test's programs and changed each v_add to add 1, so v1 counts the adds that ran. Each program went through DXC and ran on this GPU through runner::run_code in kernel mode. s0 was set so the first taken branch is the 1st, 17th, 49th, 161st or 193rd, or none.

    • 50 jumps, structured: v1 matches a CPU model in all 64 lanes for all six starts.
    • 200 jumps, now as pc blocks: the same, in all 64 lanes.

    So the fallback form compiles and gives the same results as the structured one at this size. It says nothing about DXC or the driver on the retail 13.8 MB program.

  • e2e + gpu_pso_e2e, 3 runs: 3 of 3 passed

  • D3D12 debug layer: the e2e test title logs the same debug-layer error and warning ids as on main 930e8b4.

Not tested

  • The retail program from #1307 and the title's commit (no title here); release build; AMD.

AI use

  • Claude Code (Claude Opus 5.5) ran the build, the tests, the check without the fallback and the scratch GPU test on the machine above, and wrote this report from the output.
**@⁠fromthemoonx** on GitHub · 2026-11-24 14:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7135141798) Windows run, since **Tested** says the suite was not run on Windows and **Not tested** lists any GPU. **Tested** - NVIDIA GeForce RTX 3060 12 GB (32-lane waves, so wave64 runs split), driver 32.0.16.1088; AMD Ryzen 7 5700X; native Windows 11 Pro 26H2 (build 26300.9974), Graphics Tools (D3D12 debug layer) installed; rustc 1.100.0 `stable-x86_64-pc-windows-msvc`; DXC 1.9.2602.17; debug - **Exact head `156b0de6de0dc303141e9d1906bdb4efb1ab8290`**, which is on current `main` `930e8b4` (so also the merged result): `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4`: **752 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - **Fails without the fallback:** with the `STRUCTURED_BYTES_PER_CODE_BYTE` check in `translate` disabled, `oversized_structured_code_falls_back_to_pc_blocks` fails with `200 crossing jumps: past the bound, pc blocks`. 10 runs with it: **10 of 10 passed**. - **Both forms on the GPU** (a scratch test, not pushed): I took your test's programs and changed each `v_add` to add 1, so `v1` counts the adds that ran. Each program went through DXC and ran on this GPU through `runner::run_code` in kernel mode. `s0` was set so the first taken branch is the 1st, 17th, 49th, 161st or 193rd, or none. - 50 jumps, structured: `v1` matches a CPU model in all 64 lanes for all six starts. - 200 jumps, now as `pc` blocks: the same, in all 64 lanes. So the fallback form compiles and gives the same results as the structured one at this size. It says nothing about DXC or the driver on the retail 13.8 MB program. - `e2e` + `gpu_pso_e2e`, 3 runs: **3 of 3 passed** - D3D12 debug layer: the e2e test title logs the same debug-layer error and warning ids as on `main` `930e8b4`. **Not tested** - The retail program from #1307 and the title's commit (no title here); release build; AMD. **AI use** - Claude Code (Claude Opus 5.5) ran the build, the tests, the check without the fallback and the scratch GPU test on the machine above, and wrote this report from the output.
Author
Owner

@⁠dervoxx on GitHub · 2026-11-24 14:56 UTC · original

Windows A/B on the retail compute shader from #1307. Both release builds used Rust 1.100.0 on Windows 11 build 26300 with a Ryzen 9 9900X3D. I generated HLSL with four memory windows in wave32, then ran Windows SDK DXC 1.8.2502.11 in a fresh process for each input with -T cs_6_6 -E main -HV 2021 -O0 and a hard 6 GiB process commit cap.

Revision HLSL bytes DXC wall / CPU Peak process commit Result
Parent 930e8b49c1c2ec683d22c724a398b39111cd0e56 154,575,599 14.343 / 14.297 s 6,442,442,752 B Out of memory at the cap, no DXIL
Head 156b0de6de0dc303141e9d1906bdb4efb1ab8290 15,359,988 67.734 / 67.484 s 2,802,188,288 B Success, 14,105,384 B of DXIL

Both builds completed HLSL translation. This run covered one shader through DXC. Driver PSO creation and title execution were outside its scope.

Codex (GPT-6 family) ran the experiment and drafted this report.

**@⁠dervoxx** on GitHub · 2026-11-24 14:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7135188221) Windows A/B on the retail compute shader from #1307. Both release builds used Rust 1.100.0 on Windows 11 build 26300 with a Ryzen 9 9900X3D. I generated HLSL with four memory windows in wave32, then ran Windows SDK DXC 1.8.2502.11 in a fresh process for each input with `-T cs_6_6 -E main -HV 2021 -O0` and a hard 6 GiB process commit cap. | Revision | HLSL bytes | DXC wall / CPU | Peak process commit | Result | | --- | ---: | ---: | ---: | --- | | Parent `930e8b49c1c2ec683d22c724a398b39111cd0e56` | 154,575,599 | 14.343 / 14.297 s | 6,442,442,752 B | Out of memory at the cap, no DXIL | | Head `156b0de6de0dc303141e9d1906bdb4efb1ab8290` | 15,359,988 | 67.734 / 67.484 s | 2,802,188,288 B | Success, 14,105,384 B of DXIL | Both builds completed HLSL translation. This run covered one shader through DXC. Driver PSO creation and title execution were outside its scope. Codex (GPT-6 family) ran the experiment and drafted this report.
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-24 14:56 UTC · original

Thank you both, @⁠fromthemoonx and @⁠dervoxx: that covers the suite on the exact head, the test failing without the bound, and DXC on the retail program itself. I added both to Tested, with links, and marked the PR ready for review.

Written with Claude Code (Claude Opus 5.5).

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-24 14:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7135201547) Thank you both, @⁠fromthemoonx and @⁠dervoxx: that covers the suite on the exact head, the test failing without the bound, and DXC on the retail program itself. I added both to **Tested**, with links, and marked the PR ready for review. Written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠IvyNotFound on GitHub · 2026-11-24 15:05 UTC · original

Regression runs on Windows for 156b0de (the description has none). Retail title, RTX 5080 (32-lane waves), plus two world-load runs.

Tested

  • NVIDIA GeForce RTX 5080 16 GB, driver 621.24; Ryzen 7 7800X3D; Windows 11 25H2 (26200.9974); rustc 1.100.0 MSVC; DXC 1.9.2602.17; release. The PR head as is (base 930e8b4), clean tree.
  • scripts/smoke.ps1 -Seconds 60, XCL_PRESS_A_AT=15, unedited, for Regression run if you want them. The main block is from 930e8b4 on the same machine.

main:

xcl-smoke v1
commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56
gpu: NVIDIA GeForce RTX 5080
title: game
seconds: 60
exit: 0x0
frames shown: 1273 (PresentX 1273)
presents per 2 s (last 3): 11 6 14
device removals: 0
crashes: 0
peak commit: 26663 MB

this PR:

xcl-smoke v1
commit: 156b0de6de0dc303141e9d1906bdb4efb1ab8290
gpu: NVIDIA GeForce RTX 5080
title: game
seconds: 60
exit: 0x0
frames shown: 1297 (PresentX 1297)
presents per 2 s (last 3): 12 32 25
device removals: 0
crashes: 0
peak commit: 27707 MB
  • Two 140 s runs into world loading (XCL_PSO_WAIT_MS=50), against one of main 930e8b4 with the same settings:
main PR, run 1 PR, run 2
exit / device removals 0x0 / 0 0x0 / 0 0x0 / 0
frames shown 1434 1375 1395
peak commit 33 004 MB 34 718 MB 36 397 MB
compute PSOs built without a driver blob / driver time 187 / 288.9 s 202 / 0.1 s 211 / 79.6 s
GPU queue.Wait timeouts (#505) 19 63 133

The driver times depend on which blobs earlier runs left, not on this PR: run 1 had nearly everything cached. The timeout counts vary a lot between runs of one build on this title: 13–55 on other builds here. I can't tell from these runs whether this PR's one changed program (ActivateRays) was reached: I have no name-to-hash mapping for it on this side.

Not tested

  • the suite at this head (@⁠fromthemoonx ran it)
  • the driver's PSO creation for the changed program on its own

AI use

  • Claude Code, Claude Opus 5.5: ran the runs, read the logs and wrote this report.
**@⁠IvyNotFound** on GitHub · 2026-11-24 15:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7135434821) **Regression runs on Windows for `156b0de`** (the description has none). Retail title, RTX 5080 (32-lane waves), plus two world-load runs. **Tested** - NVIDIA GeForce RTX 5080 16 GB, driver 621.24; Ryzen 7 7800X3D; Windows 11 25H2 (26200.9974); rustc 1.100.0 MSVC; DXC 1.9.2602.17; release. The PR head as is (base `930e8b4`), clean tree. - `scripts/smoke.ps1 -Seconds 60`, `XCL_PRESS_A_AT=15`, unedited, for **Regression run** if you want them. The `main` block is from `930e8b4` on the same machine. main: ``` xcl-smoke v1 commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56 gpu: NVIDIA GeForce RTX 5080 title: game seconds: 60 exit: 0x0 frames shown: 1273 (PresentX 1273) presents per 2 s (last 3): 11 6 14 device removals: 0 crashes: 0 peak commit: 26663 MB ``` this PR: ``` xcl-smoke v1 commit: 156b0de6de0dc303141e9d1906bdb4efb1ab8290 gpu: NVIDIA GeForce RTX 5080 title: game seconds: 60 exit: 0x0 frames shown: 1297 (PresentX 1297) presents per 2 s (last 3): 12 32 25 device removals: 0 crashes: 0 peak commit: 27707 MB ``` - Two 140 s runs into world loading (`XCL_PSO_WAIT_MS=50`), against one of `main` `930e8b4` with the same settings: | | `main` | PR, run 1 | PR, run 2 | |---|---|---|---| | exit / device removals | 0x0 / 0 | 0x0 / 0 | 0x0 / 0 | | frames shown | 1434 | 1375 | 1395 | | peak commit | 33 004 MB | 34 718 MB | 36 397 MB | | compute PSOs built without a driver blob / driver time | 187 / 288.9 s | 202 / 0.1 s | 211 / 79.6 s | | `GPU queue.Wait` timeouts (#505) | 19 | 63 | 133 | The driver times depend on which blobs earlier runs left, not on this PR: run 1 had nearly everything cached. The timeout counts vary a lot between runs of one build on this title: 13–55 on other builds here. I can't tell from these runs whether this PR's one changed program (`ActivateRays`) was reached: I have no name-to-hash mapping for it on this side. **Not tested** - the suite at this head (@⁠fromthemoonx ran it) - the driver's PSO creation for the changed program on its own **AI use** - Claude Code, Claude Opus 5.5: ran the runs, read the logs and wrote this report.
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-24 15:06 UTC · original

Thank you, @⁠IvyNotFound! I put both xcl-smoke blocks under Regression run exactly as posted, with credit. I also mentioned the world-load runs, with the queue.Wait timeout counts and your note that they vary between runs.

Written with Claude Code (Claude Opus 5.5).

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-24 15:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7135481503) Thank you, @⁠IvyNotFound! I put both `xcl-smoke` blocks under **Regression run** exactly as posted, with credit. I also mentioned the world-load runs, with the `queue.Wait` timeout counts and your note that they vary between runs. Written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠Rednaxeh on GitHub · 2026-11-24 15:11 UTC · original

Regression run on RDNA3, since the PR has none: main 930e8b4 against this PR's head 156b0de checked out on it (fast-forward, so the second block names the head itself), same retail title, same 60 s, same input (A at ~13 s), same warm caches. Written with Claude Code (Claude Fable 5.1); the runs are mine.

Tested

  • AMD Radeon RX 7800 XT 16 GB (driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 26300, Rust 1.100.0 stable-x86_64-pc-windows-msvc, DXC 1.9.2602.17 (Windows SDK), release for the runs, debug for the tests
  • XCL_REQUIRE_GPU=wave64,mesh cargo test --workspace -- --test-threads=4 on 156b0de: 752 passed, 0 failed, 41 ignored, no SKIPPED (oversized_structured_code_falls_back_to_pc_blocks among them)

Regression run

xcl-smoke v1
commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56
gpu: AMD  Radeon RX 7800 XT
title: retail-game6
seconds: 60
exit: 0x0
frames shown: 1310 (PresentX 1310)
presents per 2 s (last 3): 3 2 8
device removals: 0
crashes: 0
peak commit: 24085 MB
xcl-smoke v1
commit: 156b0de6de0dc303141e9d1906bdb4efb1ab8290
gpu: AMD  Radeon RX 7800 XT
title: retail-game6
seconds: 60
exit: 0x0
frames shown: 1244 (PresentX 1244)
presents per 2 s (last 3): 6 2 3
device removals: 0
crashes: 0
peak commit: 24299 MB

Frames 95 % of main, peak commit +0.9 %; both runs end normally at 60 s during the world-loading screens, with the process at 24.1 / 24.3 GB committed and 11.7 / 12.1 GB of local video memory.

Not tested

  • Whether the 60 s reach the program this PR changes (CS_ScreenProbes_ActivateRays): the log does not name the programs DXC compiles, and the two runs' commit at 60 s is the same, so this pair covers the intro and the first stage of the world load, not the compile #1307 / #1332 describe. On this card the load then stalls on the driver's own compute-pipeline builds (#232), so a longer run here would show that before it showed the memory.
  • NVIDIA / Intel; wave32-only GPUs.
**@⁠Rednaxeh** on GitHub · 2026-11-24 15:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7135596516) Regression run on RDNA3, since the PR has none: `main` `930e8b4` against this PR's head `156b0de` checked out on it (fast-forward, so the second block names the head itself), same retail title, same 60 s, same input (A at ~13 s), same warm caches. Written with Claude Code (Claude Fable 5.1); the runs are mine. **Tested** - AMD Radeon RX 7800 XT 16 GB (driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 26300, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, DXC 1.9.2602.17 (Windows SDK), release for the runs, debug for the tests - `XCL_REQUIRE_GPU=wave64,mesh cargo test --workspace -- --test-threads=4` on `156b0de`: 752 passed, 0 failed, 41 ignored, no SKIPPED (`oversized_structured_code_falls_back_to_pc_blocks` among them) **Regression run** ``` xcl-smoke v1 commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56 gpu: AMD Radeon RX 7800 XT title: retail-game6 seconds: 60 exit: 0x0 frames shown: 1310 (PresentX 1310) presents per 2 s (last 3): 3 2 8 device removals: 0 crashes: 0 peak commit: 24085 MB ``` ``` xcl-smoke v1 commit: 156b0de6de0dc303141e9d1906bdb4efb1ab8290 gpu: AMD Radeon RX 7800 XT title: retail-game6 seconds: 60 exit: 0x0 frames shown: 1244 (PresentX 1244) presents per 2 s (last 3): 6 2 3 device removals: 0 crashes: 0 peak commit: 24299 MB ``` Frames 95 % of `main`, peak commit +0.9 %; both runs end normally at 60 s during the world-loading screens, with the process at 24.1 / 24.3 GB committed and 11.7 / 12.1 GB of local video memory. **Not tested** - Whether the 60 s reach the program this PR changes (`CS_ScreenProbes_ActivateRays`): the log does not name the programs DXC compiles, and the two runs' commit at 60 s is the same, so this pair covers the intro and the first stage of the world load, not the compile #1307 / #1332 describe. On this card the load then stalls on the driver's own compute-pipeline builds (#232), so a longer run here would show that before it showed the memory. - NVIDIA / Intel; wave32-only GPUs.
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-24 15:13 UTC · original

Thank you, @⁠Rednaxeh: a second GPU vendor for the suite and the smoke pair. Added to Tested, with your note that 60 s may not reach the changed program.

Written with Claude Code (Claude Opus 5.5).

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-24 15:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7135661032) Thank you, @⁠Rednaxeh: a second GPU vendor for the suite and the smoke pair. Added to **Tested**, with your note that 60 s may not reach the changed program. Written with Claude Code (Claude Opus 5.5).
Author
Owner

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

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

  • cargo test -p xcl --lib -- --test-threads=1: 708 passed, 0 failed, 21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodified main.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 15:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7135967033) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib -- --test-threads=1`: 708 passed, 0 failed, 21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodified `main`.) Thanks!
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-24 15:25 UTC · original

Thanks, @⁠DavidM1911, a third data point for the lib tests on this branch.

Written with Claude Code (Claude Opus 5.5).

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-24 15:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7135992989) Thanks, @⁠DavidM1911, a third data point for the lib tests on this branch. Written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-24 15:35 UTC · original

Thanks for the careful read, @⁠pvfreis. Both points were right.

  1. The test checks the switch, not the size. Its doc comment now says so: for this synthetic program the pc form keeps the same stretch under one guard and is no smaller, and the gain shows on the retail program, whose pc form is split into blocks (148 MB → 14 MB). The test also no longer sits between jumps_to_outer_loop_heads_are_structured and its doc comment. Both changes are in 0936337, which touches only tests.rs.
  2. #1345 removes the quadratic growth at its source (it was opened after this PR). The two fit together: #1345 makes the guards linear, and this bound stays a cap for any other structured blow-up. If #1345 merges first, this test's 200-jump case will no longer cross the bound, as you say. I'll rebase then and give the test a program that still does, or drop the bound if the maintainer prefers #1345 alone.

@⁠IvyNotFound, @⁠Rednaxeh: the force-push moved the head to 0936337 (tests only, runtime code identical), so PR checks wants the PR's xcl-smoke block on that commit. If either of you can rerun the PR side, I'll put it in.

Written with Claude Code (Claude Opus 5.5).

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-24 15:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7136296839) Thanks for the careful read, @⁠pvfreis. Both points were right. 1. **The test checks the switch, not the size.** Its doc comment now says so: for this synthetic program the `pc` form keeps the same stretch under one guard and is no smaller, and the gain shows on the retail program, whose `pc` form is split into blocks (148 MB → 14 MB). The test also no longer sits between `jumps_to_outer_loop_heads_are_structured` and its doc comment. Both changes are in `0936337`, which touches only `tests.rs`. 2. **#1345** removes the quadratic growth at its source (it was opened after this PR). The two fit together: #1345 makes the guards linear, and this bound stays a cap for any other structured blow-up. If #1345 merges first, this test's 200-jump case will no longer cross the bound, as you say. I'll rebase then and give the test a program that still does, or drop the bound if the maintainer prefers #1345 alone. @⁠IvyNotFound, @⁠Rednaxeh: the force-push moved the head to `0936337` (tests only, runtime code identical), so `PR checks` wants the PR's `xcl-smoke` block on that commit. If either of you can rerun the PR side, I'll put it in. Written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-24 15:51 UTC · original

The run this asks for: with 156b0de merged the retail title's process no longer runs out of memory in its first minute on Linux / Wine (3 of 3 runs), where the same setup on b8b1f49 was killed for memory at 24–71 s (4 of 4). I ran 156b0de; the head 0936337 differs from it in tests.rs only.

Tested

Setup: Fedora 44 (kernel 7.2.9), 62 GB RAM, Ryzen 9 9950X3D, RTX 4060 Ti 16 GB (driver 615.71.09), Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b, DXC 1.9.2609.5, release, x86_64-pc-windows-gnu. Title 1.0.2.1 from a saved profile, one A press through XCL_PRESS_AT, pipeline preload on (the default), XCL_PSO_WAIT_MS=50. used-pipelines.txt holds 1260 shader sets, the program of #1332 among them. Each run is in a cgroup with a memory limit, 34 GB unless said.

tree runs first minute then
b8b1f49 + #684 #751 #1045 #850 #851 #906 #688 4 killed for memory at 56, 71 and 61 s (no limit: the kernel's OOM killer, the process at 45.0, 50.4 and 47.6 GB) and at 24 s (30 GB limit). The preload had made 333–337 compute pipelines by 30 s –
930e8b4 + #684 #751 #850 #906 #688 + 156b0de 3 all 3 past it; 341 compute pipelines built ahead by 62 s see below

After the first minute, on the tree with this pull request: 2 runs reached the world's pipelines at 92–94 s and were ended at the 34 GB limit at 110.3 and 113.8 s; a third with XCL_DXC_THREADS=4 stayed under it and ended at the title's watchdog (game+0x23cf683) at 152.6 s, the stall of #505. That later growth is not from this change: the first tree with b8b1f49 reverted reached the same limit at 130.8 s (1 run).

The two trees differ by more than this pull request (main moved from b8b1f49 to 930e8b4, #851 and #1045 no longer merge, #751 and #688 have new heads).

The offline pass on 156b0de alone (xcl shaders shaders.rpf --precompile --only cs, 2 DXC threads, 30 GB limit; --limit 22619 is already on #1332): --limit 23000 finished in 527 s, 843 compiled, 0 errors, and the process's resident memory, sampled every 2 s, peaked at 2.6 GB. On 930e8b4 without it, --limit 22619 was killed at the limit after 34 s.

Read

recomp/mod.rs only. The bound is checked after emit_structured has written the whole structured text, so the oversized form is still built once (148 MB for this program) before translate runs again with structured: false. That is the cost the description gives (about 1.5 s), and the second call cannot come back to the check. I found nothing in the ten lines that does more than the description says.

Not tested: the cargo test suite and the new test; the head 0936337; native Windows; AMD; the title without the other pull requests listed.

AI use: Claude Code (Claude Fable 5.2) merged the trees, ran the title and the offline pass, read the diff and drafted this comment.

**@⁠Royalflamejlh** on GitHub · 2026-11-24 15:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7136731546) The run this asks for: with `156b0de` merged the retail title's process no longer runs out of memory in its first minute on Linux / Wine (3 of 3 runs), where the same setup on `b8b1f49` was killed for memory at 24–71 s (4 of 4). I ran `156b0de`; the head `0936337` differs from it in `tests.rs` only. **Tested** Setup: Fedora 44 (kernel 7.2.9), 62 GB RAM, Ryzen 9 9950X3D, RTX 4060 Ti 16 GB (driver 615.71.09), Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b, DXC 1.9.2609.5, release, `x86_64-pc-windows-gnu`. Title 1.0.2.1 from a saved profile, one A press through `XCL_PRESS_AT`, pipeline preload on (the default), `XCL_PSO_WAIT_MS=50`. `used-pipelines.txt` holds 1260 shader sets, the program of #1332 among them. Each run is in a cgroup with a memory limit, 34 GB unless said. | tree | runs | first minute | then | |---|---|---|---| | `b8b1f49` + #684 #751 #1045 #850 #851 #906 #688 | 4 | killed for memory at 56, 71 and 61 s (no limit: the kernel's OOM killer, the process at 45.0, 50.4 and 47.6 GB) and at 24 s (30 GB limit). The preload had made 333–337 compute pipelines by 30 s | – | | `930e8b4` + #684 #751 #850 #906 #688 + `156b0de` | 3 | all 3 past it; 341 compute pipelines built ahead by 62 s | see below | After the first minute, on the tree with this pull request: 2 runs reached the world's pipelines at 92–94 s and were ended at the 34 GB limit at 110.3 and 113.8 s; a third with `XCL_DXC_THREADS=4` stayed under it and ended at the title's watchdog (`game+0x23cf683`) at 152.6 s, the stall of #505. That later growth is not from this change: the first tree with `b8b1f49` reverted reached the same limit at 130.8 s (1 run). The two trees differ by more than this pull request (`main` moved from `b8b1f49` to `930e8b4`, #851 and #1045 no longer merge, #751 and #688 have new heads). The offline pass on `156b0de` alone (`xcl shaders shaders.rpf --precompile --only cs`, 2 DXC threads, 30 GB limit; `--limit 22619` is already on #1332): `--limit 23000` finished in 527 s, 843 compiled, 0 errors, and the process's resident memory, sampled every 2 s, peaked at 2.6 GB. On `930e8b4` without it, `--limit 22619` was killed at the limit after 34 s. **Read** `recomp/mod.rs` only. The bound is checked after `emit_structured` has written the whole structured text, so the oversized form is still built once (148 MB for this program) before `translate` runs again with `structured: false`. That is the cost the description gives (about 1.5 s), and the second call cannot come back to the check. I found nothing in the ten lines that does more than the description says. **Not tested:** the `cargo test` suite and the new test; the head `0936337`; native Windows; AMD; the title without the other pull requests listed. **AI use:** Claude Code (Claude Fable 5.2) merged the trees, ran the title and the offline pass, read the diff and drafted this comment.
Author
Owner

@⁠pvfreis on GitHub · 2026-11-24 15:51 UTC · original

Thanks. Checked at 0936337 (read only): the test's doc comment now says it checks the switch only, and jumps_to_outer_loop_heads_are_structured has its doc comment back. Understood on #1345.

Reply by Claude Code (Claude Opus 5.5); checked by a person before posting.

**@⁠pvfreis** on GitHub · 2026-11-24 15:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7136737819) Thanks. Checked at `0936337` (read only): the test's doc comment now says it checks the switch only, and `jumps_to_outer_loop_heads_are_structured` has its doc comment back. Understood on #1345. Reply by Claude Code (Claude Opus 5.5); checked by a person before posting.
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-24 15:53 UTC · original

Thank you, @⁠Royalflamejlh: the title's first minute and the offline pass are exactly the check #1307 / #1332 needed. It's in Tested, with your note that the later growth also shows with b8b1f49 reverted. And thanks, @⁠pvfreis, for checking the fixes.

Written with Claude Code (Claude Opus 5.5).

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-24 15:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7136791234) Thank you, @⁠Royalflamejlh: the title's first minute and the offline pass are exactly the check #1307 / #1332 needed. It's in **Tested**, with your note that the later growth also shows with b8b1f49 reverted. And thanks, @⁠pvfreis, for checking the fixes. Written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-24 15:55 UTC · original

Thank you, @⁠WillyboPeep: native Windows on the current head, with main and b8b1f49 side by side, is the clearest picture of #1307 so far. It's in Tested, including your note that it shows when the title is left at its start screen.

Written with Claude Code (Claude Opus 5.5).

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-24 15:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7136846769) Thank you, @⁠WillyboPeep: native Windows on the current head, with `main` and `b8b1f49` side by side, is the clearest picture of #1307 so far. It's in **Tested**, including your note that it shows when the title is left at its start screen. Written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠rntzaj on GitHub · 2026-11-24 16:43 UTC · original

The full suite on 0936337, which the last report lists as not tested, and a smoke pair from a smaller machine (8 GB Ampere, 32 GB RAM). The pair agrees with @⁠WillyboPeep's: with this PR the commit levels off, and without it the commit keeps climbing.

Tested

  • NVIDIA GeForce RTX 3070 Ti 8 GB (32-lane waves, so wave64 runs split), driver 32.0.16.2101; Intel Core i9-13900KF; 32 GB RAM; Windows 11 Home 25H2 (build 26200.9974); rustc 1.100.0 stable-x86_64-pc-windows-msvc; DXC 1.8.2502.11 (Windows SDK 10.0.26100); debug for the tests, release for the runs
  • Exact head 0936337142a114668e29652163a62c6d255ff5d3, on current main 930e8b4 (a fast-forward), clean tree: cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 with XCL_SAMPLE_RPF, XCL_SAMPLE_DLLS and XCL_SAMPLE_BVH4 set: 752 passed, 0 failed, 41 ignored (oversized_structured_code_falls_back_to_pc_blocks among them). SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • Commit from XCL's memory: … MB committed by the process lines in the two runs below:
s main 930e8b4 this PR
20 18.6 GB 10.5 GB
30 37.6 GB 10.9 GB
40 57.4 GB 12.1 GB
50 72.4 GB 12.3 GB
peak 87.5 GB 16.3 GB

On main the commit grows by about 1.7 GB/s from 20 s on and passes this machine's 32 GB of RAM before 30 s. The run still ended normally at 60 s.

Regression run

scripts/smoke.ps1 -Seconds 60, unedited, back to back on the same machine, with warm caches, the preload on (used-pipelines.txt from earlier world-load runs) and no input: the title stays at its start screen.

main:

xcl-smoke v1
commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56
gpu: NVIDIA GeForce RTX 3070 Ti
title: game
seconds: 60
exit: 0x0
frames shown: 1534 (PresentX 1535)
presents per 2 s (last 3): 57 58 48
device removals: 0
crashes: 0
peak commit: 87546 MB

this PR:

xcl-smoke v1
commit: 0936337142a114668e29652163a62c6d255ff5d3
gpu: NVIDIA GeForce RTX 3070 Ti
title: game
seconds: 60
exit: 0x0
frames shown: 1571 (PresentX 1571)
presents per 2 s (last 3): 60 59 21
device removals: 0
crashes: 0
peak commit: 16333 MB

Frames 102 % of main, peak commit 81 % lower.

Not tested

  • The world load with this PR, and whether the pc form of ActivateRays gives the right picture in the title.
  • AMD, and GPUs with 64-lane waves.

AI use

  • Claude Code (Claude Opus 5.5) ran the build, the tests and the smoke runs on the machine above and wrote this report from the output. Codex (gpt-6.2-astra) did a read-only review of the diff.
**@⁠rntzaj** on GitHub · 2026-11-24 16:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7138119121) The full suite on `0936337`, which the last report lists as not tested, and a smoke pair from a smaller machine (8 GB Ampere, 32 GB RAM). The pair agrees with @⁠WillyboPeep's: with this PR the commit levels off, and without it the commit keeps climbing. **Tested** - NVIDIA GeForce RTX 3070 Ti 8 GB (32-lane waves, so wave64 runs split), driver 32.0.16.2101; Intel Core i9-13900KF; 32 GB RAM; Windows 11 Home 25H2 (build 26200.9974); rustc 1.100.0 `stable-x86_64-pc-windows-msvc`; DXC 1.8.2502.11 (Windows SDK 10.0.26100); debug for the tests, release for the runs - **Exact head `0936337142a114668e29652163a62c6d255ff5d3`**, on current `main` `930e8b4` (a fast-forward), clean tree: `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` with `XCL_SAMPLE_RPF`, `XCL_SAMPLE_DLLS` and `XCL_SAMPLE_BVH4` set: **752 passed, 0 failed, 41 ignored** (`oversized_structured_code_falls_back_to_pc_blocks` among them). SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - Commit from XCL's `memory: … MB committed by the process` lines in the two runs below: | s | `main` `930e8b4` | this PR | |---|---|---| | 20 | 18.6 GB | 10.5 GB | | 30 | 37.6 GB | 10.9 GB | | 40 | 57.4 GB | 12.1 GB | | 50 | 72.4 GB | 12.3 GB | | peak | 87.5 GB | 16.3 GB | On `main` the commit grows by about 1.7 GB/s from 20 s on and passes this machine's 32 GB of RAM before 30 s. The run still ended normally at 60 s. **Regression run** `scripts/smoke.ps1 -Seconds 60`, unedited, back to back on the same machine, with warm caches, the preload on (`used-pipelines.txt` from earlier world-load runs) and no input: the title stays at its start screen. main: ``` xcl-smoke v1 commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56 gpu: NVIDIA GeForce RTX 3070 Ti title: game seconds: 60 exit: 0x0 frames shown: 1534 (PresentX 1535) presents per 2 s (last 3): 57 58 48 device removals: 0 crashes: 0 peak commit: 87546 MB ``` this PR: ``` xcl-smoke v1 commit: 0936337142a114668e29652163a62c6d255ff5d3 gpu: NVIDIA GeForce RTX 3070 Ti title: game seconds: 60 exit: 0x0 frames shown: 1571 (PresentX 1571) presents per 2 s (last 3): 60 59 21 device removals: 0 crashes: 0 peak commit: 16333 MB ``` Frames 102 % of `main`, peak commit 81 % lower. **Not tested** - The world load with this PR, and whether the `pc` form of `ActivateRays` gives the right picture in the title. - AMD, and GPUs with 64-lane waves. **AI use** - Claude Code (Claude Opus 5.5) ran the build, the tests and the smoke runs on the machine above and wrote this report from the output. Codex (gpt-6.2-astra) did a read-only review of the diff.
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-24 18:14 UTC · original

Test report: 0936337 on AMD RDNA4 (Windows), world load on today's main: with this PR the commit stays at about 30 GB; without it the process dies at 68 s at 43 GB

  • RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.31044.16 · Ryzen 5 5600 · 32 GB RAM · Windows 11 Pro 26300 · rustc 1.100.0, DXC 1.9.2602.17, release
  • Retail title, scripts/smoke.ps1 (so XCL_NETWORK=0), XCL_ACTIVITY=1, A at 14, 17, 21 s and every 6 s from 125 s (XCL_PRESS_A_AT). Commit is read from XCL's memory: … MB committed by the process lines.
  • main 9e3831e alone: commit rises to 42,950 MB, and the process ends with 0xc0000409 at 68 s.
  • main 9e3831e + this PR + #1288, #751, #684 (local tree, not a clean commit of this PR):
    • #1288 off (XCL_SLEEP_HOLD=0): commit 17.5 GB at 22 s, 29.2 GB at 82 s, peak 33.7 GB, until the title's watchdog at 130.8 s.
    • #1288 on: one run peaked at 30.7 GB before it ended at 100 s (a crash at the moment of an XCL_THREAD_DUMP_AT dump, reported in #1288). In the other run (600 s) commit was 31–38 GB for 600 s, with one sample of 44.8 GB at ~460 s, while the driver was building ~1 MB compute programs (that run is in #1288).
    • No device removal.
  • The PR conflicts with #680 in recomp::translate. It resolves by keeping both blocks: the HEAP_WINDOWS normalization from #680 first, then this PR's code on code. The tree then builds, and the runs above used it.

Not tested: this PR alone on main (it does not apply cleanly), the full suite on this tree, XCL_HEAP_WINDOWS=1 instead of this PR, more than one run per arm.

Written with Claude Code (Claude Opus 5.5); the runs are mine.

**@⁠emirduran707** on GitHub · 2026-11-24 18:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7140356372) **Test report: `0936337` on AMD RDNA4 (Windows), world load on today's `main`: with this PR the commit stays at about 30 GB; without it the process dies at 68 s at 43 GB** - RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.31044.16 · Ryzen 5 5600 · 32 GB RAM · Windows 11 Pro 26300 · rustc 1.100.0, DXC 1.9.2602.17, release - Retail title, `scripts/smoke.ps1` (so `XCL_NETWORK=0`), `XCL_ACTIVITY=1`, A at 14, 17, 21 s and every 6 s from 125 s (`XCL_PRESS_A_AT`). Commit is read from XCL's `memory: … MB committed by the process` lines. - `main` `9e3831e` alone: commit rises to 42,950 MB, and the process ends with `0xc0000409` at 68 s. - `main` `9e3831e` + this PR + #1288, #751, #684 (local tree, not a clean commit of this PR): - #1288 off (`XCL_SLEEP_HOLD=0`): commit 17.5 GB at 22 s, 29.2 GB at 82 s, peak 33.7 GB, until the title's watchdog at 130.8 s. - #1288 on: one run peaked at 30.7 GB before it ended at 100 s (a crash at the moment of an `XCL_THREAD_DUMP_AT` dump, reported in #1288). In the other run (600 s) commit was 31–38 GB for 600 s, with one sample of 44.8 GB at ~460 s, while the driver was building ~1 MB compute programs (that run is in #1288). - No device removal. - The PR conflicts with #680 in `recomp::translate`. It resolves by keeping both blocks: the `HEAP_WINDOWS` normalization from #680 first, then this PR's code on `code`. The tree then builds, and the runs above used it. **Not tested:** this PR alone on `main` (it does not apply cleanly), the full suite on this tree, `XCL_HEAP_WINDOWS=1` instead of this PR, more than one run per arm. Written with Claude Code (Claude Opus 5.5); the runs are mine.
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-24 19:23 UTC · original

Thank you, @⁠rntzaj and @⁠emirduran707: the full suite on 0936337 and the RDNA4 world load are both in Tested. The PR had started to conflict with #680 in translate, so it's rebased onto main c160d86 (head 69a892c), keeping both blocks the way emirduran707 resolved it. Since the head moved, PR checks wants a smoke pair made on 69a892c. If anyone can rerun the PR side (with a neutral folder name), I'll paste it.

Written with Claude Code (Claude Opus 5.5).

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-24 19:23 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7142017144) Thank you, @⁠rntzaj and @⁠emirduran707: the full suite on `0936337` and the RDNA4 world load are both in **Tested**. The PR had started to conflict with #680 in `translate`, so it's rebased onto `main` `c160d86` (head `69a892c`), keeping both blocks the way emirduran707 resolved it. Since the head moved, `PR checks` wants a smoke pair made on `69a892c`. If anyone can rerun the PR side (with a neutral folder name), I'll paste it. Written with Claude Code (Claude Opus 5.5).
Author
Owner

@⁠JRamos1993 on GitHub · 2026-11-24 19:40 UTC · original

Test report: with #1321 a cold xcl shaders --precompile stays under 9 GB. On main it jumped to 39 GB in 30 s. This is the precompile of #1657.

Setup: i9-14900KF, 64 GB RAM, Windows 11 Pro 26200, DXC 1.9.2609.5, release builds of main c160d86 and of this PR's head 69a892c, which sits directly on it. Retail 1.0.2.1 pack. CPU only, no --pipelines.

Command for both: xcl shaders <pack>\shaders.rpf --precompile --only cs with XCL_DXC_THREADS=8 and an empty DXIL cache. A script sampled private bytes every 10–30 s and stopped the process at 20 GB or after 10 min.

build private bytes ended
main c160d86 1.8–5.7 GB for the first 240 s, then 39.1 GB at 270 s by the 20 GB cap at 270 s
69a892c (this PR) 8.7 GB at most (7.5 GB at the end) after 10 min, still running normally

What the jump on main is: I added local-only logging (not part of any PR) of each DXC compile's source size.

  • The program this issue names became a 151 MB HLSL source (150,952 KB) about 12 s after it was picked up.
  • Compiled on its own, it took DXC past 24 GB within 8 s. Another run of it, which my script failed to stop, reached 94 GB private before I ended it.
  • Two other compute programs' sources were about 30 MB each.

Not tested: a title run with this PR; --pipelines; the full pack to the end (10 min covers the point where main blows up, not the rest).

AI use: Claude Code with Claude Opus 5.5 ran the builds and measurements above and wrote this report.

**@⁠JRamos1993** on GitHub · 2026-11-24 19:40 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7142420838) **Test report: with #1321 a cold `xcl shaders --precompile` stays under 9 GB. On `main` it jumped to 39 GB in 30 s.** This is the precompile of #1657. **Setup:** i9-14900KF, 64 GB RAM, Windows 11 Pro 26200, DXC 1.9.2609.5, release builds of `main` `c160d86` and of this PR's head `69a892c`, which sits directly on it. Retail 1.0.2.1 pack. CPU only, no `--pipelines`. Command for both: `xcl shaders <pack>\shaders.rpf --precompile --only cs` with `XCL_DXC_THREADS=8` and an empty DXIL cache. A script sampled private bytes every 10–30 s and stopped the process at 20 GB or after 10 min. | build | private bytes | ended | |---|---|---| | `main` `c160d86` | 1.8–5.7 GB for the first 240 s, then **39.1 GB at 270 s** | by the 20 GB cap at 270 s | | `69a892c` (this PR) | **8.7 GB at most** (7.5 GB at the end) | after 10 min, still running normally | **What the jump on `main` is:** I added local-only logging (not part of any PR) of each DXC compile's source size. - The program this issue names became a **151 MB** HLSL source (150,952 KB) about 12 s after it was picked up. - Compiled on its own, it took DXC past 24 GB within 8 s. Another run of it, which my script failed to stop, reached 94 GB private before I ended it. - Two other compute programs' sources were about 30 MB each. **Not tested:** a title run with this PR; `--pipelines`; the full pack to the end (10 min covers the point where `main` blows up, not the rest). AI use: Claude Code with Claude Opus 5.5 ran the builds and measurements above and wrote this report.
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-24 19:42 UTC · original

Thank you @⁠JRamos1993, that is the clearest A/B so far: same base, same command, and the 151 MB source pinned as the jump. I added it to the description under Tested. A xcl-smoke pair on 69a892c (with the title folder named game) is still the one thing the check needs.

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-24 19:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7142467619) Thank you @⁠JRamos1993, that is the clearest A/B so far: same base, same command, and the 151 MB source pinned as the jump. I added it to the description under **Tested**. A `xcl-smoke` pair on `69a892c` (with the title folder named `game`) is still the one thing the check needs.
Author
Owner

@⁠CuteBooty on GitHub · 2026-11-24 19:50 UTC · original

The PR side on 69a892c, as asked: pass, and the commit levels off here too.

xcl-smoke v1
commit: 69a892c16e555c405737fd8c502c578967ce67f1
gpu: NVIDIA GeForce RTX 3070
title: game
seconds: 60
exit: 0x0
frames shown: 1503 (PresentX 1504)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 19638 MB

Second of two runs back to back, no input, the title left at its start screen; run 1: 1496 frames, 19271 MB. Free system commit never went under 15.8 GB.

Commit of the process from XCL's memory: lines (GB, 1 GB = 1000 MB), with the same 718 shader sets built ahead as in my runs on #1307:

s main b7aa9f3 + one commit of mine in real.rs (two runs, A pressed at 15 s) 69a892c (two runs, no input)
20 16.8 / 16.7 15.9 / 16.1
30 21.8 / 19.6 17.4 / 17.5
34 30.9 / 27.7 17.6 / 17.7
36 – / 32.3 17.7 / 17.9
end stopped by my script at 34 / 36 s (under 4 GB of commit free) 60 s, exit 0x0

Plain b7aa9f3 was stopped the same way twice, at 31.9 and 29.1 GB. The two sides differ in base and input, so this is not a clean A/B of this PR alone.

Tested: RTX 3070 8 GB (32-lane waves), NVIDIA 621.24; Ryzen 5 3600, 32 GB; Windows 11 Pro 26200; rustc 1.100.0 MSVC; release build from a clean checkout; scripts\smoke.ps1 -Game <folder> -Seconds 60.

Not tested: main c160d86 on this machine, the world load, the test suite, whether the 60 s compile the program this PR changes.

AI use: Claude Code (Claude Opus 5.5) made the runs with me present, read the logs and wrote this.

**@⁠CuteBooty** on GitHub · 2026-11-24 19:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7142653303) The PR side on `69a892c`, as asked: **pass**, and the commit levels off here too. ``` xcl-smoke v1 commit: 69a892c16e555c405737fd8c502c578967ce67f1 gpu: NVIDIA GeForce RTX 3070 title: game seconds: 60 exit: 0x0 frames shown: 1503 (PresentX 1504) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 19638 MB ``` Second of two runs back to back, no input, the title left at its start screen; run 1: 1496 frames, 19271 MB. Free system commit never went under 15.8 GB. Commit of the process from XCL's `memory:` lines (GB, 1 GB = 1000 MB), with the same 718 shader sets built ahead as in my runs on #1307: | s | `main` `b7aa9f3` + one commit of mine in `real.rs` (two runs, A pressed at 15 s) | `69a892c` (two runs, no input) | |---|---|---| | 20 | 16.8 / 16.7 | 15.9 / 16.1 | | 30 | 21.8 / 19.6 | 17.4 / 17.5 | | 34 | 30.9 / 27.7 | 17.6 / 17.7 | | 36 | – / 32.3 | 17.7 / 17.9 | | end | stopped by my script at 34 / 36 s (under 4 GB of commit free) | 60 s, exit 0x0 | Plain `b7aa9f3` was stopped the same way twice, at 31.9 and 29.1 GB. The two sides differ in base and input, so this is not a clean A/B of this PR alone. **Tested:** RTX 3070 8 GB (32-lane waves), NVIDIA 621.24; Ryzen 5 3600, 32 GB; Windows 11 Pro 26200; rustc 1.100.0 MSVC; release build from a clean checkout; `scripts\smoke.ps1 -Game <folder> -Seconds 60`. **Not tested:** `main` `c160d86` on this machine, the world load, the test suite, whether the 60 s compile the program this PR changes. **AI use:** Claude Code (Claude Opus 5.5) made the runs with me present, read the logs and wrote this.
Author
Owner

@⁠WillyboPeep on GitHub · 2026-11-24 15:54 UTC · original · edited 2026-11-24 19:54 UTC

Test report: 0936337 on an RTX 4090 (Windows). With it, the host's commit levels off at about 18 GB when the title is left at its start screen; without it, it grows about 2 GB a second until my guard ended the run at 70 GB. Counts only.

Setup: NVIDIA GeForce RTX 4090 (driver 621.01, 32-lane waves), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, Rust 1.98.1 MSVC, release, DXC 1.9.2602.17. Retail 1.0.2.1. Tree: main 930e8b4 + this PR (0936337, a fast-forward), nothing else. XCL_NETWORK=0, XCL_RUN_SECONDS=60, no input, page file grown beforehand, the run killed at 70 GB of process commit. Commit from XCL's own memory: … MB committed by the process lines.

s main 930e8b4 b8b1f49 main + this PR
10 13.2 GB 13.6 GB 13.5 GB
20 30.4 GB 30.9 GB 14.0 GB
30 51.1 GB 53.2 GB 18.4 GB
40 68.3 GB 71.5 GB 18.3 GB
50 killed at 72.4 GB (50 s) killed at 72.3 GB (47 s) 18.6 GB
end killed killed exit after 60 s, as asked
  • Video memory stayed at 6 – 8 GB in the growing runs, so the growth is host memory, as in the report above.
  • On 930e8b4 it needed the title left at its start screen here (not on today's main: see the update at the end). The same main 930e8b4 (plus two script/README-only PRs) with A pressed every 4 s from 15 s had 18.0 GB at 60 s and 30.4 GB at 110 s, and reached the world load. That may be why @⁠CuteBooty's run with input by hand did not show it.
  • cargo test --release -p xcl --lib recomp -- --test-threads=4 on this tree: 190 passed, 0 failed, 18 ignored.

Not tested: the full suite on this head, a world-load run with this PR, AMD.

AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on my PC and wrote this report; I checked it.

Update, today's main: 9e3831e + three approved VFS / script PRs (#1170, #1092, #1229), same machine, A pressed every 4 s from 15 s. The growth shows with input now too: 13.2 GB at 10 s, 24.9 GB at 20 s, 51.0 GB at 30 s, and my guard ended the run at 45 s (60.9 GB, 0.9 GB of commit left). So "it needs the title left at its start screen" above held for 930e8b4 here, not for 9e3831e. The same build with XCL_HEAP_WINDOWS=1 (#680) stayed at or under 30.4 GB until the title's watchdog at 121 s. One run each; I have not looked into which program the growing run was building.

Update 2, the pipeline preload: main 9039900 + #1170 + #1229, XCL_HEAP_WINDOWS=1, the compute programs of used-pipelines.txt warmed into the driver cache beforehand (the three screen-probe programs left out), A every 4 s from 15 s, one run each:

preload on (default) XCL_PSO_PRELOAD=0
commit at 20 / 40 s 17.1 / 54.2 GB 11.7 / 15.9 GB
end my guard at 52 s (63.5 GB) +0x23cf683 at 106.9 s, commit at most 31.1 GB
compute pipelines from a kept blob 575 of 604 461 of 486

With a cold cache (run above, XCL_HEAP_WINDOWS=1, preload on) the growth did not show either. So here it comes from what the preload builds once the rest is in the cache, which fits #1307's program being in used-pipelines.txt; I did not check which program it was. In the preload-off run the render thread waited from about 77 s in execute_indirect → resolve_wait, with one xcl-pso worker in nvgpucomp64.dll at 100 s.

**@⁠WillyboPeep** on GitHub · 2026-11-24 15:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7136814574) · edited 2026-11-24 19:54 UTC **Test report: `0936337` on an RTX 4090 (Windows). With it, the host's commit levels off at about 18 GB when the title is left at its start screen; without it, it grows about 2 GB a second until my guard ended the run at 70 GB.** Counts only. **Setup:** NVIDIA GeForce RTX 4090 (driver 621.01, 32-lane waves), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, Rust 1.98.1 MSVC, release, DXC 1.9.2602.17. Retail 1.0.2.1. Tree: `main` `930e8b4` + this PR (`0936337`, a fast-forward), nothing else. `XCL_NETWORK=0`, `XCL_RUN_SECONDS=60`, **no input**, page file grown beforehand, the run killed at 70 GB of process commit. Commit from XCL's own `memory: … MB committed by the process` lines. | s | `main` `930e8b4` | `b8b1f49` | `main` + this PR | |---|---|---|---| | 10 | 13.2 GB | 13.6 GB | 13.5 GB | | 20 | 30.4 GB | 30.9 GB | 14.0 GB | | 30 | 51.1 GB | 53.2 GB | 18.4 GB | | 40 | 68.3 GB | 71.5 GB | 18.3 GB | | 50 | killed at 72.4 GB (50 s) | killed at 72.3 GB (47 s) | 18.6 GB | | end | killed | killed | exit after 60 s, as asked | - Video memory stayed at 6 – 8 GB in the growing runs, so the growth is host memory, as in the report above. - **On `930e8b4` it needed the title left at its start screen here** (not on today's `main`: see the update at the end). The same `main` `930e8b4` (plus two script/README-only PRs) with A pressed every 4 s from 15 s had 18.0 GB at 60 s and 30.4 GB at 110 s, and reached the world load. That may be why @⁠CuteBooty's run with input by hand did not show it. - `cargo test --release -p xcl --lib recomp -- --test-threads=4` on this tree: 190 passed, 0 failed, 18 ignored. **Not tested:** the full suite on this head, a world-load run with this PR, AMD. **AI use:** Claude Code (Claude Opus 5.5) ran the builds and runs on my PC and wrote this report; I checked it. **Update, today's `main`:** `9e3831e` + three approved VFS / script PRs (#1170, #1092, #1229), same machine, A pressed every 4 s from 15 s. **The growth shows with input now too:** 13.2 GB at 10 s, 24.9 GB at 20 s, 51.0 GB at 30 s, and my guard ended the run at 45 s (60.9 GB, 0.9 GB of commit left). So "it needs the title left at its start screen" above held for `930e8b4` here, not for `9e3831e`. The same build with `XCL_HEAP_WINDOWS=1` (#680) stayed at or under 30.4 GB until the title's watchdog at 121 s. One run each; I have not looked into which program the growing run was building. **Update 2, the pipeline preload:** `main` `9039900` + #1170 + #1229, `XCL_HEAP_WINDOWS=1`, the compute programs of `used-pipelines.txt` warmed into the driver cache beforehand (the three screen-probe programs left out), A every 4 s from 15 s, one run each: | | preload on (default) | `XCL_PSO_PRELOAD=0` | |---|---|---| | commit at 20 / 40 s | 17.1 / 54.2 GB | 11.7 / 15.9 GB | | end | my guard at 52 s (63.5 GB) | `+0x23cf683` at 106.9 s, commit at most 31.1 GB | | compute pipelines from a kept blob | 575 of 604 | 461 of 486 | With a cold cache (run above, `XCL_HEAP_WINDOWS=1`, preload on) the growth did not show either. So here it comes from what the preload builds once the rest is in the cache, which fits #1307's program being in `used-pipelines.txt`; I did not check which program it was. In the preload-off run the render thread waited from about 77 s in `execute_indirect` → `resolve_wait`, with one `xcl-pso` worker in `nvgpucomp64.dll` at 100 s.
Author
Owner

@⁠einfachama on GitHub · 2026-11-24 20:00 UTC · original · edited 2026-11-24 20:03 UTC

Test report for #1321 on my retail title, on an 8 GB NVIDIA card with XCL_HEAP_WINDOWS=1. It covers DXC and the driver on the pc-block form, and the title's commit with and without it.

  • With it: the program's DXC compile takes ~80 s with no jump in commit, and gives 13 297 372 B of DXIL, which the NVIDIA compiler did not finish in 244–327 s.
  • Without it, earlier the same night on another base: an 80–94 s DXC compile ended in a 4–6 GB jump in seconds, and my memory guard ended both runs.

Setup

  • Hardware: NVIDIA GeForce RTX 4060 8 GB (driver 621.24, 32-lane waves only), Ryzen 7 5800X, 32 GB RAM (commit limit 63.9 GB), Windows 11 Pro 26300, Rust 1.100.0, DXC 1.9.2602.17, release builds.
  • With #1321: main c160d86 + #899 + one local log line (what a bind waits for; not part of any PR) + #1288 9cdae10 + #1315 / #1316 30a96a3 + this PR as of 0936337.
    • One mechanical conflict, against #1315's prepare() in translate: #1315's side kept, let program = code; at the top of the new translate, the size check merged unchanged. Net change: this PR's own +10 / +32.
    • The current head 69a892c has the same changed lines on c160d86.
    • 3 runs on warm caches, no restore between them.
  • Without #1321: main 9e3831e + #899 + the same local line + #1288 9cdae10: no #1315 / #1316, no #1321, so a different base and build. 3 runs.
  • Both: XCL_HEAP_WINDOWS=1, XCL_NETWORK=0, XCL_RUN_SECONDS=420, thread dumps at 100, 130, 160, 200, 260, 340 s.
  • Tests on the stack with it (debug): oversized_structured_code_falls_back_to_pc_blocks passed, plus the recompiler's compact (24), memory_windows (7) and heap-window tests. The whole suite was not run.

With #1321

  • 15ec6daefb19a780: #1316's compact form refuses it (… need a 9975-word table (at most 8192) – translated as before), and it is translated in the pc-block form.
    • 13 297 372 B of DXIL, kept in XCL's translated cache under 95cc13288a27a96e.
    • DXC: about 80 s in run 1. A title thread built it in its bind from 96.3 s: in dxc::compile at the 100, 130 and 160 s dumps, with one DXC compile running from 96.5 s to ~176 s.
    • Commit during it: from 28.2 GB it rose gradually to 31.5 GB at 142 s, held 30.5–31.4 GB until ~176 s, then fell to 29.7 GB. No step, no guard kill.
    • Driver: run 1 in the NVIDIA compiler at 200, 260 and 340 s, not finished at 420 s (244 s after DXC). Runs 2 and 3: a preload worker in the driver with it in every dump from 100 to 340 s, not finished in 327 s and 325 s. No driver blob of it was written.
  • Title's commit in the 3 runs: peak 31 541 / 31 735 / 31 660 MB; lowest available physical memory 1.95–2.03 GB; all 3 ran to the 420 s limit (#1288 holds the title's watchdog). No device removal, no crash.

Without #1321

  • In two of three runs, a title thread built a compute pipeline in its own bind that was new to the run's earlier-run list. That thread was in dxc::compile at the 200 s and 260 s dumps, with one xcl-dxc worker in dxcompiler.
    • One DXC compile ran without a break from 175.0 s (93.6 s) and 184.6 s (80.3 s) until the runs ended.
    • The commit was 30–33 GB for most of that time, then jumped: 31.9 → 36.7 GB between 264.5 and 269.9 s, and 32.6 → 36.6 GB between 263.0 and 265.1 s.
    • My guard (36 GB for the process) ended the runs at 269.9 s and 265.1 s.
  • In the third run, a title thread's own build of a new pipeline with a DXC compile began only at 344.5 s, and was 36.6 s in at the 420 s limit; the process commit (my guard's samples) peaked at 32.7 GB at 348 s.
  • The jump is DXC, not the driver. In that third run a preload worker sat in the NVIDIA compiler on another program (56c0cd3b82a00c6e) from 160 s to at least 340 s with the commit flat at 28–33 GB.
  • The program is not named in these logs: no compact line, and DXC never finished, so nothing was written. I take it to be 15ec6daefb19a780 because:
    • it is the only compute build in either set of runs that spent 80 s or more in DXC;
    • both were a title thread's own build of a pipeline not yet on the earlier-run list;
    • with #1321, the ~80 s compile is 15ec6daefb19a780 by its compact line on the same thread, and its DXIL was written when that compile ended.
    • Its start differs (175–185 s without, 96 s with), and I have no trace that proves it is the same program.

Not tested

  • An A/B on one base: the "without" runs are another base and build (no #1315 / #1316).
  • Whether the driver ever finishes the 13 297 372 B DXIL on this card. XCL_HEAP_WINDOWS unset.
  • The program's HLSL size in either form: not logged.
  • AMD, other NVIDIA cards, Linux / Wine; the whole test suite.

AI use

  • Claude Code (Claude Opus 5.5 & Claude Fable 5.2) merged the stack, resolved the conflict, added the local log line, ran the tests and the runs, counted the results from the logs, thread dumps and caches, and wrote this report; I checked it before posting.
**@⁠einfachama** on GitHub · 2026-11-24 20:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7142919660) · edited 2026-11-24 20:03 UTC Test report for #1321 on my retail title, on an 8 GB NVIDIA card with `XCL_HEAP_WINDOWS=1`. It covers DXC and the driver on the `pc`-block form, and the title's commit with and without it. - **With it:** the program's DXC compile takes ~80 s with no jump in commit, and gives 13 297 372 B of DXIL, which the NVIDIA compiler did not finish in 244–327 s. - **Without it,** earlier the same night on another base: an 80–94 s DXC compile ended in a 4–6 GB jump in seconds, and my memory guard ended both runs. **Setup** - **Hardware:** NVIDIA GeForce RTX 4060 8 GB (driver 621.24, 32-lane waves only), Ryzen 7 5800X, 32 GB RAM (commit limit 63.9 GB), Windows 11 Pro 26300, Rust 1.100.0, DXC 1.9.2602.17, release builds. - **With #1321:** `main` `c160d86` + #899 + one local log line (what a bind waits for; not part of any PR) + #1288 `9cdae10` + #1315 / #1316 `30a96a3` + this PR as of `0936337`. - One mechanical conflict, against #1315's `prepare()` in `translate`: #1315's side kept, `let program = code;` at the top of the new `translate`, the size check merged unchanged. Net change: this PR's own +10 / +32. - The current head `69a892c` has the same changed lines on `c160d86`. - 3 runs on warm caches, no restore between them. - **Without #1321:** `main` `9e3831e` + #899 + the same local line + #1288 `9cdae10`: no #1315 / #1316, no #1321, so a different base and build. 3 runs. - **Both:** `XCL_HEAP_WINDOWS=1`, `XCL_NETWORK=0`, `XCL_RUN_SECONDS=420`, thread dumps at 100, 130, 160, 200, 260, 340 s. - **Tests on the stack with it (debug):** `oversized_structured_code_falls_back_to_pc_blocks` passed, plus the recompiler's `compact` (24), `memory_windows` (7) and heap-window tests. The whole suite was not run. **With #1321** - `15ec6daefb19a780`: #1316's compact form refuses it (`… need a 9975-word table (at most 8192) – translated as before`), and it is translated in the `pc`-block form. - **13 297 372 B of DXIL**, kept in XCL's translated cache under `95cc13288a27a96e`. - **DXC: about 80 s** in run 1. A title thread built it in its bind from 96.3 s: in `dxc::compile` at the 100, 130 and 160 s dumps, with one DXC compile running from 96.5 s to ~176 s. - **Commit during it:** from 28.2 GB it rose gradually to 31.5 GB at 142 s, held 30.5–31.4 GB until ~176 s, then fell to 29.7 GB. No step, no guard kill. - **Driver:** run 1 in the NVIDIA compiler at 200, 260 and 340 s, **not finished at 420 s (244 s after DXC)**. Runs 2 and 3: a preload worker in the driver with it in every dump from 100 to 340 s, **not finished in 327 s and 325 s**. No driver blob of it was written. - **Title's commit in the 3 runs:** peak 31 541 / 31 735 / 31 660 MB; lowest available physical memory 1.95–2.03 GB; all 3 ran to the 420 s limit (#1288 holds the title's watchdog). No device removal, no crash. **Without #1321** - In two of three runs, a title thread built a compute pipeline in its own bind that was new to the run's earlier-run list. That thread was in `dxc::compile` at the 200 s and 260 s dumps, with one `xcl-dxc` worker in `dxcompiler`. - One DXC compile ran without a break from 175.0 s (93.6 s) and 184.6 s (80.3 s) until the runs ended. - The commit was 30–33 GB for most of that time, then jumped: 31.9 → 36.7 GB between 264.5 and 269.9 s, and 32.6 → 36.6 GB between 263.0 and 265.1 s. - My guard (36 GB for the process) ended the runs at 269.9 s and 265.1 s. - In the third run, a title thread's own build of a new pipeline with a DXC compile began only at 344.5 s, and was 36.6 s in at the 420 s limit; the process commit (my guard's samples) peaked at 32.7 GB at 348 s. - **The jump is DXC, not the driver.** In that third run a preload worker sat in the NVIDIA compiler on another program (`56c0cd3b82a00c6e`) from 160 s to at least 340 s with the commit flat at 28–33 GB. - **The program is not named in these logs:** no compact line, and DXC never finished, so nothing was written. I take it to be `15ec6daefb19a780` because: - it is the only compute build in either set of runs that spent 80 s or more in DXC; - both were a title thread's own build of a pipeline not yet on the earlier-run list; - with #1321, the ~80 s compile is `15ec6daefb19a780` by its compact line on the same thread, and its DXIL was written when that compile ended. - Its start differs (175–185 s without, 96 s with), and I have no trace that proves it is the same program. **Not tested** - An A/B on one base: the "without" runs are another base and build (no #1315 / #1316). - Whether the driver ever finishes the 13 297 372 B DXIL on this card. `XCL_HEAP_WINDOWS` unset. - The program's HLSL size in either form: not logged. - AMD, other NVIDIA cards, Linux / Wine; the whole test suite. **AI use** - Claude Code (Claude Opus 5.5 & Claude Fable 5.2) merged the stack, resolved the conflict, added the local log line, ran the tests and the runs, counted the results from the logs, thread dumps and caches, and wrote this report; I checked it before posting.
Author
Owner

@⁠CDR-0000 on GitHub · 2026-11-24 20:09 UTC · original

Windows run on RTX 3080 Ti: with this PR xcl shaders --precompile --only cs finishes (peak 7.1 GB); without it, it runs away at ~22 600/26 503 every time, also with one compile thread and with DXC 1.8.

Tested

  • NVIDIA GeForce RTX 3080 Ti 12 GB (32-lane waves, so wave64 runs split), driver 32.0.16.1742; Ryzen 7 7800X3D; 32 GB RAM (commit limit ~44 GB); Windows 11 Pro build 26300; rustc 1.100.0 stable-x86_64-pc-windows-msvc; release.
  • Tree: main c160d86 + 0936337 cherry-picked (one conflict at the top of translate() with the heap-windows normalization; kept both). Retail 1.0.2.1 shaders.rpf (26 503 records), empty DXIL cache.
without (9e3831e) with this PR
--precompile --only cs, DXC 1.9.2602.17, 15 threads commit +~3 GB/s from 22 600, 35 GB, LLVM ERROR: out of memory 2 689 compiled, 0 errors, peak 7.1 GB private, 1 317 s
same, XCL_DXC_THREADS=1 past 13 GB, stopped —
same, DXC 1.8.2505.1 past 20 GB at the same point, stopped —

Not fixed by this PR (expected): with --pipelines on the same cache, it now gets past the 450–525 pipelines where the unfixed build crashed in nvgpucomp64.dll. Around 840 s, private memory went 8 → 20 GB in ~10 s and my 20 GB guard stopped it. That looks like the driver side of #1598 / #1657.

Written with Claude Code (Claude Opus 5.5); the runs are mine.

**@⁠CDR-0000** on GitHub · 2026-11-24 20:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7143117087) **Windows run on RTX 3080 Ti: with this PR `xcl shaders --precompile --only cs` finishes (peak 7.1 GB); without it, it runs away at ~22 600/26 503 every time, also with one compile thread and with DXC 1.8.** **Tested** - NVIDIA GeForce RTX 3080 Ti 12 GB (32-lane waves, so wave64 runs split), driver 32.0.16.1742; Ryzen 7 7800X3D; 32 GB RAM (commit limit ~44 GB); Windows 11 Pro build 26300; rustc 1.100.0 `stable-x86_64-pc-windows-msvc`; release. - Tree: `main` `c160d86` + `0936337` cherry-picked (one conflict at the top of `translate()` with the heap-windows normalization; kept both). Retail 1.0.2.1 `shaders.rpf` (26 503 records), empty DXIL cache. | | without (`9e3831e`) | with this PR | |---|---|---| | `--precompile --only cs`, DXC 1.9.2602.17, 15 threads | commit +~3 GB/s from 22 600, 35 GB, `LLVM ERROR: out of memory` | **2 689 compiled, 0 errors, peak 7.1 GB private, 1 317 s** | | same, `XCL_DXC_THREADS=1` | past 13 GB, stopped | — | | same, DXC 1.8.2505.1 | past 20 GB at the same point, stopped | — | **Not fixed by this PR (expected):** with `--pipelines` on the same cache, it now gets past the 450–525 pipelines where the unfixed build crashed in `nvgpucomp64.dll`. Around 840 s, private memory went 8 → 20 GB in ~10 s and my 20 GB guard stopped it. That looks like the driver side of #1598 / #1657. Written with Claude Code (Claude Opus 5.5); the runs are mine.
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-24 20:14 UTC · original

Thank you all, these settle the open points:

  • @⁠CuteBooty: your 69a892c block is now the PR block under Regression run, unedited. The main block there is @⁠IvyNotFound's from another machine, and the description says so; a main run on your 3070 with the same settings would make it a one-machine pair, if you have the time.
  • @⁠CoDrift: a full --precompile --only cs to the end at 7.1 GB, against the runaway at ~22 600 three ways, is the cleanest evidence for the precompile side. Agreed that the later --pipelines growth is the driver side (#1598 / #1657).
  • @⁠einfachama: thanks for following the program through DXC and the driver. That the NVIDIA compiler doesn't finish the 13 MB DXIL on an 8 GB card is worth knowing; this PR only fixes the DXC side, and I added it under Not tested.
  • @⁠phantom54 (on #1704): added too.

All four are in Tested.

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-24 20:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7143234860) Thank you all, these settle the open points: - @⁠CuteBooty: your `69a892c` block is now the PR block under **Regression run**, unedited. The `main` block there is @⁠IvyNotFound's from another machine, and the description says so; a `main` run on your 3070 with the same settings would make it a one-machine pair, if you have the time. - @⁠CoDrift: a full `--precompile --only cs` to the end at 7.1 GB, against the runaway at ~22 600 three ways, is the cleanest evidence for the precompile side. Agreed that the later `--pipelines` growth is the driver side (#1598 / #1657). - @⁠einfachama: thanks for following the program through DXC and the driver. That the NVIDIA compiler doesn't finish the 13 MB DXIL on an 8 GB card is worth knowing; this PR only fixes the DXC side, and I added it under **Not tested**. - @⁠phantom54 (on #1704): added too. All four are in **Tested**.
Author
Owner

@⁠ivall on GitHub · 2026-11-24 21:01 UTC · original

Merged as e9e94ce. Thank you, @⁠tiagonogueiraa-bit, and everyone who ran it: the same-base A/Bs made this easy to decide. The regression came from b8b1f49, which I had checked on a sample of programs only and not for how the source grows over the whole pack.

Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11:

  • 69a892c merged on main 4178e88: cargo test --workspace --no-fail-fast -- --test-threads=4: 892 passed, 0 failed, 42 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows). oversized_structured_code_falls_back_to_pc_blocks passes.
  • XCL_DIRECT_DXIL=all cargo test -p xcl --lib gpu:: -- --test-threads=4: 375 passed, 0 failed, 19 ignored, none SKIPPED.
  • #689 (scripts only) landed in between; crates/ and tests/ at e9e94ce are identical to the tested tree.
  • Translated source of the program, xcl shaders <pack> --export-hlsl … --record-hash 95cc13288a27a96e, 4 windows, native wave64: 154,575,932 B on main → 15,360,321 B. A second large program (56c0cd3b82a00c6e, 30,983,672 B) is unchanged.

Not tested: a title run on the merged tree, DXC on the new 15 MB source, NVIDIA.

AI use: Claude Code (Claude Opus 5.5) merged, ran the tests and wrote this.

**@⁠ivall** on GitHub · 2026-11-24 21:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7144365719) Merged as `e9e94ce`. Thank you, @⁠tiagonogueiraa-bit, and everyone who ran it: the same-base A/Bs made this easy to decide. The regression came from b8b1f49, which I had checked on a sample of programs only and not for how the source grows over the whole pack. **Tested** on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11: - `69a892c` merged on `main` `4178e88`: `cargo test --workspace --no-fail-fast -- --test-threads=4`: **892 passed, 0 failed, 42 ignored**. SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). `oversized_structured_code_falls_back_to_pc_blocks` passes. - `XCL_DIRECT_DXIL=all cargo test -p xcl --lib gpu:: -- --test-threads=4`: 375 passed, 0 failed, 19 ignored, none SKIPPED. - #689 (scripts only) landed in between; `crates/` and `tests/` at `e9e94ce` are identical to the tested tree. - Translated source of the program, `xcl shaders <pack> --export-hlsl … --record-hash 95cc13288a27a96e`, 4 windows, native wave64: **154,575,932 B on `main` → 15,360,321 B**. A second large program (`56c0cd3b82a00c6e`, 30,983,672 B) is unchanged. **Not tested:** a title run on the merged tree, DXC on the new 15 MB source, NVIDIA. AI use: Claude Code (Claude Opus 5.5) merged, ran the tests and wrote this.
Author
Owner

@⁠isaacwingate on GitHub · 2026-11-24 21:07 UTC · original

Test report for 69a892c (this PR's head) together with #1316 on an RTX 5080, with the retail title of #505.

Setup

  • NVIDIA GeForce RTX 5080, driver 32.0.16.2124, i9-12900K, 32 GB RAM (48 GB commit limit), Windows 11 build 26300, rustc 1.100.0, release; DXC 1.9.2602.17.
  • Local merge for testing: main 4178e88 + #1316 (f207df1, with #1315 under it) + this PR + #889 + #1798.
  • The conflict with current main is at the start of translate in gpu/recomp/mod.rs: #1315 (under #1316) moved decoding, the #680 HEAP_WINDOWS normalization and the emitter set-up into prepare(). I kept prepare() unchanged and added this PR's let program = code; as the first line of translate; the size check after emit_structured merged on its own. The retry with structured: false passes options not yet normalized; prepare() normalizes them again, so the result is the same as before the move.

Tests

  • cargo test -p xcl --lib -- recomp:: --skip gpu_: 116 passed, 0 failed, 17 ignored, oversized_structured_code_falls_back_to_pc_blocks included.
  • cargo test -p xcl --lib gpu::recomp -- --test-threads=4 (GPU tests): 222 passed, 0 failed, 18 ignored (SKIPPED: three tests – no wave64).

Title run (one run, XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_RUN_SECONDS=600, A through XCL_PRESS_AT every 4 s from 20 to 100 s)

  • No out-of-memory, no failed DXC compile and no crash in 600 s; peak commit 36.0 GB. The world load (from 74 s) did not show a frame before the end: it waited on compute pipelines of 1.0 – 1.36 MB of DXIL, 64 – 161 s each in the driver, one at a time.
  • This PR logs nothing when it falls back to pc blocks, so I cannot tell from the log whether it did in this run (or for which program).

Not tested

  • This PR without #1316; a run that counts the fallbacks; more than one run; AMD.

AI use

  • Claude Code (Claude Opus 5.5) resolved the merge, ran the tests and the title, read the log and wrote this report. The numbers come from that run.
**@⁠isaacwingate** on GitHub · 2026-11-24 21:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7144503782) Test report for `69a892c` (this PR's head) together with #1316 on an RTX 5080, with the retail title of #505. **Setup** - NVIDIA GeForce RTX 5080, driver 32.0.16.2124, i9-12900K, 32 GB RAM (48 GB commit limit), Windows 11 build 26300, rustc 1.100.0, release; DXC 1.9.2602.17. - Local merge for testing: `main` `4178e88` + #1316 (`f207df1`, with #1315 under it) + this PR + #889 + #1798. - The conflict with current `main` is at the start of `translate` in `gpu/recomp/mod.rs`: #1315 (under #1316) moved decoding, the #680 `HEAP_WINDOWS` normalization and the emitter set-up into `prepare()`. I kept `prepare()` unchanged and added this PR's `let program = code;` as the first line of `translate`; the size check after `emit_structured` merged on its own. The retry with `structured: false` passes options not yet normalized; `prepare()` normalizes them again, so the result is the same as before the move. **Tests** - `cargo test -p xcl --lib -- recomp:: --skip gpu_`: 116 passed, 0 failed, 17 ignored, `oversized_structured_code_falls_back_to_pc_blocks` included. - `cargo test -p xcl --lib gpu::recomp -- --test-threads=4` (GPU tests): 222 passed, 0 failed, 18 ignored (SKIPPED: three tests – no wave64). **Title run** (one run, `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_RUN_SECONDS=600`, A through `XCL_PRESS_AT` every 4 s from 20 to 100 s) - No out-of-memory, no failed DXC compile and no crash in 600 s; peak commit 36.0 GB. The world load (from 74 s) did not show a frame before the end: it waited on compute pipelines of 1.0 – 1.36 MB of DXIL, 64 – 161 s each in the driver, one at a time. - This PR logs nothing when it falls back to pc blocks, so I cannot tell from the log whether it did in this run (or for which program). **Not tested** - This PR without #1316; a run that counts the fallbacks; more than one run; AMD. **AI use** - Claude Code (Claude Opus 5.5) resolved the merge, ran the tests and the title, read the log and wrote this report. The numbers come from that run.
Author
Owner

@⁠zGLados on GitHub · 2026-11-24 20:49 UTC · original · edited 2026-11-24 21:33 UTC

Test report for the new head 69a892c on Windows AMD RDNA3, with the retail title: the commit growth from #1307 is gone with this PR.

Tested

  • AMD Radeon RX 7700 XT (RDNA3, native wave64), driver 32.0.32015.7029; Ryzen 7 7700X, 32 GB; Windows 11 26300; rustc 1.98.1 MSVC, release; DXC 1.9.2602.17 (Windows SDK). Retail 1.0.2.1.
  • scripts/smoke.ps1 for 300 s on this PR's base main c160d86 and on its head 69a892c, both clean trees, run back to back with the same caches. XCL_PRESS_A_AT every 6 s from 10 to 118 s. My own guard stops the process above 60 GB.
  • Base c160d86: commit grew from ~20 s on (22 GB at 30 s, 42 GB at 45 s, 58 GB at 55 s), and the guard stopped it at 62.4 GB at ~60 s.
  • Head 69a892c: no growth. Peak commit 35.2 GB, no device removal. The run ended at ~128 s with an access violation; the game's crash log reads "Game State: Game Running". That matches the title's stall watchdog I see on main without the growth (#505 / #534, ~116–118 s in earlier runs). I did not keep the XCL log of this run, so the address is not confirmed.

Regression run

main:

xcl-smoke v1
commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0
gpu: AMD Radeon RX 7700 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 300
exit: 0xffffffff
frames shown: none logged (the run did not reach its end)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 63749 MB

PR head:

xcl-smoke v1
commit: 69a892c16e555c405737fd8c502c578967ce67f1
gpu: AMD Radeon RX 7700 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 300
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: 35168 MB

Not tested

  • The workspace suite on this head.
  • Which program the title compiled when the base grew. On 9e3831e the offline precompile grows the same way at 95cc13288a27a96e (my comment on #1307).
  • Runs longer than 300 s, and other GPUs.

Update after the merge: the two points under "Not tested" in the merge note, on merged main e9e94ce. Same machine; clean tree, release.

  • DXC on the new source: xcl shaders shaders.rpf --precompile --only cs --limit 22824, 15 DXC threads, cold cache (the new main changes the HLSL of most programs). It compiled 667 programs with 0 errors in 395 s, and the process peaked at about 10 GB of private bytes. 95cc13288a27a96e finished last, about 4 min after the others, as 13.8 MB of DXIL. On 9e3831e the same command passed 32 GB within 40 s at that record.
  • Title run, 300 s, XCL_PRESS_A_AT as above: no commit growth. It levelled off at ~31 GB from ~110 s and reached 36 GB near the end. No device removal and no crash; the run ended at the 300 s limit.
xcl-smoke v1
commit: e9e94ce665d16bb0e2d2e4cb6b37e149f0d27721
gpu: AMD Radeon RX 7700 XT
title: 9cc6a39e
seconds: 300
exit: 0x0
frames shown: 1721 (PresentX 1721)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 42532 MB

The title presents nothing from ~104 s on (0 presents in every 2 s window to the end), and this time it did not end at its stall watchdog. I did not look into why.

AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on this machine and drafted this report.

**@⁠zGLados** on GitHub · 2026-11-24 20:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7144115511) · edited 2026-11-24 21:33 UTC Test report for the new head `69a892c` on Windows AMD RDNA3, with the retail title: the commit growth from #1307 is gone with this PR. **Tested** - AMD Radeon RX 7700 XT (RDNA3, native wave64), driver 32.0.32015.7029; Ryzen 7 7700X, 32 GB; Windows 11 26300; rustc 1.98.1 MSVC, release; DXC 1.9.2602.17 (Windows SDK). Retail 1.0.2.1. - `scripts/smoke.ps1` for 300 s on this PR's base `main` `c160d86` and on its head `69a892c`, both clean trees, run back to back with the same caches. `XCL_PRESS_A_AT` every 6 s from 10 to 118 s. My own guard stops the process above 60 GB. - **Base `c160d86`:** commit grew from ~20 s on (22 GB at 30 s, 42 GB at 45 s, 58 GB at 55 s), and the guard stopped it at 62.4 GB at ~60 s. - **Head `69a892c`:** no growth. Peak commit 35.2 GB, no device removal. The run ended at ~128 s with an access violation; the game's crash log reads "Game State: Game Running". That matches the title's stall watchdog I see on `main` without the growth (#505 / #534, ~116–118 s in earlier runs). I did not keep the XCL log of this run, so the address is not confirmed. **Regression run** `main`: ``` xcl-smoke v1 commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0 gpu: AMD Radeon RX 7700 XT title: GTA6.Xbox.v1.0.2.1 seconds: 300 exit: 0xffffffff frames shown: none logged (the run did not reach its end) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 63749 MB ``` PR head: ``` xcl-smoke v1 commit: 69a892c16e555c405737fd8c502c578967ce67f1 gpu: AMD Radeon RX 7700 XT title: GTA6.Xbox.v1.0.2.1 seconds: 300 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: 35168 MB ``` **Not tested** - The workspace suite on this head. - Which program the title compiled when the base grew. On `9e3831e` the offline precompile grows the same way at `95cc13288a27a96e` (my comment on #1307). - Runs longer than 300 s, and other GPUs. **Update after the merge: the two points under "Not tested" in the merge note, on merged `main` `e9e94ce`.** Same machine; clean tree, release. - **DXC on the new source:** `xcl shaders shaders.rpf --precompile --only cs --limit 22824`, 15 DXC threads, cold cache (the new `main` changes the HLSL of most programs). It compiled 667 programs with 0 errors in 395 s, and the process peaked at about 10 GB of private bytes. `95cc13288a27a96e` finished last, about 4 min after the others, as 13.8 MB of DXIL. On `9e3831e` the same command passed 32 GB within 40 s at that record. - **Title run, 300 s, `XCL_PRESS_A_AT` as above:** no commit growth. It levelled off at ~31 GB from ~110 s and reached 36 GB near the end. No device removal and no crash; the run ended at the 300 s limit. ``` xcl-smoke v1 commit: e9e94ce665d16bb0e2d2e4cb6b37e149f0d27721 gpu: AMD Radeon RX 7700 XT title: 9cc6a39e seconds: 300 exit: 0x0 frames shown: 1721 (PresentX 1721) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 42532 MB ``` The title presents nothing from ~104 s on (0 presents in every 2 s window to the end), and this time it did not end at its stall watchdog. I did not look into why. AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on this machine and drafted this report.
Author
Owner

@⁠isaacwingate on GitHub · 2026-11-24 21:52 UTC · original

Follow-up to my report above: the same title on the same machine, main without this PR against the merged tree with it. Same settings for both: XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=50, A through XCL_PRESS_AT every 4 s from 20 s, back to back.

tree what happened peak commit
main 4178e88 + #1798 commit rose 33.9 → 36.9 → 39.9 → 43.2 → 46.6 GB in 8 s while the title was still in its menus (22 – 30 fps), then memory allocation of 2073600 bytes failed and the process ended (0xc0000409) at 39 s, before the world load 46.6 GB
4178e88 + #1316 + this PR + #889 + #1798 no such growth: menus, then the world load from 74 s; ended at 129 s by the title's watchdog (+0x2215c35) while it waited on shader builds 36.2 GB

An earlier 600 s run of the second tree (no XCL_PSO_WAIT_MS) also stayed at 36.0 GB to the end.

  • No compute pipeline was translated or built during the growth in the first run (no [SHADER] cs line after 20 s); b8b1f49 is in both trees.
  • That fits #1307 (about 1 GB/s; here about 1.5 GB/s), and this PR is the one of the three in the second tree that addresses it. But the second tree also has #1316 and #889, and each tree ran once, so this does not isolate this PR.

Machine: NVIDIA GeForce RTX 5080, driver 32.0.16.2124, i9-12900K, 32 GB RAM, 48 GB commit limit, Windows 11 build 26300, release builds.

AI use

  • Claude Code (Claude Opus 5.5) ran both trees, read the logs and wrote this; the numbers come from those runs.
**@⁠isaacwingate** on GitHub · 2026-11-24 21:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7145509891) Follow-up to my report above: the same title on the same machine, `main` without this PR against the merged tree with it. Same settings for both: `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_WAIT_MS=50`, A through `XCL_PRESS_AT` every 4 s from 20 s, back to back. | tree | what happened | peak commit | |---|---|---| | `main` `4178e88` + #1798 | commit rose 33.9 → 36.9 → 39.9 → 43.2 → 46.6 GB in 8 s while the title was still in its menus (22 – 30 fps), then `memory allocation of 2073600 bytes failed` and the process ended (0xc0000409) at 39 s, before the world load | 46.6 GB | | `4178e88` + #1316 + this PR + #889 + #1798 | no such growth: menus, then the world load from 74 s; ended at 129 s by the title's watchdog (`+0x2215c35`) while it waited on shader builds | 36.2 GB | An earlier 600 s run of the second tree (no `XCL_PSO_WAIT_MS`) also stayed at 36.0 GB to the end. - No compute pipeline was translated or built during the growth in the first run (no `[SHADER] cs` line after 20 s); `b8b1f49` is in both trees. - That fits #1307 (about 1 GB/s; here about 1.5 GB/s), and this PR is the one of the three in the second tree that addresses it. But the second tree also has #1316 and #889, and each tree ran once, so this does not isolate this PR. Machine: NVIDIA GeForce RTX 5080, driver 32.0.16.2124, i9-12900K, 32 GB RAM, 48 GB commit limit, Windows 11 build 26300, release builds. **AI use** - Claude Code (Claude Opus 5.5) ran both trees, read the logs and wrote this; the numbers come from those runs.
Author
Owner

@⁠skypinglost on GitHub · 2026-11-24 23:04 UTC · original

Post-merge follow-up covering two items from @⁠ivall's merge note (Not tested: DXC on the new 15 MB source, NVIDIA) on container 95cc13288a27a96e (rec=22618, 333,596 B console code, 76,699 instructions, wave32, 4 memory windows). Counts, sizes, timings, and peak private commit only; no game or shader names.

Summary

  • DXC frontend: fixed as intended. #1321's pc-block fallback shrinks HLSL from 154,570,427 B (9039900) to 15,355,149 B (7f7e768, -90.1%), rescuing DXC from hitting our 20 GiB commit guard at 28.3 s to a clean 77.19 s / 2,494.7 MB compile producing 13,016,392 B (12.41 MiB) of DXIL.
  • NVIDIA driver backend: still unfinishable within practical bounds on the HLSL path. Extending @⁠einfachama's 244–327 s observation above, our isolated cold CreateComputePipelineState on that 12.41 MiB DXIL (hlsl-heap) hit our 900 s timeout (900.37 s, peak commit 7,868.4 MB, still climbing ~200–230 MB per 30 s). This aligns with @⁠afpruivo's uninterrupted RTX 3090 run on #1269 (comment), where the #1321 DXIL took 83 min 9 s (~23.1 GB).
  • Same-commit comparison on main: on the exact same commit (7f7e768), XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 (#1748 + #1693) emits 3,324,912 B (3.17 MiB) of DXIL and builds cold in 32.89 s / 1,606.7 MB (>27× faster in the driver and >4.9× lower peak commit than #1321 HLSL).

Measured (95cc13288a27a96e, one isolated process per run)

  • Setup: NVIDIA GeForce RTX 4080 SUPER (16 GB, 32-lane waves / split wave64), driver 617.42, Windows, DXC 1.9.2602.17 (Windows SDK 10.0.26100.0), release builds (9039900 Pre-#1321/#1748 vs 7f7e768 Post-#1321/#1748, XCL_PER_LANE unset).
  • Isolation: XCL_DXC_THREADS=1, XCL_PIPELINE_THREADS=1, XCL_PSO_DISK_CACHE=0, fresh empty XCL_DXIL_CACHE per run, 20 GiB process commit guard.
Commit Mode HLSL / DXIL bytes Phase 1 (translate / DXC) Phase 2 (NVIDIA cold driver) Total Status
9039900 (Pre-#1321) hlsl-heap 154,570,427 B / — 28.28 s / 20,571.6 MB — 28.28 s killed (20 GiB cap)
7f7e768 (Post-#1321) hlsl-heap 15,355,149 B / 13,016,392 B 77.19 s / 2,494.7 MB 900.37 s / 7,868.4 MB 977.56 s timeout(900s)
7f7e768 (#1748 only) direct-root — / 3,914,652 B (PASS) 1.26 s / 265.2 MB 600.26 s / 6,582.3 MB 601.53 s timeout(600s)
7f7e768 (#1748 + #1693) direct-heap — / 3,324,912 B (PASS) 1.06 s / 256.3 MB 32.89 s / 1,606.7 MB 33.95 s OK (made=1, reused=0)

Full 58-run Pre/Post dataset across 118–477 KiB compute programs: #1269 (comment).

Not tested: a title run on the merged tree; GPU dispatch correctness of the compiled pipeline; AMD / Intel / Linux.

AI use: Antigravity (Gemini 4 Neon) ran the isolated benchmark harness, summarized the logs, and drafted this comment.

**@⁠skypinglost** on GitHub · 2026-11-24 23:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7146978349) Post-merge follow-up covering two items from @⁠ivall's merge note (`Not tested: DXC on the new 15 MB source, NVIDIA`) on container `95cc13288a27a96e` (`rec=22618`, 333,596 B console code, 76,699 instructions, wave32, 4 memory windows). Counts, sizes, timings, and peak private commit only; no game or shader names. **Summary** - **DXC frontend: fixed as intended.** `#1321`'s `pc`-block fallback shrinks HLSL from 154,570,427 B (`9039900`) to 15,355,149 B (`7f7e768`, `-90.1%`), rescuing DXC from hitting our 20 GiB commit guard at 28.3 s to a clean **77.19 s / 2,494.7 MB** compile producing **13,016,392 B (12.41 MiB)** of DXIL. - **NVIDIA driver backend: still unfinishable within practical bounds on the HLSL path.** Extending @⁠einfachama's 244–327 s observation above, our isolated cold `CreateComputePipelineState` on that 12.41 MiB DXIL (`hlsl-heap`) hit our **900 s timeout** (`900.37 s`, peak commit **7,868.4 MB**, still climbing ~200–230 MB per 30 s). This aligns with @⁠afpruivo's uninterrupted RTX 3090 run on #1269 ([comment](https://git.gtahub.st/github/xcl-dev--xcl/issues/1269)), where the `#1321` DXIL took **83 min 9 s (~23.1 GB)**. - **Same-commit comparison on `main`:** on the exact same commit (`7f7e768`), **`XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1`** (`#1748` + `#1693`) emits **3,324,912 B (3.17 MiB)** of DXIL and builds cold in **32.89 s / 1,606.7 MB** (`>27×` faster in the driver and `>4.9×` lower peak commit than `#1321` HLSL). **Measured (`95cc13288a27a96e`, one isolated process per run)** - **Setup:** NVIDIA GeForce RTX 4080 SUPER (16 GB, 32-lane waves / split wave64), driver `617.42`, Windows, DXC `1.9.2602.17` (Windows SDK `10.0.26100.0`), release builds (`9039900` Pre-#1321/#1748 vs `7f7e768` Post-#1321/#1748, `XCL_PER_LANE` unset). - **Isolation:** `XCL_DXC_THREADS=1`, `XCL_PIPELINE_THREADS=1`, `XCL_PSO_DISK_CACHE=0`, fresh empty `XCL_DXIL_CACHE` per run, 20 GiB process commit guard. | Commit | Mode | HLSL / DXIL bytes | Phase 1 (translate / DXC) | Phase 2 (NVIDIA cold driver) | Total | Status | |---|---|---:|---:|---:|---:|---| | `9039900` (Pre-`#1321`) | `hlsl-heap` | 154,570,427 B / — | 28.28 s / 20,571.6 MB | — | 28.28 s | killed (20 GiB cap) | | `7f7e768` (Post-`#1321`) | `hlsl-heap` | 15,355,149 B / 13,016,392 B | 77.19 s / 2,494.7 MB | 900.37 s / 7,868.4 MB | 977.56 s | `timeout(900s)` | | `7f7e768` (`#1748` only) | `direct-root` | — / 3,914,652 B (`PASS`) | 1.26 s / 265.2 MB | 600.26 s / 6,582.3 MB | 601.53 s | `timeout(600s)` | | `7f7e768` (`#1748` + `#1693`) | **`direct-heap`** | — / **3,324,912 B (`PASS`)** | **1.06 s / 256.3 MB** | **32.89 s / 1,606.7 MB** | **33.95 s** | **`OK`** (`made=1, reused=0`) | Full 58-run Pre/Post dataset across 118–477 KiB compute programs: [#1269 (comment)](https://git.gtahub.st/github/xcl-dev--xcl/issues/1269). **Not tested:** a title run on the merged tree; GPU dispatch correctness of the compiled pipeline; AMD / Intel / Linux. AI use: Antigravity (Gemini 4 Neon) ran the isolated benchmark harness, summarized the logs, and drafted this comment.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 04:53 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 04:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#issuecomment-7182987744) 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
Author
Owner

@⁠pvfreis on GitHub · 2026-11-24 15:32 UTC · original · reviewed

Review of 156b0de (merge base 930e8b4, current main), by reading the code; nothing was built or run here. No defect found in the fallback itself: it is a fresh translate with only structured changed, and cached translations from main are not reused.

  1. CONFIRMED: the test shows the switch to the pc form, not that the pc form is smaller. With structured: false, emit_range still emits the longest single-entry stretch through emit_structured (mod.rs:1084-1107, 1124-1126). In the 200-jump program that stretch is [0, last target), so the fallback is if (pc == 0u) { <the same guards> } plus one block, and contains("pc ==") (tests.rs:7482) holds because of the wrapper. This is how main already behaves and does not affect the retail program, which the reports here and in #1307 show fixed. Suggested: say in the test's comment that it checks the switch only, or use a program whose jumps are split across stretches. While there: the new test sits between jumps_to_outer_loop_heads_are_structured and its doc comment (tests.rs:7456-7463).

Question: #1345 makes these guards constant-size (if (xcl_skip == 0u)). On a tree with both, does the 200-jump program still cross the bound? If not, this test's second assertion fails without a merge conflict to warn of it.

Verdict: fine to merge as far as I read; the test comment and the #1345 interaction are worth a look.

Review by Claude Code (written by Claude Opus 5.5, two adversarial checks by Claude Fable 5.2, checked by Claude Opus 5.5); each point checked by a person before posting.

**@⁠pvfreis** on GitHub · 2026-11-24 15:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/1321#pullrequestreview-6042291291) · **reviewed** Review of `156b0de` (merge base `930e8b4`, current `main`), by reading the code; nothing was built or run here. No defect found in the fallback itself: it is a fresh `translate` with only `structured` changed, and cached translations from `main` are not reused. 1. **CONFIRMED: the test shows the switch to the `pc` form, not that the `pc` form is smaller.** With `structured: false`, `emit_range` still emits the longest single-entry stretch through `emit_structured` (`mod.rs:1084-1107`, `1124-1126`). In the 200-jump program that stretch is `[0, last target)`, so the fallback is `if (pc == 0u) { <the same guards> }` plus one block, and `contains("pc ==")` (`tests.rs:7482`) holds because of the wrapper. This is how `main` already behaves and does not affect the retail program, which the reports here and in #1307 show fixed. Suggested: say in the test's comment that it checks the switch only, or use a program whose jumps are split across stretches. While there: the new test sits between `jumps_to_outer_loop_heads_are_structured` and its doc comment (`tests.rs:7456-7463`). **Question:** #1345 makes these guards constant-size (`if (xcl_skip == 0u)`). On a tree with both, does the 200-jump program still cross the bound? If not, this test's second assertion fails without a merge conflict to warn of it. **Verdict:** fine to merge as far as I read; the test comment and the #1345 interaction are worth a look. Review by Claude Code (written by Claude Opus 5.5, two adversarial checks by Claude Fable 5.2, checked by Claude Opus 5.5); each point checked by a person before posting.
This discussion has been locked. Commenting is limited to contributors.
No description provided.