Recompiler: direct DXIL makes a pointer to storage again in each block #2072

Merged
Royalflamejlh merged 1 commit from upstream-pr/2082 into main 2026-11-29 13:59:11 +00:00
Royalflamejlh commented 2026-11-25 03:29:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-25T03:29:11Z.


On Linux, vkd3d-proton's dxil-spirv turns five of the retail title's 2,682 direct-DXIL compute programs into SPIR-V that spirv-val rejects: a pointer into groupshared storage is used in a block its definition does not dominate. The direct backend now merges identical getelementptrs within a block only, and all five convert to valid SPIR-V. Part of #1805.

Module::optimize merged identical getelementptrs along the dominator tree, so one pointer into the wave64 exchange words or the LDS was used in up to 136 blocks. In the DXIL the definition dominates every use. In the smallest of the five (abeb82838a13d6d9) the pointer is made inside a loop that has two exits and is used after one of them: dxil-spirv routes both exits through one merge block and picks the way on with a flag, so the block inside the loop no longer dominates the code after it. The values made in the loop get a phi there; the pointer does not (my reading of that one output, not of dxil-spirv's code). DXC's DXIL carries such pointers across blocks too and all of it converts validly here, so the merging alone is not a fault: it is avoided because that costs 0.04 % of DXIL.

What is in it

  • crates/xcl/src/gpu/dxil/module/opt.rs: one arm in cse_kind. A getelementptr is merged within its block (Cse::Block) unless it points into a constant global, where loads are still merged along the tree. One unit test, red without the arm.

Tested

  • Head cab89ed5, on main 2898511a (rebased today from 6818f70 on aaa0936; the numbers below that name those two are from before the rebase). The change is the same. Its unit test now leaves the entry block by a conditional branch: #2194's simplify_cfg (merged) folds two blocks joined by one unconditional branch into one after this pass, so the old test's count per block no longer held (NWProgramming00's report below). The test passes with the change and fails without the Cse::Block arm ([1, 0, 0]), under Wine and on an RTX 2070 SUPER (Windows, debug, 1 passed).

  • Retail title 1.0.2.1, xcl shaders shaders.rpf --precompile --only cs --split 1 with XCL_DIRECT_DXIL=1, at main aaa0936 and at 80f5d50 (the tree of this head, 6818f70; only the commit message differs); each program's DXIL through dxil-spirv built natively, with the options vkd3d-proton passes, then spirv-val --target-env vulkan1.3:

    main aaa0936 this commit
    invalid SPIR-V of 2,682, dxil-spirv e084e35c + 061225da + three patches from #1269 (0naku's, the split-loop patch and the fourth) 5 0
    the same five through dxil-spirv 34f0ff8 (the one in vkd3d-proton v3.1-90-g30b0eb9b) 5 invalid 0 invalid
    DXIL, all programs 935,669,256 B 936,012,404 B (+0.04 %; 682 programs change)

    The unsplit form of the pack (--split 0, what a card with 64-lane waves gets) is byte-identical with and without the change, all 2,682 programs, and all of its SPIR-V passes spirv-val on main: only the split form's exchange words were reached through a merged pointer.

    The five records: 25b531863bfb0d42, 2a098601171855aa, 8b1f2896e2354d1b, a9f2cd53943d5dc4, abeb82838a13d6d9.

  • Again on today's main, with this commit merged locally (it merges with #2194's simplify_cfg without conflict), 1 pass each: on 426a5a7 through 34f0ff8, 5 of 2,682 outputs fail spirv-val on main and 0 with it; on 5478c4a through e084e35c (whose five commits are in dxil-spirv's master since today), 5 and 0.

  • On main b49be183 through dxil-spirv's own master b540c8a2 (vkd3d-proton's master carries it since today, 89439562), the split form, 1 pass each: on main, 7 of 11,115 programs and pieces fail spirv-val: the five above, a piece of 73000efc296c082e and a piece of c458137fcd97caf3 ("ID ... does not dominate its use"). With this commit, 0 of 11,117. With #1860 alone, the same 7.

  • No GPU: Ryzen 9 9950X3D, Fedora 44, Wine 11.21 Staging with Mesa lavapipe only, rustc 1.98.0, release, cross-compiled to x86_64-pc-windows-gnu; vkd3d-proton v3.1-90-g30b0eb9b with #175's patch in the prefix. cargo test --workspace --release --target x86_64-pc-windows-gnu --no-fail-fast -- --test-threads=4 --skip d32s8 --skip reservable_agrees_with_the_driver at cab89ed5: 1,353 passed, 9 failed, 46 ignored. The same command on main 2898511a: 1,352 passed, 9 failed, 46 ignored, the same nine (a_tile_decommitted_and_committed_again_keeps_its_video_memory, directed_reference_basics, disk_free_space_ex_reports_pls_quota, fence_and_command_queue_sync_timing_and_allocator_reset_match_host_and_console, gpu_depth_buffer_created_for_unordered_access_is_placed, gpu_promoted_uav_clear_values_pass_create_committed_resource, split_compute_program_prebuilds_and_caches_chain_pieces, stale_blob_cannot_bypass_the_offline_pipeline_cap, test_title_runs_and_game_folder_is_untouched); the one more that passes is this change's test. Before the rebase, at 6818f70 and aaa0936 without the two skips: 1,147 and 1,146 passed, 5 failed each.

  • At 6818f70: RTX 4070 12 GB (driver 615.71.09), the same Wine with vkd3d-proton v3.1-90-g30b0eb9b: cargo test --release -p xcl --lib --target x86_64-pc-windows-gnu -- gpu_ gpu::dxil coverage --test-threads=4: 242 passed, 2 failed, 5 ignored. On main aaa0936: 241 passed, 2 failed, 5 ignored, the same two (directed_reference_basics, gpu_depth_buffer_created_for_unordered_access_is_placed). SKIPPED on both: the two "no wave64" tests.

  • At 6818f70: Windows 11 Pro 26300, RTX 5070 Ti 16 GB (driver 621.24), Ryzen 7 9800X3D, rustc 1.99.1, debug: cargo test --workspace --no-fail-fast -- gpu::dxil coverage --test-threads=4: 119 passed, 4 failed, 4 ignored. The four are fuzz_validate_and_gpu_0 to _3 (CreateComputePipelineState: Not enough memory resources are available, seeds 70, 545, 1019 and 1507). They fail the same way, with the same seeds, on main 689f2db on that machine, and again here run alone on one thread.

  • At cab89ed5, @upipibi's comment below (RTX 3070, Windows 11): the new test fails on the merge-base and passes on the head, 3 of 3; the whole lib 1,285 passed, 0 failed (1,284 on the merge-base).

