Shaders: resolve deep DXIL SSA joins without recursion #1844

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

@⁠gloger2003 on GitHub · 2026-11-24 21:43 UTC · original
gloger2003:fix/dxil-iterative-ssa-joins → main · +116 −63 · 1 files · 1 commits · open

Part of #1805. The direct DXIL SSA reader could exhaust a worker stack when resolving a definition across many sealed control-flow joins. A synthetic chain of 8,192 joins reproduces the overflow on a 256 KiB stack.

What is in it

  • Walk pending joins on an explicit stack. Keep predecessor order, cached reads and lazy phi creation on loop backedges.
  • Add a regression test for the deep chain with identical incoming values.

Tested

  • Windows x64, Ryzen 7 5700X, Radeon RX 7800 XT.

  • cargo build --offline --locked --release -p xcl on the baseline and this head.

  • cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output. 958 reported passed, 0 failed, 42 ignored. Runtime GPU skips: 7 (gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)), heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows).

  • gpu_scalar_loop_and_scc with XCL_DIRECT_DXIL=1 and XCL_REQUIRE_GPU=wave64. One passed.

  • The new test overflowed before the patch and passed with it.

  • Supplemental integration on main 689f2db plus this patch (cc07eac), RX 7800 XT. DXIL suite: 100 passed, one failed, three ignored. The new deep-join test passed. The failure was seed 722 in fuzz_validate_and_gpu_1. A targeted run on clean 689f2db reproduced the same mismatch at output 30. The GPU scalar-loop and divergent-execution tests both passed with XCL_DIRECT_DXIL=1 and XCL_REQUIRE_GPU=wave64.

Regression run

Minecraft Preview, 30 seconds per build with matching settings and the default shader path.

xcl-smoke v1
commit: 177cd407e0114bd087622ae0c358fb3ba7e97484
gpu: AMD Radeon RX 7800 XT
title: c22a3829
seconds: 30
exit: 0x0
frames shown: 1588 (PresentX 1588)
presents per 2 s (last 3): 120 120 120
device removals: 0
crashes: 0
peak commit: 3380 MB
xcl-smoke v1
commit: 71f2ceb5a05951f8d3d1f6aebe92c13eec240317
gpu: AMD Radeon RX 7800 XT
title: c22a3829
seconds: 30
exit: 0x0
frames shown: 1640 (PresentX 1640)
presents per 2 s (last 3): 120 120 120
device removals: 0
crashes: 0
peak commit: 3359 MB

Not tested

The title and Wine setup reported in #1805.

AI use

OpenAI Codex (GPT-6.2 Sol, high reasoning effort, Fast mode) wrote the code and regression test, ran the checks and drafted this description.

**@⁠gloger2003** on GitHub · 2026-11-24 21:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/1844) `gloger2003:fix/dxil-iterative-ssa-joins` → `main` · +116 −63 · 1 files · 1 commits · open Part of #1805. The direct DXIL SSA reader could exhaust a worker stack when resolving a definition across many sealed control-flow joins. A synthetic chain of 8,192 joins reproduces the overflow on a 256 KiB stack. **What is in it** - Walk pending joins on an explicit stack. Keep predecessor order, cached reads and lazy phi creation on loop backedges. - Add a regression test for the deep chain with identical incoming values. **Tested** - Windows x64, Ryzen 7 5700X, Radeon RX 7800 XT. - `cargo build --offline --locked --release -p xcl` on the baseline and this head. - `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output`. 958 reported passed, 0 failed, 42 ignored. Runtime GPU skips: 7 (gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)), heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows). - `gpu_scalar_loop_and_scc` with `XCL_DIRECT_DXIL=1` and `XCL_REQUIRE_GPU=wave64`. One passed. - The new test overflowed before the patch and passed with it. - Supplemental integration on `main 689f2db` plus this patch (`cc07eac`), RX 7800 XT. DXIL suite: 100 passed, one failed, three ignored. The new deep-join test passed. The failure was seed 722 in `fuzz_validate_and_gpu_1`. A targeted run on clean `689f2db` reproduced the same mismatch at output 30. The GPU scalar-loop and divergent-execution tests both passed with `XCL_DIRECT_DXIL=1` and `XCL_REQUIRE_GPU=wave64`. **Regression run** Minecraft Preview, 30 seconds per build with matching settings and the default shader path. ``` xcl-smoke v1 commit: 177cd407e0114bd087622ae0c358fb3ba7e97484 gpu: AMD Radeon RX 7800 XT title: c22a3829 seconds: 30 exit: 0x0 frames shown: 1588 (PresentX 1588) presents per 2 s (last 3): 120 120 120 device removals: 0 crashes: 0 peak commit: 3380 MB ``` ``` xcl-smoke v1 commit: 71f2ceb5a05951f8d3d1f6aebe92c13eec240317 gpu: AMD Radeon RX 7800 XT title: c22a3829 seconds: 30 exit: 0x0 frames shown: 1640 (PresentX 1640) presents per 2 s (last 3): 120 120 120 device removals: 0 crashes: 0 peak commit: 3359 MB ``` **Not tested** The title and Wine setup reported in #1805. **AI use** OpenAI Codex (GPT-6.2 Sol, high reasoning effort, Fast mode) wrote the code and regression test, ran the checks and drafted this description.
Walk pending joins on a heap-backed stack while preserving lazy phi creation and predecessor order. A synthetic test covers 8192 joins on a 256 KiB thread stack.