Regression run

Windows 11 Pro 26200, RTX 2070 SUPER 8 GB (driver 621.01), Ryzen 7 5700X3D; the title's first-run screens completed once, no story progress, no input; the PR's first, then main, back to back. That PC is shared, and its frame rate varied between runs: the two earlier pairs gave 388 and 756 frames for this head and 1,380 and 412 for main, the low runs at 22 presents per 2 s on either tree.

main:

xcl-smoke v1
commit: 2898511af1c038a2ef809719e9b6f89e5675c422
gpu: NVIDIA GeForce RTX 2070 SUPER
title: 5330474d
seconds: 60
exit: 0x0
frames shown: 799 (PresentX 799)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 14668 MB

PR:

xcl-smoke v1
commit: cab89ed546b2677b8c2fc419870efaf98724eb52
gpu: NVIDIA GeForce RTX 2070 SUPER
title: 5330474d
seconds: 60
exit: 0x0
frames shown: 767 (PresentX 768)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14667 MB

Before the rebase, at 6818f70, under Wine 11.21 Staging with vkd3d-proton v3.1-90-g30b0eb9b on an RTX 4070 12 GB (driver 615.71.09), main first, 1 run each: 1423 frames on main aaa0936 and 1522 on 6818f70, the last three counts 60 60 60, 0 device removals and 0 crashes in both (under Wine the exit code reads 0x89 and peak commit 0 MB on every tree).

On nvidia-dev

  • It merges into nvidia-dev eff3bcab without a conflict (the measurements below are on eae01502; eff3bcab changes nothing under gpu/).
  • There it fixes nothing we could see: the branch's compute programs with XCL_DIRECT_DXIL=1 in the split wave64 form (2,682 programs, 9,489 pieces) through dxil-spirv 34f0ff8 natively, 1 pass each, gave no output that fails spirv-val without it, on the branch alone and with #1860's commits. (On the older af2cecc4 and c044dc6d the same: the six that fail on main stayed whole there and converted.)

On amd-dev

  • Since 926433d8 the direct translator is the default for compute there. This branch merges into amd-dev 494f08b2 without a conflict (7c795f5e since changes only comments under gpu/).
  • There it does fix outputs: the compute programs in the split wave64 form (1,613 programs, 325 pieces) through dxil-spirv 34f0ff8 natively, 1 pass each: 5 of the 1,901 outputs fail spirv-val on 494f08b2, none with this branch merged; with #1860 merged too, none, and no segfault. In the unsplit form (--split 0) none fails without it.
  • cargo test --release -p xcl --lib -- gpu::dxil under Wine, no GPU: 210 passed, 2 failed with it; 209 passed, 2 failed on 494f08b2. The same two fail in both (dispatch_chain_native_wave64_builds_whole, directed_reference_basics).

Not tested

  • The title on Linux with the direct backend and this change. No run of ours shows what the five invalid programs did on the card: in earlier runs NVIDIA's compiler took two pipelines of the sizes of two of them without an error (a match by size only).
  • Whether the 682 changed programs compute the same on a GPU beyond what the gpu_ tests cover.
  • AMD; Intel beyond @JJAutoCompare's comment below (Arc A770, Windows: straight_line_and_loop_kernels_validate passed; the gpu_split_wave64_ and gpu_format_stores_atomics_global_lds tests 6 passed, 1 failed in both backends, the f64 case refused as in #1984); pixel and vertex programs through the direct backend (--only cs).
  • Compile time in a driver, and dxil-spirv's conversion time: two passes here differed by machine load only.

AI use

  • Two Claude Code sessions (Claude Fable 5.2): one found the cause, wrote the change, the test and this description and ran the conversions, the suite and the Windows runs; the other ran the tests on the Linux card and the run under Wine.
  • Claude Code (Claude Opus 5.5) made the checks on today's main, on nvidia-dev and on amd-dev, rebased the branch and fixed its test after #2194, and ran the tests and the regression runs for cab89ed5.
<!-- greyfinch-sync:ivall/xcl:issue:5484604081 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-11-25T03:29:11Z. --- On Linux, vkd3d-proton's dxil-spirv turns five of the retail title's 2,682 direct-DXIL compute programs into SPIR-V that `spirv-val` rejects: a pointer into groupshared storage is used in a block its definition does not dominate. The direct backend now merges identical `getelementptr`s within a block only, and all five convert to valid SPIR-V. Part of #1805. `Module::optimize` merged identical `getelementptr`s along the dominator tree, so one pointer into the wave64 exchange words or the LDS was used in up to 136 blocks. In the DXIL the definition dominates every use. In the smallest of the five (`abeb82838a13d6d9`) the pointer is made inside a loop that has two exits and is used after one of them: dxil-spirv routes both exits through one merge block and picks the way on with a flag, so the block inside the loop no longer dominates the code after it. The values made in the loop get a phi there; the pointer does not (my reading of that one output, not of dxil-spirv's code). DXC's DXIL carries such pointers across blocks too and all of it converts validly here, so the merging alone is not a fault: it is avoided because that costs 0.04 % of DXIL. **What is in it** - `crates/xcl/src/gpu/dxil/module/opt.rs`: one arm in `cse_kind`. A `getelementptr` is merged within its block (`Cse::Block`) unless it points into a constant global, where loads are still merged along the tree. One unit test, red without the arm. **Tested** - Head `cab89ed5`, on `main` `2898511a` (rebased today from `6818f70` on `aaa0936`; the numbers below that name those two are from before the rebase). The change is the same. Its unit test now leaves the entry block by a conditional branch: #2194's `simplify_cfg` (merged) folds two blocks joined by one unconditional branch into one after this pass, so the old test's count per block no longer held (NWProgramming00's report below). The test passes with the change and fails without the `Cse::Block` arm (`[1, 0, 0]`), under Wine and on an RTX 2070 SUPER (Windows, debug, 1 passed). - Retail title 1.0.2.1, `xcl shaders shaders.rpf --precompile --only cs --split 1` with `XCL_DIRECT_DXIL=1`, at `main` `aaa0936` and at `80f5d50` (the tree of this head, `6818f70`; only the commit message differs); each program's DXIL through dxil-spirv built natively, with the options vkd3d-proton passes, then `spirv-val --target-env vulkan1.3`: | | `main` `aaa0936` | this commit | |---|---|---| | invalid SPIR-V of 2,682, dxil-spirv `e084e35c` + `061225da` + three patches from #1269 (0naku's, the split-loop patch and the fourth) | 5 | 0 | | the same five through dxil-spirv `34f0ff8` (the one in vkd3d-proton v3.1-90-g30b0eb9b) | 5 invalid | 0 invalid | | DXIL, all programs | 935,669,256 B | 936,012,404 B (+0.04 %; 682 programs change) | The unsplit form of the pack (`--split 0`, what a card with 64-lane waves gets) is byte-identical with and without the change, all 2,682 programs, and all of its SPIR-V passes `spirv-val` on `main`: only the split form's exchange words were reached through a merged pointer. The five records: `25b531863bfb0d42`, `2a098601171855aa`, `8b1f2896e2354d1b`, `a9f2cd53943d5dc4`, `abeb82838a13d6d9`. - Again on today's `main`, with this commit merged locally (it merges with #2194's `simplify_cfg` without conflict), 1 pass each: on `426a5a7` through `34f0ff8`, 5 of 2,682 outputs fail `spirv-val` on `main` and 0 with it; on `5478c4a` through `e084e35c` (whose five commits are in dxil-spirv's `master` since today), 5 and 0. - On `main` `b49be183` through dxil-spirv's own `master` `b540c8a2` (vkd3d-proton's `master` carries it since today, `89439562`), the split form, 1 pass each: on `main`, 7 of 11,115 programs and pieces fail `spirv-val`: the five above, a piece of `73000efc296c082e` and a piece of `c458137fcd97caf3` ("ID ... does not dominate its use"). With this commit, 0 of 11,117. With #1860 alone, the same 7. - No GPU: Ryzen 9 9950X3D, Fedora 44, Wine 11.21 Staging with Mesa lavapipe only, rustc 1.98.0, release, cross-compiled to `x86_64-pc-windows-gnu`; vkd3d-proton v3.1-90-g30b0eb9b with #175's patch in the prefix. `cargo test --workspace --release --target x86_64-pc-windows-gnu --no-fail-fast -- --test-threads=4 --skip d32s8 --skip reservable_agrees_with_the_driver` at `cab89ed5`: 1,353 passed, 9 failed, 46 ignored. The same command on `main` `2898511a`: 1,352 passed, 9 failed, 46 ignored, the same nine (`a_tile_decommitted_and_committed_again_keeps_its_video_memory`, `directed_reference_basics`, `disk_free_space_ex_reports_pls_quota`, `fence_and_command_queue_sync_timing_and_allocator_reset_match_host_and_console`, `gpu_depth_buffer_created_for_unordered_access_is_placed`, `gpu_promoted_uav_clear_values_pass_create_committed_resource`, `split_compute_program_prebuilds_and_caches_chain_pieces`, `stale_blob_cannot_bypass_the_offline_pipeline_cap`, `test_title_runs_and_game_folder_is_untouched`); the one more that passes is this change's test. Before the rebase, at `6818f70` and `aaa0936` without the two skips: 1,147 and 1,146 passed, 5 failed each. - At `6818f70`: RTX 4070 12 GB (driver 615.71.09), the same Wine with vkd3d-proton v3.1-90-g30b0eb9b: `cargo test --release -p xcl --lib --target x86_64-pc-windows-gnu -- gpu_ gpu::dxil coverage --test-threads=4`: 242 passed, 2 failed, 5 ignored. On `main` `aaa0936`: 241 passed, 2 failed, 5 ignored, the same two (`directed_reference_basics`, `gpu_depth_buffer_created_for_unordered_access_is_placed`). SKIPPED on both: the two "no wave64" tests. - At `6818f70`: Windows 11 Pro 26300, RTX 5070 Ti 16 GB (driver 621.24), Ryzen 7 9800X3D, rustc 1.99.1, debug: `cargo test --workspace --no-fail-fast -- gpu::dxil coverage --test-threads=4`: 119 passed, 4 failed, 4 ignored. The four are `fuzz_validate_and_gpu_0` to `_3` (`CreateComputePipelineState: Not enough memory resources are available`, seeds 70, 545, 1019 and 1507). They fail the same way, with the same seeds, on `main` `689f2db` on that machine, and again here run alone on one thread. - At `cab89ed5`, @upipibi's comment below (RTX 3070, Windows 11): the new test fails on the merge-base and passes on the head, 3 of 3; the whole lib 1,285 passed, 0 failed (1,284 on the merge-base). **Regression run** Windows 11 Pro 26200, RTX 2070 SUPER 8 GB (driver 621.01), Ryzen 7 5700X3D; the title's first-run screens completed once, no story progress, no input; the PR's first, then `main`, back to back. That PC is shared, and its frame rate varied between runs: the two earlier pairs gave 388 and 756 frames for this head and 1,380 and 412 for `main`, the low runs at 22 presents per 2 s on either tree. main: ``` xcl-smoke v1 commit: 2898511af1c038a2ef809719e9b6f89e5675c422 gpu: NVIDIA GeForce RTX 2070 SUPER title: 5330474d seconds: 60 exit: 0x0 frames shown: 799 (PresentX 799) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 14668 MB ``` PR: ``` xcl-smoke v1 commit: cab89ed546b2677b8c2fc419870efaf98724eb52 gpu: NVIDIA GeForce RTX 2070 SUPER title: 5330474d seconds: 60 exit: 0x0 frames shown: 767 (PresentX 768) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14667 MB ``` Before the rebase, at `6818f70`, under Wine 11.21 Staging with vkd3d-proton v3.1-90-g30b0eb9b on an RTX 4070 12 GB (driver 615.71.09), `main` first, 1 run each: 1423 frames on `main` `aaa0936` and 1522 on `6818f70`, the last three counts 60 60 60, 0 device removals and 0 crashes in both (under Wine the exit code reads `0x89` and peak commit 0 MB on every tree). **On `nvidia-dev`** - It merges into `nvidia-dev` `eff3bcab` without a conflict (the measurements below are on `eae01502`; `eff3bcab` changes nothing under `gpu/`). - There it fixes nothing we could see: the branch's compute programs with `XCL_DIRECT_DXIL=1` in the split wave64 form (2,682 programs, 9,489 pieces) through dxil-spirv `34f0ff8` natively, 1 pass each, gave no output that fails spirv-val without it, on the branch alone and with #1860's commits. (On the older `af2cecc4` and `c044dc6d` the same: the six that fail on `main` stayed whole there and converted.) **On `amd-dev`** - Since `926433d8` the direct translator is the default for compute there. This branch merges into `amd-dev` `494f08b2` without a conflict (`7c795f5e` since changes only comments under `gpu/`). - There it does fix outputs: the compute programs in the split wave64 form (1,613 programs, 325 pieces) through dxil-spirv `34f0ff8` natively, 1 pass each: 5 of the 1,901 outputs fail spirv-val on `494f08b2`, none with this branch merged; with #1860 merged too, none, and no segfault. In the unsplit form (`--split 0`) none fails without it. - `cargo test --release -p xcl --lib -- gpu::dxil` under Wine, no GPU: 210 passed, 2 failed with it; 209 passed, 2 failed on `494f08b2`. The same two fail in both (`dispatch_chain_native_wave64_builds_whole`, `directed_reference_basics`). **Not tested** - The title on Linux with the direct backend and this change. No run of ours shows what the five invalid programs did on the card: in earlier runs NVIDIA's compiler took two pipelines of the sizes of two of them without an error (a match by size only). - Whether the 682 changed programs compute the same on a GPU beyond what the `gpu_` tests cover. - AMD; Intel beyond @JJAutoCompare's comment below (Arc A770, Windows: `straight_line_and_loop_kernels_validate` passed; the `gpu_split_wave64_` and `gpu_format_stores_atomics_global_lds` tests 6 passed, 1 failed in both backends, the f64 case refused as in #1984); pixel and vertex programs through the direct backend (`--only cs`). - Compile time in a driver, and dxil-spirv's conversion time: two passes here differed by machine load only. **AI use** - Two Claude Code sessions (Claude Fable 5.2): one found the cause, wrote the change, the test and this description and ran the conversions, the suite and the Windows runs; the other ran the tests on the Linux card and the run under Wine. - Claude Code (Claude Opus 5.5) made the checks on today's `main`, on `nvidia-dev` and on `amd-dev`, rebased the branch and fixed its test after #2194, and ran the tests and the regression runs for `cab89ed5`.
Parakeet-Wheat commented 2026-11-25 05:08:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Parakeet-Wheat on 2026-11-25T04:26:31Z.