Assisted-by: OpenAI Codex (GPT-6.2 Sol, high reasoning effort, Fast mode)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:07:02 +00:00
Author
Owner

@⁠frenziedcoder on GitHub · 2026-11-24 22:31 UTC · original

NVIDIA test report for 71f2ceb: full suite green, its own test deep_joins_read_on_a_small_stack passes, and a clean smoke pair on the retail title (1654 vs 1655 frames).

Tested

  • NVIDIA GeForce RTX 5080 16 GB (driver 617.14, 32-lane waves), AMD Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head 71f2ceb5a05951f8d3d1f6aebe92c13eec240317, no local changes.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4 (debug): 958 passed, 0 failed, 42 ignored; the PR's own test deep_joins_read_on_a_small_stack passes. SKIPPED: gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu (no wave64), gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu (no wave64), gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu (no wave64), gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu (no wave64), gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu (no wave64), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu (f16 arithmetic, wave64: no wave64), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu (f16 packed, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 arithmetic, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 compares, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 conversions, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 rounding, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 three-source, wave64: no wave64), gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu (f32 transcendentals, wave64: no wave64), gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu (f64, wave64: no wave64), gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu (integer arithmetic, wave64: no wave64), gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu (integer carries, wave64: no wave64), gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • test_title_draws_with_a_root_signature_under_the_debug_layer reports ok, but this machine has no D3D12 debug layer (debug layer requested but unavailable … (0x887A002D)), so it ran without the layer and is no evidence either way.