NVIDIA RTX 3070 on native Windows, head 6818f70 on its base aaa0936 (4 commits behind current main): the new test fails without the cse_kind arm and passes with it, the whole suite passes, and the smoke pair is within the limits. The first independent run on this PR.

Tested

  • NVIDIA GeForce RTX 3070 8 GB (driver 610.88, 32-lane waves), Ryzen 5 5600X, 32 GB, Windows 11 26300, Rust 1.95.0 stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11, retail 1.0.2.1. Head 6818f70 (one commit on main aaa0936), checked out clean. Tests in the debug profile, smoke in release.
  • cargo test -p xcl --lib a_pointer_to_storage_is_made_again_in_each_block -- --nocapture --test-threads=1:
    • on aaa0936 with the PR's opt.rs but its cse_kind hunk reverted: 1 failed, left: [1, 0], right: [1, 1] (the second block's pointer is merged into the first's);
    • on 6818f70: 1 passed, 0 failed.
  • .\scripts\test.ps1 (cargo build --workspace, then cargo test --workspace -- --test-threads=4) on 6818f70: 1152 passed, 0 failed, 46 ignored, exit 0. SKIPPED, 25: 20 × no wave64, 3 × per-lane form refused (V_CVT_F16_F32, V_PK_MUL_F16, V_MUL_F16: "its #1426 semantics differ from the console's"), 1 × no heap windows, 1 × cannot disable the driver cache (Windows Developer Mode required).

Regression run (scripts/smoke.ps1 -Game <folder> -Seconds 60, the same title, back to back, menus, no input; unedited). Base aaa0936:

xcl-smoke v1
commit: aaa093657bd96a146c05c0c1a9b61149fe761453
gpu: NVIDIA GeForce RTX 3070
title: 3d7db37d
seconds: 60
exit: 0x0
frames shown: 1451 (PresentX 1451)
presents per 2 s (last 3): 60 59 18
device removals: 0
crashes: 0
peak commit: 18451 MB

PR head 6818f70:

xcl-smoke v1
commit: 6818f70811ecae3e77d1faff0e5543357a80a11b
gpu: NVIDIA GeForce RTX 3070
title: 3d7db37d
seconds: 60
exit: 0x0
frames shown: 1456 (PresentX 1456)
presents per 2 s (last 3): 60 59 20
device removals: 0
crashes: 0
peak commit: 18537 MB

That is 100 % of the base's frames and 100 % of its peak commit.

Not tested

  • The SPIR-V side the PR is about (dxil-spirv under vkd3d-proton on Linux, spirv-val on the five programs), the --precompile runs on the retail title, a world run, AMD, native wave64 (the 20 no wave64 skips above), the tests on game data (XCL_SAMPLE_* not set).

AI use

  • Claude Code (Claude Sonnet 5.5) ran the tests and wrote this report. The account owner has not reviewed it.
<!-- greyfinch-sync:ivall/xcl:comment:7152845705 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082#issuecomment-7152845705). Originally posted by [Parakeet-Wheat](https://github.com/Parakeet-Wheat) on 2026-11-25T04:26:31Z. --- NVIDIA RTX 3070 on native Windows, head `6818f70` on its base `aaa0936` (4 commits behind current `main`): the new test fails without the `cse_kind` arm and passes with it, the whole suite passes, and the smoke pair is within the limits. The first independent run on this PR. **Tested** - NVIDIA GeForce RTX 3070 8 GB (driver `610.88`, 32-lane waves), Ryzen 5 5600X, 32 GB, Windows 11 26300, Rust 1.95.0 `stable-x86_64-pc-windows-msvc`, DXC 1.8.2502.11, retail 1.0.2.1. Head `6818f70` (one commit on `main` `aaa0936`), checked out clean. Tests in the debug profile, smoke in release. - `cargo test -p xcl --lib a_pointer_to_storage_is_made_again_in_each_block -- --nocapture --test-threads=1`: - on `aaa0936` with the PR's `opt.rs` but its `cse_kind` hunk reverted: **1 failed**, `left: [1, 0]`, `right: [1, 1]` (the second block's pointer is merged into the first's); - on `6818f70`: **1 passed**, 0 failed. - `.\scripts\test.ps1` (`cargo build --workspace`, then `cargo test --workspace -- --test-threads=4`) on `6818f70`: **1152 passed, 0 failed, 46 ignored**, exit 0. SKIPPED, 25: 20 × `no wave64`, 3 × per-lane form refused (`V_CVT_F16_F32`, `V_PK_MUL_F16`, `V_MUL_F16`: "its #1426 semantics differ from the console's"), 1 × `no heap windows`, 1 × cannot disable the driver cache (Windows Developer Mode required). **Regression run** (`scripts/smoke.ps1 -Game <folder> -Seconds 60`, the same title, back to back, menus, no input; unedited). Base `aaa0936`: ``` xcl-smoke v1 commit: aaa093657bd96a146c05c0c1a9b61149fe761453 gpu: NVIDIA GeForce RTX 3070 title: 3d7db37d seconds: 60 exit: 0x0 frames shown: 1451 (PresentX 1451) presents per 2 s (last 3): 60 59 18 device removals: 0 crashes: 0 peak commit: 18451 MB ``` PR head `6818f70`: ``` xcl-smoke v1 commit: 6818f70811ecae3e77d1faff0e5543357a80a11b gpu: NVIDIA GeForce RTX 3070 title: 3d7db37d seconds: 60 exit: 0x0 frames shown: 1456 (PresentX 1456) presents per 2 s (last 3): 60 59 20 device removals: 0 crashes: 0 peak commit: 18537 MB ``` That is 100 % of the base's frames and 100 % of its peak commit. **Not tested** - The SPIR-V side the PR is about (dxil-spirv under vkd3d-proton on Linux, `spirv-val` on the five programs), the `--precompile` runs on the retail title, a world run, AMD, native wave64 (the 20 `no wave64` skips above), the tests on game data (`XCL_SAMPLE_*` not set). **AI use** - Claude Code (Claude Sonnet 5.5) ran the tests and wrote this report. The account owner has not reviewed it.
DavidM1911 commented 2026-11-25 06:05:50 +00:00 (Migrated from github.com)

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


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

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

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7153783375 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082#issuecomment-7153783375). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T05:26:53Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
safesearch77 commented 2026-11-25 17:07:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by safesearch77 on 2026-11-25T16:30:17Z.


Reviewed 6818f70 against main (0829441) and crates/xcl/src/gpu/dxil/module/opt.rs.

  • Merges cleanly onto current main (0829441), including alongside #2194's simplify_cfg pass (simplify_cfg runs after CSE and only merges single-predecessor unconditional edges, so intra-block GEPs cannot regain cross-loop-exit uses before dxil-spirv structurization).
  • Restricting Op::Gep(p, _) if !self.is_const_global_ptr(*p) to Cse::Block cleanly matches Op::Load(p, _) if self.is_const_global_ptr(*p) => Cse::Dom right below it: lookup-table constant globals keep dominator-tree GEP+Load CSE, while mutable TGSM (@xcl_xs / LDS) and alloca pointers stay per-block so dxil-spirv never needs an illegal pointer OpPhi at multi-exit loop merge blocks (+0.04% DXIL size across the 2,682 split compute shaders is negligible).
  • Checked local.clear() on dx.op.discard (opt.rs:471): worst case in a PS with discard is re-emitting an alloca GEP after discard in the same block, which is harmless.

LGTM — clean, minimal fix for NVIDIA Wave32 + vkd3d-proton Direct-DXIL compute pipelines.

AI use: Antigravity (Gemini 4 Carbon) assisted with verifying merge cleanliness and pass interactions in opt.rs; reviewed by me.

<!-- greyfinch-sync:ivall/xcl:comment:7168085965 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082#issuecomment-7168085965). Originally posted by [safesearch77](https://github.com/safesearch77) on 2026-11-25T16:30:17Z. --- Reviewed `6818f70` against `main` (`0829441`) and `crates/xcl/src/gpu/dxil/module/opt.rs`. - Merges cleanly onto current `main` (`0829441`), including alongside `#2194`'s `simplify_cfg` pass (`simplify_cfg` runs after CSE and only merges single-predecessor unconditional edges, so intra-block GEPs cannot regain cross-loop-exit uses before `dxil-spirv` structurization). - Restricting `Op::Gep(p, _) if !self.is_const_global_ptr(*p)` to `Cse::Block` cleanly matches `Op::Load(p, _) if self.is_const_global_ptr(*p) => Cse::Dom` right below it: lookup-table constant globals keep dominator-tree GEP+Load CSE, while mutable TGSM (`@xcl_xs` / LDS) and `alloca` pointers stay per-block so `dxil-spirv` never needs an illegal pointer `OpPhi` at multi-exit loop merge blocks (+0.04% DXIL size across the 2,682 split compute shaders is negligible). - Checked `local.clear()` on `dx.op.discard` (`opt.rs:471`): worst case in a PS with `discard` is re-emitting an `alloca` GEP after `discard` in the same block, which is harmless. LGTM — clean, minimal fix for NVIDIA Wave32 + `vkd3d-proton` Direct-DXIL compute pipelines. AI use: Antigravity (Gemini 4 Carbon) assisted with verifying merge cleanliness and pass interactions in `opt.rs`; reviewed by me.
NWProgramming00 commented 2026-11-25 19:09:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by NWProgramming00 on 2026-11-25T18:43:15Z.