Regression run (scripts/smoke.ps1 -Seconds 60, release, the retail title of #505 at its start screen; XCL_PSO_PRELOAD=0 for both builds, because this machine's preload list holds the program of #1307)

base (177cd40, this PR's merge base with main):

xcl-smoke v1
commit: 177cd407e0114bd087622ae0c358fb3ba7e97484
gpu: NVIDIA GeForce RTX 5080
title: 16b5e5d4
seconds: 60
exit: 0x0
frames shown: 1655 (PresentX 1655)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14599 MB

this PR:

xcl-smoke v1
commit: 71f2ceb5a05951f8d3d1f6aebe92c13eec240317
gpu: NVIDIA GeForce RTX 5080
title: 16b5e5d4
seconds: 60
exit: 0x0
frames shown: 1654 (PresentX 1654)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14595 MB

Not tested: this code in the title: it is on the opt-in direct-DXIL path (XCL_DIRECT_DXIL), which the smoke runs leave unset (default HLSL backend), so they show only that nothing else regressed; the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD.

AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.

**@⁠frenziedcoder** on GitHub · 2026-11-24 22:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/1844#issuecomment-7146333743) **NVIDIA test report for `71f2ceb`: full suite green, its own test `deep_joins_read_on_a_small_stack` passes, and a clean smoke pair on the retail title (1654 vs 1655 frames).** **Tested** - NVIDIA GeForce RTX 5080 16 GB (driver 617.14, 32-lane waves), AMD Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 `stable-x86_64-pc-windows-msvc`, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head `71f2ceb5a05951f8d3d1f6aebe92c13eec240317`, no local changes. - `cargo build --workspace && cargo test --workspace -- --test-threads=4` (debug): **958 passed, 0 failed, 42 ignored**; the PR's own test `deep_joins_read_on_a_small_stack` passes. SKIPPED: `gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu` (no wave64), `gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu` (no wave64), `gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu` (no wave64), `gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu` (no wave64), `gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu` (no wave64), `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` (f16 arithmetic, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` (f16 packed, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 arithmetic, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 compares, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 conversions, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 rounding, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 three-source, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu` (f32 transcendentals, wave64: no wave64), `gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu` (f64, wave64: no wave64), `gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu` (integer arithmetic, wave64: no wave64), `gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu` (integer carries, wave64: no wave64), `gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu_wave32_program_in_wave64_hardware` (no wave64), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `test_title_draws_with_a_root_signature_under_the_debug_layer` reports ok, but this machine has no D3D12 debug layer (`debug layer requested but unavailable … (0x887A002D)`), so it ran without the layer and is no evidence either way. **Regression run** (`scripts/smoke.ps1 -Seconds 60`, release, the retail title of #505 at its start screen; `XCL_PSO_PRELOAD=0` for both builds, because this machine's preload list holds the program of #1307) base (`177cd40`, this PR's merge base with `main`): ``` xcl-smoke v1 commit: 177cd407e0114bd087622ae0c358fb3ba7e97484 gpu: NVIDIA GeForce RTX 5080 title: 16b5e5d4 seconds: 60 exit: 0x0 frames shown: 1655 (PresentX 1655) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14599 MB ``` this PR: ``` xcl-smoke v1 commit: 71f2ceb5a05951f8d3d1f6aebe92c13eec240317 gpu: NVIDIA GeForce RTX 5080 title: 16b5e5d4 seconds: 60 exit: 0x0 frames shown: 1654 (PresentX 1654) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14595 MB ``` **Not tested:** this code in the title: it is on the opt-in direct-DXIL path (`XCL_DIRECT_DXIL`), which the smoke runs leave unset (default HLSL backend), so they show only that nothing else regressed; the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD. *AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.*
Author
Owner

@⁠YaBulochka on GitHub · 2026-11-24 22:41 UTC · original

AMD/RADV check, and it does not reproduce as a speed-up here: on this machine the per-shader numbers improve but the wall time doubles.

GPU RX 7600 XT (RDNA3), radv as recorded by the title runs on this box
OS Linux, Wine 11.22, x86_64-pc-windows-gnu, release
Mode xcl shaders <retail shaders.rpf> --compile 500 --json, XCL_DIRECT_DXIL=1, XCL_DXIL_CACHE=0 XCL_PSO_DISK_CACHE=0, no title run

Five runs in total; the last pair was taken with the same environment and no XCL_DXC_THREADS set:

base c160d86 this PR
wall 78.7 / 84.4 / 98.5 s 187.1 / 188.5 / 190.5 s
median 0.47 / 0.47 / 0.48 s 0.40 / 0.44 / 0.46 s
p90 2.50 / 3.01 / 3.94 s 3.03 / 3.15 / 3.63 s
max 6.5 / 9.7 / 17.6 s 8.6 / 13.3 / 13.7 s
sum (CPU) 494 / 558 / 722 s 532 / 554 / 555 s

Reading: the CPU sum is the same (555 vs 558 on the clean pair), the medians favour the PR, but the wall is 2.2x worse and remarkably stable at ~188 s while the base swings 79-98 s. The same shape appears with XCL_DXC_THREADS=8 fixed, so it does not look like a thread-count artefact on my side.

My guess, offered as a guess: the explicit-stack walk shares state that serialises the workers, so the work is the same but less of it runs concurrently. If you have a way to log how many DXC compiles are in flight at once, that would confirm or kill it in one run.

No crash or stack overflow at 500 shaders on this box, so the overflow this PR targets did not show up in this mode.

**@⁠YaBulochka** on GitHub · 2026-11-24 22:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/1844#issuecomment-7146538568) AMD/RADV check, and it does not reproduce as a speed-up here: on this machine the per-shader numbers improve but the wall time doubles. | | | |---|---| | GPU | RX 7600 XT (RDNA3), radv as recorded by the title runs on this box | | OS | Linux, Wine 11.22, `x86_64-pc-windows-gnu`, release | | Mode | `xcl shaders <retail shaders.rpf> --compile 500 --json`, `XCL_DIRECT_DXIL=1`, `XCL_DXIL_CACHE=0 XCL_PSO_DISK_CACHE=0`, no title run | Five runs in total; the last pair was taken with the same environment and no `XCL_DXC_THREADS` set: | | base `c160d86` | this PR | |---|---|---| | wall | 78.7 / 84.4 / 98.5 s | 187.1 / 188.5 / 190.5 s | | median | 0.47 / 0.47 / 0.48 s | 0.40 / 0.44 / 0.46 s | | p90 | 2.50 / 3.01 / 3.94 s | 3.03 / 3.15 / 3.63 s | | max | 6.5 / 9.7 / 17.6 s | 8.6 / 13.3 / 13.7 s | | sum (CPU) | 494 / 558 / 722 s | 532 / 554 / 555 s | Reading: the CPU sum is the same (555 vs 558 on the clean pair), the medians favour the PR, but the wall is 2.2x worse and remarkably stable at ~188 s while the base swings 79-98 s. The same shape appears with `XCL_DXC_THREADS=8` fixed, so it does not look like a thread-count artefact on my side. My guess, offered as a guess: the explicit-stack walk shares state that serialises the workers, so the work is the same but less of it runs concurrently. If you have a way to log how many DXC compiles are in flight at once, that would confirm or kill it in one run. No crash or stack overflow at 500 shaders on this box, so the overflow this PR targets did not show up in this mode.
Author
Owner

@⁠itsd-effex on GitHub · 2026-11-24 22:47 UTC · original

A note from #1805's reporter: the Ssa::read suspicion in #1805's description was mine and is withdrawn. The retail crash there is in dxil-spirv (Royalflamejlh's analysis on #1805), and #1860 alone fixes it: with ssa.rs unchanged and dxil-spirv unpatched, the 21 retail pipelines that killed workers all build (test), against 0 of 21 without it. So this PR doesn't fix #1805's crash as far as I can tell. The deep-join recursion it removes is real on small stacks (vitor127wt's 2 MiB runs), so it may still be worth having as hardening. I haven't tested this PR against those 21. Sorry for the misdirection.

AI use

  • Claude Code (Claude Opus 5.5) wrote this comment.
**@⁠itsd-effex** on GitHub · 2026-11-24 22:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/1844#issuecomment-7146640346) A note from #1805's reporter: the `Ssa::read` suspicion in #1805's description was mine and is withdrawn. The retail crash there is in dxil-spirv (Royalflamejlh's analysis on #1805), and #1860 alone fixes it: with `ssa.rs` unchanged and dxil-spirv unpatched, the 21 retail pipelines that killed workers all build ([test](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1860)), against 0 of 21 without it. So this PR doesn't fix #1805's crash as far as I can tell. The deep-join recursion it removes is real on small stacks (vitor127wt's 2 MiB runs), so it may still be worth having as hardening. I haven't tested this PR against those 21. Sorry for the misdirection. **AI use** - Claude Code (Claude Opus 5.5) wrote this comment.
Author
Owner

@⁠throny on GitHub · 2026-11-25 00:51 UTC · original

Two contributors checked independently and found that #1852 solves the same problem (for #1805) in a different way: #1607, group D70. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

**@⁠throny** on GitHub · 2026-11-25 00:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/1844#issuecomment-7148956369) <!-- xcl-1607-hint:D70 --> Two contributors checked independently and found that #1852 solves the same problem (for #1805) in a different way: #1607, group D70. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Author
Owner

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

Exact-head CPU validation with DXC 1.9.2609.5

On clean 71f2ceb5a05951f8d3d1f6aebe92c13eec240317, both focused tests ran and passed: gpu::dxil::ssa::tests::deep_joins_read_on_a_small_stack and gpu::dxil::core_tests::long_pixel_shader_translates_fast (2 passed, 0 failed, 0 ignored, 0 skipped). I used cargo test --locked -p xcl --lib <exact-name> -- --exact --nocapture --test-threads=1 separately for each. The long-shader case used DXC/DXIL 1.9.2609.5 for CPU validation.

Host: Ryzen 7 3800X, Windows 11 25H2 build 26200.9974, Rust 1.100.0 MSVC debug, Windows SDK 10.0.26100.0, Intel Arc A770 (driver 32.0.101.9175). This adds a newer DXC version to the existing exact-head report.

Not tested: GPU execution, full workspace suite, retail smoke, or the pre-fix baseline. Codex in T3 Code (gpt-6.2-sol) ran the checks and prepared the test evidence.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 01:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/1844#issuecomment-7149121670) **Exact-head CPU validation with DXC 1.9.2609.5** On clean `71f2ceb5a05951f8d3d1f6aebe92c13eec240317`, both focused tests ran and passed: `gpu::dxil::ssa::tests::deep_joins_read_on_a_small_stack` and `gpu::dxil::core_tests::long_pixel_shader_translates_fast` (**2 passed, 0 failed, 0 ignored, 0 skipped**). I used `cargo test --locked -p xcl --lib <exact-name> -- --exact --nocapture --test-threads=1` separately for each. The long-shader case used DXC/DXIL 1.9.2609.5 for CPU validation. Host: Ryzen 7 3800X, Windows 11 25H2 build 26200.9974, Rust 1.100.0 MSVC debug, Windows SDK 10.0.26100.0, Intel Arc A770 (driver 32.0.101.9175). This adds a newer DXC version to the existing exact-head report. **Not tested:** GPU execution, full workspace suite, retail smoke, or the pre-fix baseline. Codex in T3 Code (`gpt-6.2-sol`) ran the checks and prepared the test evidence.
Author
Owner

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

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

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

Thanks!

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

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

Diff review on 71f2ceb confirms Ssa::read in crates/xcl/src/gpu/dxil/ssa.rs uses purely per-call local vectors (chain and joins: Vec<ReadJoin>) with no shared or global synchronization state, and @lewisnic94-max + @frenziedcoder + RX 7800 XT runs are strong.

Before merge, it would be helpful to briefly close out @YaBulochka's Wine --compile 500 wall-time anomaly report (78-98s vs 187-190s) with a confirmation/note so there are no open timing questions on the thread.

**@⁠raylitebull** on GitHub · 2026-11-25 10:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/1844#issuecomment-7160415675) Diff review on `71f2ceb` confirms `Ssa::read` in `crates/xcl/src/gpu/dxil/ssa.rs` uses purely per-call local vectors (`chain` and `joins: Vec<ReadJoin>`) with no shared or global synchronization state, and `@lewisnic94-max` + `@frenziedcoder` + RX 7800 XT runs are strong. Before merge, it would be helpful to briefly close out `@YaBulochka`'s Wine `--compile 500` wall-time anomaly report (`78-98s` vs `187-190s`) with a confirmation/note so there are no open timing questions on the thread.
Author
Owner

@⁠ClosetPie107 on GitHub · 2026-11-26 06:48 UTC · original

AMD RDNA4 / Linux (Proton Experimental) test report on head 71f2ceb5 (merged cleanly onto main b49be183):

Hardware & environment

  • AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1, native wave64), Ryzen 5 9600X, 30 GiB RAM, CachyOS Linux
  • Proton Experimental (experimental-11.0-20261112), vkd3d-proton master ec207194 (3.2.0) + dxil-spirv b540c8a2 + relaxed-vtable patch (-Db_ndebug=true), DXVK v3.1.1-209, DXC 1.9.2609.5, Rust x86_64-pc-windows-gnu

Isolated unit tests (main b49be183 + #1844 71f2ceb5, debug, --test-threads=1):

  • xcl.exe gpu::dxil::ssa:: -- --test-threads=1: 1 passed, 0 failed, 0 ignored (0 skipped).

Combined 300 s retail sanity run (release, main b49be183 + #1540 + #1675 + #1844 + #1899 + #2123 + #2369 + #2422, retail 1.0.2.1 pressing A past menus):

  • Completed full 300 s (exit=0), 0 crashes, 0 device removals, 2,014 PresentX frames, 131,072 translated draws, 660,943 dispatches (44,546 chained split-compute dispatches), 102,631 Opus packets (0 errors).

Not tested

  • Native Windows, full workspace test suite, or #1844 alone in a retail run.

AI use

  • T3 Code / Antigravity (Gemini 4 Neon) merged #1844 onto main, ran the Proton unit tests and combined retail run on this machine, and drafted this report.
**@⁠ClosetPie107** on GitHub · 2026-11-26 06:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/1844#issuecomment-7184810471) AMD RDNA4 / Linux (Proton Experimental) test report on head `71f2ceb5` (merged cleanly onto `main` `b49be183`): **Hardware & environment** - AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1, native wave64), Ryzen 5 9600X, 30 GiB RAM, CachyOS Linux - Proton Experimental (`experimental-11.0-20261112`), `vkd3d-proton` `master` `ec207194` (3.2.0) + `dxil-spirv` `b540c8a2` + relaxed-vtable patch (`-Db_ndebug=true`), DXVK `v3.1.1-209`, DXC `1.9.2609.5`, Rust `x86_64-pc-windows-gnu` **Isolated unit tests** (`main` `b49be183` + #1844 `71f2ceb5`, debug, `--test-threads=1`): - `xcl.exe gpu::dxil::ssa:: -- --test-threads=1`: **1 passed, 0 failed, 0 ignored** (0 skipped). **Combined 300 s retail sanity run** (release, `main` `b49be183` + #1540 + #1675 + #1844 + #1899 + #2123 + #2369 + #2422, retail 1.0.2.1 pressing `A` past menus): - Completed full **300 s (`exit=0`)**, **0 crashes**, **0 device removals**, `2,014` `PresentX` frames, `131,072` translated draws, `660,943` dispatches (`44,546` chained split-compute dispatches), `102,631` Opus packets (0 errors). **Not tested** - Native Windows, full workspace test suite, or #1844 alone in a retail run. **AI use** - T3 Code / Antigravity (Gemini 4 Neon) merged #1844 onto `main`, ran the Proton unit tests and combined retail run on this machine, and drafted this report.
Author
Owner

@⁠lewisnic94-max on GitHub · 2026-11-25 09:30 UTC · original · reviewed

Reviewed commit 71f2ceb5a05951f8d3d1f6aebe92c13eec240317.

Both 8,192-level diamond and region shapes completed seven times each on a 256 KiB thread stack. The same probes overflowed the stack on the merge base 177cd407e0. A 4,000-deep shader join also translated on a 2 MiB stack. All 24 seeded draws on the head returned the expected 64 RGBA pixels, and all 24 DXIL blobs matched the corresponding base draw byte-for-byte.

The graphics dependency benchmark distinguishes this PR from #1852. At 1,024 steps the median additional peak process commit inside the walker was 0.832 MiB here, versus 16.531 MiB on #1852 at c2b1029c22 (seven release processes each). Median phase times were 43.09 and 50.78 ms respectively. Both produced the same DXIL SHA-256. This PR changes SSA join resolution. The other PR also changes graphics dependency traversal. Their SSA edits overlap, so applying both as-is produces a conflict in ssa.rs.

Windows 11 x64, Ryzen 7 5800X, GeForce RTX 3080 (616.92), Rust 1.100.0 MSVC and DXC 1.9.2602.17. No skips in those draw or head stack probes. Timing is specific to this synthetic shader and machine. No retail shader or native RDNA2 run. No additional actionable defect identified in this scope.

AI assistance: OpenAI Codex (GPT-6) inspected the implementation, analyzed the synthetic test evidence and drafted this review.

**@⁠lewisnic94-max** on GitHub · 2026-11-25 09:30 UTC · [original](https://github.com/xcl-dev/xcl/pull/1844#pullrequestreview-6054990568) · **reviewed** Reviewed commit `71f2ceb5a05951f8d3d1f6aebe92c13eec240317`. Both 8,192-level diamond and region shapes completed seven times each on a 256 KiB thread stack. The same probes overflowed the stack on the merge base 177cd407e0114bd087622ae0c358fb3ba7e97484. A 4,000-deep shader join also translated on a 2 MiB stack. All 24 seeded draws on the head returned the expected 64 RGBA pixels, and all 24 DXIL blobs matched the corresponding base draw byte-for-byte. The graphics dependency benchmark distinguishes this PR from #1852. At 1,024 steps the median additional peak process commit inside the walker was 0.832 MiB here, versus 16.531 MiB on #1852 at c2b1029c224fa279aa83323bf5b42a3684ba5c04 (seven release processes each). Median phase times were 43.09 and 50.78 ms respectively. Both produced the same DXIL SHA-256. This PR changes SSA join resolution. The other PR also changes graphics dependency traversal. Their SSA edits overlap, so applying both as-is produces a conflict in ssa.rs. Windows 11 x64, Ryzen 7 5800X, GeForce RTX 3080 (616.92), Rust 1.100.0 MSVC and DXC 1.9.2602.17. No skips in those draw or head stack probes. Timing is specific to this synthetic shader and machine. No retail shader or native RDNA2 run. No additional actionable defect identified in this scope. AI assistance: OpenAI Codex (GPT-6) inspected the implementation, analyzed the synthetic test evidence and drafted this review.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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