Heads-up from a batch run (B19 in #1607): this PR's own test fails once it is merged with current main.

  • At head 6818f70, gpu::dxil::module::opt::tests::a_pointer_to_storage_is_made_again_in_each_block passes.
  • Merged onto main (0829441, and current c7e1799), it fails: left: [2, 0], right: [1, 1] at opt.rs:984.
  • Bisected to e64bd17 (collapse empty trampolines and merge linear blocks in direct DXIL opt). It passes merged onto e64bd17^ and fails from e64bd17 on.

My guess is that main now merges the test program's two linear blocks into one before your pass runs. If so, the test needs a CFG that keeps both blocks, or the new block count. That's from reading, not checked.

Ran with cargo test --release -p xcl --lib a_pointer_to_storage_is_made_again_in_each_block on Windows 11 (no GPU needed for this test).

<!-- greyfinch-sync:ivall/xcl:comment:7171301783 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082#issuecomment-7171301783). Originally posted by [NWProgramming00](https://github.com/NWProgramming00) on 2026-11-25T18:43:15Z. --- Heads-up from a batch run (B19 in #1607): this PR's own test fails once it is merged with current `main`. - At head `6818f70`, `gpu::dxil::module::opt::tests::a_pointer_to_storage_is_made_again_in_each_block` passes. - Merged onto `main` (`0829441`, and current `c7e1799`), it fails: `left: [2, 0]`, `right: [1, 1]` at `opt.rs:984`. - Bisected to `e64bd17` (*collapse empty trampolines and merge linear blocks in direct DXIL opt*). It passes merged onto `e64bd17^` and fails from `e64bd17` on. My guess is that main now merges the test program's two linear blocks into one before your pass runs. If so, the test needs a CFG that keeps both blocks, or the new block count. That's from reading, not checked. Ran with `cargo test --release -p xcl --lib a_pointer_to_storage_is_made_again_in_each_block` on Windows 11 (no GPU needed for this test).
Royalflamejlh commented 2026-11-25 20:08:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-25T19:55:57Z.


@NWProgramming00 thank you, your bisect was right: #2194's simplify_cfg runs after the per-block CSE and folds the test's two blocks into one, so they became one block holding both getelementptrs (your [2, 0]). cab89ed5, rebased onto main 2898511a, gives the test a conditional branch the merge keeps apart; it passes with the change and fails without it under Wine (left: [1, 0, 0], 1 run). The change is still needed on today's main: without it the same five programs, and one split piece, give invalid SPIR-V through dxil-spirv 34f0ff8 (main 3f277701, 1 pass).

AI use: Claude Code (Claude Opus 5.5) fixed the test and wrote this reply.

Posted without review by a person: the account owner was away and reads replies later.

<!-- greyfinch-sync:ivall/xcl:comment:7172958771 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082#issuecomment-7172958771). Originally posted by [Royalflamejlh](https://github.com/Royalflamejlh) on 2026-11-25T19:55:57Z. --- @NWProgramming00 thank you, your bisect was right: #2194's `simplify_cfg` runs after the per-block CSE and folds the test's two blocks into one, so they became one block holding both `getelementptr`s (your `[2, 0]`). `cab89ed5`, rebased onto `main` `2898511a`, gives the test a conditional branch the merge keeps apart; it passes with the change and fails without it under Wine (`left: [1, 0, 0]`, 1 run). The change is still needed on today's `main`: without it the same five programs, and one split piece, give invalid SPIR-V through dxil-spirv `34f0ff8` (`main` `3f277701`, 1 pass). **AI use:** Claude Code (Claude Opus 5.5) fixed the test and wrote this reply. Posted without review by a person: the account owner was away and reads replies later.
thehollowedone commented 2026-11-26 00:05:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-25T23:11:46Z.


Independent native Windows check of #2082 head cab89ed5. RTX 3080 Ti / driver 621.35, Ryzen 7 9800X3D, Windows 11 build 26300, rustc 1.99.1. The PR-head checkout was clean for these results.

  • cargo test --offline --locked -p xcl --lib a_pointer_to_storage_is_made_again_in_each_block -- --test-threads=1 --nocapture: 1 passed, 0 failed. In a disposable control with only the new Op::Gep CSE arm removed, the same stock regression failed as intended: [1, 0, 0] versus [1, 1, 0]. I restored the checkout to the exact head before the suite.
  • cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 on the clean head: 1,364 passed, 0 failed, 46 ignored across 24 test binaries, with 25 explicit GPU skips (21 no native wave64, 3 unsupported f16 forms, 1 no heap windows). The new regression ran and passed.

I also merged that head without committing into main 08db802, after the latest main merge. It merged without conflicts; the focused regression passed 1/0, and the full workspace suite passed 1,430/0/47 across 37 binaries, with 25 explicit GPU skips of the same categories. Those are integration-tree counts, separate from the clean-head counts.

This run verifies the native regression and broader Windows GPU suite. I did not run the retail title or the PR's central DXIL → dxil-spirv → Vulkan SPIR-V validation: dxil-spirv is not installed on this machine. The author’s published conversion results cover that path; I am not treating this Windows result as independent confirmation of it. AI use: Codex (GPT-6; exact variant unavailable) ran the tests and drafted this report; GPT-6.2 Astra Low reviewed the current source and scope.

<!-- greyfinch-sync:ivall/xcl:comment:7177252508 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082#issuecomment-7177252508). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-25T23:11:46Z. --- Independent native Windows check of [#2082 head `cab89ed5`](https://github.com/xcl-dev/xcl/commit/cab89ed546b2677b8c2fc419870efaf98724eb52). RTX 3080 Ti / driver 621.35, Ryzen 7 9800X3D, Windows 11 build 26300, rustc 1.99.1. The PR-head checkout was clean for these results. - `cargo test --offline --locked -p xcl --lib a_pointer_to_storage_is_made_again_in_each_block -- --test-threads=1 --nocapture`: **1 passed, 0 failed**. In a disposable control with *only* the new `Op::Gep` CSE arm removed, the same stock regression failed as intended: `[1, 0, 0]` versus `[1, 1, 0]`. I restored the checkout to the exact head before the suite. - `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4` on the clean head: **1,364 passed, 0 failed, 46 ignored** across 24 test binaries, with **25 explicit GPU skips** (21 no native wave64, 3 unsupported f16 forms, 1 no heap windows). The new regression ran and passed. I also merged that head without committing into [`main` `08db802`](https://github.com/xcl-dev/xcl/commit/08db8020d323bf478964fcc586152cce54959cfc), after the latest main merge. It merged without conflicts; the focused regression passed **1/0**, and the full workspace suite passed **1,430/0/47** across 37 binaries, with **25 explicit GPU skips** of the same categories. Those are integration-tree counts, separate from the clean-head counts. This run verifies the native regression and broader Windows GPU suite. I did **not** run the retail title or the PR's central DXIL → dxil-spirv → Vulkan SPIR-V validation: `dxil-spirv` is not installed on this machine. The author’s published conversion results cover that path; I am not treating this Windows result as independent confirmation of it. AI use: Codex (GPT-6; exact variant unavailable) ran the tests and drafted this report; GPT-6.2 Astra Low reviewed the current source and scope.
humsterbumster commented 2026-11-26 01:05:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by humsterbumster on 2026-11-26T00:37:32Z.


The split compute form emits valid SPIR-V here (Linux, RTX 5090, vkd3d-proton 3.2.0, direct
backend, retail title 1.0.2.1): with this change applied, the title's world load splits 145
compute programs into 1557 pieces with 0 invalid-SPIR-V reports in the whole run's log, and
the split form reaches the driver — 482 KB and 797 KB DXIL blobs compile (12-22 s each), and the
run goes on to the memory limit described in #1860 instead of failing to translate. No regression
seen on the graphics pipelines of the same run.

Not tested: Windows.

"ai": "omp (DeepSeek V4.1 Flash 1017)"

<!-- greyfinch-sync:ivall/xcl:comment:7178949266 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082#issuecomment-7178949266). Originally posted by [humsterbumster](https://github.com/humsterbumster) on 2026-11-26T00:37:32Z. --- **The split compute form emits valid SPIR-V here** (Linux, RTX 5090, vkd3d-proton 3.2.0, direct backend, retail title 1.0.2.1): with this change applied, the title's world load splits 145 compute programs into 1557 pieces with **0 invalid-SPIR-V reports in the whole run's log**, and the split form reaches the driver — 482 KB and 797 KB DXIL blobs compile (12-22 s each), and the run goes on to the memory limit described in #1860 instead of failing to translate. No regression seen on the graphics pipelines of the same run. Not tested: Windows. `"ai": "omp (DeepSeek V4.1 Flash 1017)"`
DavidM1911 commented 2026-11-26 08:04:38 +00:00 (Migrated from github.com)

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


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

<!-- greyfinch-sync:ivall/xcl:comment:7185499385 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082#issuecomment-7185499385). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T07:28:40Z. --- 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
upipibi commented 2026-11-26 23:13:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-26T23:13:42Z.


Tested head cab89ed546b2677b8c2fc419870efaf98724eb52, merge-base 2898511af1c038a2ef809719e9b6f89e5675c422, RTX 3070 (Ampere) driver 616.56, Windows 11, rustc 1.100.0

  • cargo test -p xcl --lib -- a_pointer_to_storage_is_made_again_in_each_block --test-threads=1 --nocapture, 3 runs on head: 1 passed, 0 failed (each run). The test is CPU-only (module optimizer), no GPU involved.
  • Negative control: the PR's new test applied alone to the merge-base (compiles, without the cse_kind arm): 0 passed, 1 failed (assert at opt.rs:1069).
  • cargo test -p xcl --lib -- --test-threads=4: head 1285 passed, 0 failed, 26 ignored; merge-base (unmodified) 1284 passed, 0 failed, 26 ignored.
  • SKIPPED lines (25, same set on both): 21 "no wave64" (32-lane waves only), 3 refused f16/conversion fixtures (#1426), 1 driver-cache test needing Windows Developer Mode.

Not tested: retail title; the dxil-spirv/vkd3d-proton (Linux) path the PR is about.

AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).

<!-- greyfinch-sync:ivall/xcl:comment:7205362686 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082#issuecomment-7205362686). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T23:13:42Z. --- Tested head `cab89ed546b2677b8c2fc419870efaf98724eb52`, merge-base `2898511af1c038a2ef809719e9b6f89e5675c422`, RTX 3070 (Ampere) driver 616.56, Windows 11, rustc 1.100.0 - `cargo test -p xcl --lib -- a_pointer_to_storage_is_made_again_in_each_block --test-threads=1 --nocapture`, 3 runs on head: 1 passed, 0 failed (each run). The test is CPU-only (module optimizer), no GPU involved. - Negative control: the PR's new test applied alone to the merge-base (compiles, without the `cse_kind` arm): 0 passed, 1 failed (assert at `opt.rs:1069`). - `cargo test -p xcl --lib -- --test-threads=4`: head 1285 passed, 0 failed, 26 ignored; merge-base (unmodified) 1284 passed, 0 failed, 26 ignored. - SKIPPED lines (25, same set on both): 21 "no wave64" (32-lane waves only), 3 refused f16/conversion fixtures (#1426), 1 driver-cache test needing Windows Developer Mode. Not tested: retail title; the dxil-spirv/vkd3d-proton (Linux) path the PR is about. AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).
JJAutoCompare commented 2026-11-27 00:20:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T00:20:31Z.


Tested: Clean cab89ed546b2677b8c2fc419870efaf98724eb52, Windows 11 build 26200, Ryzen 7 3800X, Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug. cargo test --offline --locked -j 2 -p xcl --lib --no-run, then straight_line_and_loop_kernels_validate on the test binary: 1 passed. With XCL_ADAPTER=A770 and XCL_SPLIT_WAVE64=1, the gpu_split_wave64_ and gpu_format_stores_atomics_global_lds filters gave 6 passed, 1 failed, 0 ignored, 0 skipped per backend (XCL_DIRECT_DXIL=0 and 1). The reduction-tail case, which uses v_add_f64, failed at CreateComputePipelineState with 0x80070057 in both modes. The same fixture and error were previously reported on this driver with FP64 unavailable (#1984). No parent comparison was made here.

Not tested: Wine/SPIR-V validation, retail titles, and the full workspace suite.

AI use: T3 Code / Codex (gpt-6.2-sol) ran and reran the checks and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7206379308 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082#issuecomment-7206379308). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-27T00:20:31Z. --- **Tested:** Clean `cab89ed546b2677b8c2fc419870efaf98724eb52`, Windows 11 build 26200, Ryzen 7 3800X, Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug. `cargo test --offline --locked -j 2 -p xcl --lib --no-run`, then `straight_line_and_loop_kernels_validate` on the test binary: 1 passed. With `XCL_ADAPTER=A770` and `XCL_SPLIT_WAVE64=1`, the `gpu_split_wave64_` and `gpu_format_stores_atomics_global_lds` filters gave **6 passed, 1 failed, 0 ignored, 0 skipped per backend** (`XCL_DIRECT_DXIL=0` and `1`). The reduction-tail case, which uses `v_add_f64`, failed at `CreateComputePipelineState` with `0x80070057` in both modes. The same fixture and error were previously reported on this driver with FP64 unavailable (#1984). No parent comparison was made here. **Not tested:** Wine/SPIR-V validation, retail titles, and the full workspace suite. **AI use:** T3 Code / Codex (`gpt-6.2-sol`) ran and reran the checks and wrote this report.
thehollowedone commented 2026-11-28 17:07:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T17:07:12Z.


merge-check
base: 10d272970f
head: cab89ed546
merge: clean
build: cargo build --offline --locked --workspace -> ok
tests: cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 -> 2,152 passed, 1 failed, 48 ignored across 39 binaries; 25 SKIPPED notices (not coverage). Failing: console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk (DXIL not compiled yet). The exact test also fails on clean base 10d2729 with the same error (cargo test --offline --locked -p xcl --lib console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk -- --test-threads=1 --nocapture: 0 passed, 1 failed). The PR's a_pointer_to_storage_is_made_again_in_each_block passed in the full suite.
review: no finding in the one-file diff. Nonconstant-storage GEPs now use the block-local CSE table; identical GEPs in one block still coalesce, while constant-global GEPs keep dominator CSE. This prevents the optimizer from carrying these pointer values between blocks and leaves the constant-global path unchanged. The regression keeps its two blocks separate under current simplify_cfg.
performance: more GEPs may be emitted across blocks, but the per-block table still removes duplicates within each block. The author measured 0.04% more DXIL in the affected compute corpus; I did not measure driver compile time or frame time.
verdict: safe to merge
hardware / tool and model: Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC, debug. Codex (GPT-6.2 Sol) reviewed the diff, ran the trial merge, build and tests, and wrote this check. The suite's one failure is reproduced on clean main. I did not run a title or Linux/SPIR-V conversion in this check.

<!-- greyfinch-sync:ivall/xcl:comment:7242768892 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082#issuecomment-7242768892). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-28T17:07:12Z. --- merge-check base: 10d272970f25b02b72ebe3c883d02d74d4d4763b head: cab89ed546b2677b8c2fc419870efaf98724eb52 merge: clean build: `cargo build --offline --locked --workspace` -> ok tests: `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4` -> 2,152 passed, 1 failed, 48 ignored across 39 binaries; 25 `SKIPPED` notices (not coverage). Failing: `console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk` (`DXIL not compiled yet`). The exact test also fails on clean base `10d2729` with the same error (`cargo test --offline --locked -p xcl --lib console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk -- --test-threads=1 --nocapture`: 0 passed, 1 failed). The PR's `a_pointer_to_storage_is_made_again_in_each_block` passed in the full suite. review: no finding in the one-file diff. Nonconstant-storage GEPs now use the block-local CSE table; identical GEPs in one block still coalesce, while constant-global GEPs keep dominator CSE. This prevents the optimizer from carrying these pointer values between blocks and leaves the constant-global path unchanged. The regression keeps its two blocks separate under current `simplify_cfg`. performance: more GEPs may be emitted across blocks, but the per-block table still removes duplicates within each block. The author measured 0.04% more DXIL in the affected compute corpus; I did not measure driver compile time or frame time. verdict: safe to merge hardware / tool and model: Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC, debug. Codex (GPT-6.2 Sol) reviewed the diff, ran the trial merge, build and tests, and wrote this check. The suite's one failure is reproduced on clean main. I did not run a title or Linux/SPIR-V conversion in this check.
throny commented 2026-11-28 17:20:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T17:20:39Z.


merge-check claim
head: cab89ed546

<!-- greyfinch-sync:ivall/xcl:comment:7242942763 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082#issuecomment-7242942763). Originally posted by [throny](https://github.com/throny) on 2026-11-28T17:20:39Z. --- merge-check claim head: cab89ed546b2677b8c2fc419870efaf98724eb52
throny commented 2026-11-28 17:23:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T17:23:56Z.


merge-check
base: 10d27297
head: cab89ed546
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2153 passed, 0 failed, 48 ignored (26 SKIPPED lines) on the merge result with main 10d27297; the PR's test a_pointer_to_storage_is_made_again_in_each_block passes there (the earlier report in the thread that it fails after merging is answered by this head). I did not run 10d27297 alone; with 0 failures that changes nothing.
review: read in full by me (one line of code and one test). Identical getelementptr instructions on storage that is not a constant global are now merged within a block only, no longer along the dominator tree; those on constant globals are merged as before. The result is the same program with a few more pointer instructions, so nothing can change for D3D12 on Windows; the gain is for translators that restructure the control flow, as the description and the Linux report in the thread say. The new arm stands before the general one, so it takes effect; the predicate follows a chain of such instructions back to the global.
performance: slightly larger DXIL for compute programs with shared storage; no measurable run-time effect expected, none measured. It changes the direct-DXIL translator only (opt-in with XCL_DIRECT_DXIL): testers who use that path re-translate once; the default HLSL path is untouched.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7242985590 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2082#issuecomment-7242985590). Originally posted by [throny](https://github.com/throny) on 2026-11-28T17:23:56Z. --- merge-check base: 10d27297 head: cab89ed546b2677b8c2fc419870efaf98724eb52 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2153 passed, 0 failed, 48 ignored (26 SKIPPED lines) on the merge result with main 10d27297; the PR's test a_pointer_to_storage_is_made_again_in_each_block passes there (the earlier report in the thread that it fails after merging is answered by this head). I did not run 10d27297 alone; with 0 failures that changes nothing. review: read in full by me (one line of code and one test). Identical getelementptr instructions on storage that is not a constant global are now merged within a block only, no longer along the dominator tree; those on constant globals are merged as before. The result is the same program with a few more pointer instructions, so nothing can change for D3D12 on Windows; the gain is for translators that restructure the control flow, as the description and the Linux report in the thread say. The new arm stands before the general one, so it takes effect; the predicate follows a chain of such instructions back to the global. performance: slightly larger DXIL for compute programs with shared storage; no measurable run-time effect expected, none measured. It changes the direct-DXIL translator only (opt-in with XCL_DIRECT_DXIL): testers who use that path re-translate once; the default HLSL path is untouched. verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

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