Direct DXIL: fix TG_SIZE wave rounding, alloca align=0, and shader fl… #2245

Closed
fixgep wants to merge 1 commit from upstream-pr/2255 into main
fixgep commented 2026-11-25 11:33:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fixgep on 2026-11-25T11:33:23Z.


Fixes three remaining direct DXIL encoder/flag bugs from #1894 and adds synthetic DXIL-validator unit tests across all five items (note: item 1 TG_SIZE div_ceil was already fixed on main in 5b31ca7, and item 5 heap_raw_buffer keeps Feature::RawAndStructuredBuffers omitted because dxil.dll 1.9.2602.17 rejects that flag on heap-only raw buffers with Flags must match usage: declared=1073741840, actual=1073741824, matching dxc.exe).

Fixes #1894

What is in it

  • crates/xcl/src/gpu/dxil/module.rs: scan live self.blocks.iter().flatten() instead of self.insts.iter() in uses_double_extensions so dead or unreachable f64 ops do not trigger Feature::DoubleExtensions.
  • crates/xcl/src/gpu/dxil/module.rs: encode Op::Alloca alignment 0 as 0 instead of 33 ((1 << 5) | 1, which set inalloca bit 5), and assert align == 0 || align.is_power_of_two().
  • crates/xcl/src/gpu/dxil/module.rs: share used_globals_and_funcs between write_bitcode and global_bytes_layout so stripped/unreferenced TGSM globals are excluded from PSV0 NumBytesGroupSharedMemory.
  • crates/xcl/src/gpu/dxil/module.rs, crates/xcl/src/gpu/dxil/core_tests.rs, crates/xcl/src/gpu/dxil/graphics_tests.rs, crates/xcl/src/gpu/dxil/shader.rs: add synthetic unit and dxil.dll validation tests for all five #1894 items, and update groupshared_bytes_follow_the_16bit_layout so its test globals are referenced by live instructions.

Tested

  • Hardware & toolchain: NVIDIA GeForce RTX 3060 (driver 591.44), AMD Ryzen 5 7500F, Windows 11 Pro (build 26200), rustc 1.100.0 (0ef1bc386 2026-11-09), debug (cargo build / cargo test) and release (cargo build --release -p xcl + scripts/smoke.ps1), Windows SDK dxcompiler 1.9.2602.17 / dxil 1.9.2602.17.
  • cargo build --workspace: 0 new warnings (3 pre-existing warnings outside gpu/dxil).
  • cargo test -p xcl --lib gpu::dxil -- --test-threads=4 --skip fuzz_validate_and_gpu: 186 passed, 0 failed, 3 ignored; 1 SKIPPED (gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole: no wave64).
  • XCL_ADAPTER=warp cargo test -p xcl --lib gpu::dxil -- --test-threads=4 --skip fuzz_validate_and_gpu: 186 passed, 0 failed, 3 ignored (GPU execution tests skipped on WARP).

Regression run

main:


xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3060
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1552 (PresentX 1553)
presents per 2 s (last 3): 60 61 61
device removals: 0
crashes: 0
peak commit: 14565 MB

PR:


xcl-smoke v1
commit: f43fa7fbc388d44a27294bdadc2dd36b20dc2e15
gpu: NVIDIA GeForce RTX 3060
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1257 (PresentX 1257)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14052 MB

Not tested

  • Full cargo test --workspace -- --test-threads=4 and fuzz_validate_and_gpu after the rebase onto upstream/main (b49be183).
  • AMD or Intel GPUs, and native wave64 hardware (no wave64 on RTX 3060).
  • The retail smoke title does not exercise every modified DXIL path (e.g. Alloca align=0, dead f64 extension ops, or Mesh shader stripped TGSM).

AI use

  • Antigravity (Gemini 4 Hydrogen): audited the five sites in #1894, wrote the synthetic tests and fixes, rebased onto upstream/main (b49be183), ran the build, targeted DXIL tests, and smoke checks, and updated this PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5490527165 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2255). Originally posted by [fixgep](https://github.com/fixgep) on 2026-11-25T11:33:23Z. --- Fixes three remaining direct DXIL encoder/flag bugs from #1894 and adds synthetic DXIL-validator unit tests across all five items (note: item 1 `TG_SIZE` `div_ceil` was already fixed on `main` in `5b31ca7`, and item 5 `heap_raw_buffer` keeps `Feature::RawAndStructuredBuffers` omitted because `dxil.dll` 1.9.2602.17 rejects that flag on heap-only raw buffers with `Flags must match usage: declared=1073741840, actual=1073741824`, matching `dxc.exe`). Fixes #1894 **What is in it** - `crates/xcl/src/gpu/dxil/module.rs`: scan live `self.blocks.iter().flatten()` instead of `self.insts.iter()` in `uses_double_extensions` so dead or unreachable `f64` ops do not trigger `Feature::DoubleExtensions`. - `crates/xcl/src/gpu/dxil/module.rs`: encode `Op::Alloca` alignment `0` as `0` instead of `33` (`(1 << 5) | 1`, which set `inalloca` bit 5), and assert `align == 0 || align.is_power_of_two()`. - `crates/xcl/src/gpu/dxil/module.rs`: share `used_globals_and_funcs` between `write_bitcode` and `global_bytes_layout` so stripped/unreferenced TGSM globals are excluded from `PSV0` `NumBytesGroupSharedMemory`. - `crates/xcl/src/gpu/dxil/module.rs`, `crates/xcl/src/gpu/dxil/core_tests.rs`, `crates/xcl/src/gpu/dxil/graphics_tests.rs`, `crates/xcl/src/gpu/dxil/shader.rs`: add synthetic unit and `dxil.dll` validation tests for all five #1894 items, and update `groupshared_bytes_follow_the_16bit_layout` so its test globals are referenced by live instructions. **Tested** - Hardware & toolchain: NVIDIA GeForce RTX 3060 (driver `591.44`), AMD Ryzen 5 7500F, Windows 11 Pro (build `26200`), `rustc 1.100.0 (0ef1bc386 2026-11-09)`, debug (`cargo build` / `cargo test`) and release (`cargo build --release -p xcl` + `scripts/smoke.ps1`), Windows SDK `dxcompiler 1.9.2602.17` / `dxil 1.9.2602.17`. - `cargo build --workspace`: 0 new warnings (3 pre-existing warnings outside `gpu/dxil`). - `cargo test -p xcl --lib gpu::dxil -- --test-threads=4 --skip fuzz_validate_and_gpu`: 186 passed, 0 failed, 3 ignored; 1 `SKIPPED` (`gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole: no wave64`). - `XCL_ADAPTER=warp cargo test -p xcl --lib gpu::dxil -- --test-threads=4 --skip fuzz_validate_and_gpu`: 186 passed, 0 failed, 3 ignored (GPU execution tests skipped on WARP). **Regression run** main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3060 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1552 (PresentX 1553) presents per 2 s (last 3): 60 61 61 device removals: 0 crashes: 0 peak commit: 14565 MB ``` PR: ``` xcl-smoke v1 commit: f43fa7fbc388d44a27294bdadc2dd36b20dc2e15 gpu: NVIDIA GeForce RTX 3060 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1257 (PresentX 1257) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14052 MB ``` **Not tested** - Full `cargo test --workspace -- --test-threads=4` and `fuzz_validate_and_gpu` after the rebase onto `upstream/main` (`b49be183`). - AMD or Intel GPUs, and native wave64 hardware (`no wave64` on RTX 3060). - The retail smoke title does not exercise every modified DXIL path (e.g. `Alloca align=0`, dead `f64` extension ops, or Mesh shader stripped TGSM). **AI use** - Antigravity (Gemini 4 Hydrogen): audited the five sites in #1894, wrote the synthetic tests and fixes, rebased onto `upstream/main` (`b49be183`), ran the build, targeted DXIL tests, and smoke checks, and updated this PR description.
throny commented 2026-11-25 15:08:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-25T14:54:01Z.


Two contributors checked independently and found that #1952 #2227 solves the same problem (for #1894) in a different way: #1607, group D73. 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.

<!-- greyfinch-sync:ivall/xcl:comment:7165989728 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2255#issuecomment-7165989728). Originally posted by [throny](https://github.com/throny) on 2026-11-25T14:54:01Z. --- <!-- xcl-1607-hint:D73 --> Two contributors checked independently and found that #1952 #2227 solves the same problem (for #1894) in a different way: #1607, group D73. 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.
DavidM1911 commented 2026-11-25 17:07:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T16:58:45Z.


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

  • cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7168818247 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2255#issuecomment-7168818247). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T16:58:45Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun. Thanks!
Aniseto commented 2026-11-25 18:04:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-25T18:01:46Z.


Ran the direct-DXIL tests at fb9e401:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC/DXIL 1.9.2609.5, debug build.

XCL_ADAPTER=nvidia cargo test -p xcl --lib gpu::dxil -- --test-threads=4 --skip fuzz_validate_and_gpu
124 passed; 0 failed; 3 ignored; 1003 filtered out      (exit 0)

All five new tests for #1894 pass here: compute_tg_size_wave_count_rounds_up_partial_waves, alloca_align_zero_encodes_without_inalloca_and_validates, dead_f64_inst_does_not_set_double_extensions, dead_tgsm_global_does_not_inflate_psv0_size_and_validates and heap_raw_buffer_omits_static_raw_flag_and_validates.

What this adds: the author's run was an Ampere RTX 3060 with Windows SDK DXC/DXIL 1.9.2602.17; this is a Blackwell wave32 part with DXC/DXIL 1.9.2609.5, so the DXIL validator sees a different driver and toolchain.

Not tested: a paired 60 s smoke run, AMD and Intel GPUs, native wave64, release profile, retail title data. The four gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_* tests were skipped in the run above: when I ran the filter without --skip they failed here with CreateComputePipelineState ... 0x8007000E (out of memory). I did not check that failure on the base commit, so I am not attributing it to this PR.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

<!-- greyfinch-sync:ivall/xcl:comment:7170337834 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2255#issuecomment-7170337834). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-25T18:01:46Z. --- Ran the direct-DXIL tests at `fb9e401`: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC/DXIL 1.9.2609.5, debug build. ``` XCL_ADAPTER=nvidia cargo test -p xcl --lib gpu::dxil -- --test-threads=4 --skip fuzz_validate_and_gpu 124 passed; 0 failed; 3 ignored; 1003 filtered out (exit 0) ``` All five new tests for #1894 pass here: `compute_tg_size_wave_count_rounds_up_partial_waves`, `alloca_align_zero_encodes_without_inalloca_and_validates`, `dead_f64_inst_does_not_set_double_extensions`, `dead_tgsm_global_does_not_inflate_psv0_size_and_validates` and `heap_raw_buffer_omits_static_raw_flag_and_validates`. What this adds: the author's run was an Ampere RTX 3060 with Windows SDK DXC/DXIL 1.9.2602.17; this is a Blackwell wave32 part with DXC/DXIL 1.9.2609.5, so the DXIL validator sees a different driver and toolchain. Not tested: a paired 60 s smoke run, AMD and Intel GPUs, native wave64, release profile, retail title data. The four `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_*` tests were skipped in the run above: when I ran the filter without `--skip` they failed here with `CreateComputePipelineState ... 0x8007000E` (out of memory). I did not check that failure on the base commit, so I am not attributing it to this PR. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
upstream-sync closed this pull request 2026-11-25 23:08:10 +00:00
CalvyPZ commented 2026-11-25 23:09:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CalvyPZ on 2026-11-25T22:43:45Z.


This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why.

<!-- greyfinch-sync:ivall/xcl:comment:7176717450 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2255#issuecomment-7176717450). Originally posted by [CalvyPZ](https://github.com/CalvyPZ) on 2026-11-25T22:43:45Z. --- This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why.
upstream-sync reopened this pull request 2026-11-26 00:04:55 +00:00
Decodere commented 2026-11-27 07:32:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T07:32:27Z.


Independent desktop NVIDIA verification of PR #2255 at head f43fa7fbc388d44a27294bdadc2dd36b20dc2e15 (1 commit; exact parent & merge-base: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12, Wave32-only Ada), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (f43fa7fb)

Command Result
cargo test --release -p xcl --lib compute_tg_size_wave_count_rounds_up_partial_waves -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1341 filtered out × 3 (0.25s, 0.21s, 0.22s, 0 skipped; live RTX 4060 execution)
cargo test --release -p xcl --lib dead_f64_inst_does_not_set_double_extensions -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1341 filtered out × 3 (0.00s × 3, 0 skipped)
cargo test --release -p xcl --lib alloca_align_zero_encodes_without_inalloca_and_validates -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1341 filtered out × 3 (0.00s × 3, 0 skipped)
cargo test --release -p xcl --lib alloca_non_power_of_two_align_panics -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1341 filtered out × 3 (0.00s × 3, 0 skipped)
cargo test --release -p xcl --lib dead_tgsm_global_does_not_inflate_psv0_size_and_validates -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1341 filtered out × 3 (0.00s × 3, 0 skipped)
cargo test --release -p xcl --lib heap_raw_buffer_omits_static_raw_flag_and_validates -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1341 filtered out × 3 (0.00s, 0.01s, 0.01s, 0 skipped)
cargo test --release -p xcl --lib gpu::dxil:: -- --test-threads=4 (3 consecutive runs) 190 passed; 0 failed; 3 ignored; 1149 filtered out × 3 (4.34s, 4.65s, 4.28s; 1 self-skipped: gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole — no wave64 on Wave32-only Ada; 189 executed)
cargo build --release -p xcl Clean build (1m 26s, exit 0, 0 new warnings)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, cached baseline on the same machine):

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1518 (PresentX 1518)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14018 MB

PR #2255 (f43fa7fbc388d44a27294bdadc2dd36b20dc2e15):

xcl-smoke v1
commit: f43fa7fbc388d44a27294bdadc2dd36b20dc2e15
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1541 (PresentX 1541)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14006 MB

Runtime log observations (xcl.log)

  • 9220 log lines, 0 [ERROR] / device-removal / panic lines (dxil_cache: 460 hits, 0 misses, 0 compilation failures; 228 background pipelines, 0 failures).
  • Final draw/memory telemetry in log: 19228 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 14005 MB committed by the process; video memory 6116 MB local, 4683 MB non-local.

Limits of coverage

  • Partial-wave TG_SIZE rounding, alloca align=0 bitcode encoding & non-power-of-two rejection, dead f64/TGSM shader-flag/PSV0 exclusion, and heap raw-buffer flag omission were directly verified via all 6 new tests (including live RTX 4060 execution and dxil.dll validation, 3/3 each) and gpu::dxil:: (189 executed, 0 failed, 1 Wave64-only test self-skipped on Wave32-only Ada).
  • The 60 s retail smoke confirms zero runtime regression on title: 29640639 (single-run frame/commit delta vs. cached parent reflects normal startup variance, not this PR).

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7212572228 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2255#issuecomment-7212572228). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T07:32:27Z. --- Independent desktop NVIDIA verification of **PR #2255** at head `f43fa7fbc388d44a27294bdadc2dd36b20dc2e15` (`1` commit; exact parent & merge-base: `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12, Wave32-only Ada), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted release tests & build (`f43fa7fb`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib compute_tg_size_wave_count_rounds_up_partial_waves -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1341 filtered out` × 3 (`0.25s`, `0.21s`, `0.22s`, `0` skipped; live RTX 4060 execution) | | `cargo test --release -p xcl --lib dead_f64_inst_does_not_set_double_extensions -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1341 filtered out` × 3 (`0.00s` × 3, `0` skipped) | | `cargo test --release -p xcl --lib alloca_align_zero_encodes_without_inalloca_and_validates -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1341 filtered out` × 3 (`0.00s` × 3, `0` skipped) | | `cargo test --release -p xcl --lib alloca_non_power_of_two_align_panics -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1341 filtered out` × 3 (`0.00s` × 3, `0` skipped) | | `cargo test --release -p xcl --lib dead_tgsm_global_does_not_inflate_psv0_size_and_validates -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1341 filtered out` × 3 (`0.00s` × 3, `0` skipped) | | `cargo test --release -p xcl --lib heap_raw_buffer_omits_static_raw_flag_and_validates -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1341 filtered out` × 3 (`0.00s`, `0.01s`, `0.01s`, `0` skipped) | | `cargo test --release -p xcl --lib gpu::dxil:: -- --test-threads=4` (3 consecutive runs) | `190 passed; 0 failed; 3 ignored; 1149 filtered out` × 3 (`4.34s`, `4.65s`, `4.28s`; `1` self-skipped: `gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole` — `no wave64` on Wave32-only Ada; `189` executed) | | `cargo build --release -p xcl` | Clean build (`1m 26s`, exit `0`, `0` new warnings) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact parent & merge-base (`b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`, cached baseline on the same machine): ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1518 (PresentX 1518) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14018 MB ``` PR #2255 (`f43fa7fbc388d44a27294bdadc2dd36b20dc2e15`): ``` xcl-smoke v1 commit: f43fa7fbc388d44a27294bdadc2dd36b20dc2e15 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1541 (PresentX 1541) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14006 MB ``` ### Runtime log observations (`xcl.log`) - `9220` log lines, `0` `[ERROR]` / device-removal / panic lines (`dxil_cache`: `460` hits, `0` misses, `0` compilation failures; `228` background pipelines, `0` failures). - Final draw/memory telemetry in log: `19228 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped)`; last memory sample `14005 MB committed by the process; video memory 6116 MB local, 4683 MB non-local`. ### Limits of coverage - Partial-wave `TG_SIZE` rounding, `alloca` `align=0` bitcode encoding & non-power-of-two rejection, dead `f64`/TGSM shader-flag/PSV0 exclusion, and heap raw-buffer flag omission were directly verified via all 6 new tests (including live RTX 4060 execution and `dxil.dll` validation, `3/3` each) and `gpu::dxil::` (`189` executed, `0` failed, `1` Wave64-only test self-skipped on Wave32-only Ada). - The 60 s retail smoke confirms zero runtime regression on `title: 29640639` (single-run frame/commit delta vs. cached parent reflects normal startup variance, not this PR). *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
futurepro62 commented 2026-11-27 17:55:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-27T17:55:15Z.


NVIDIA and AMD full-suite run, to go with the reports above by Decodere, since none of them covers AMD. Tested exact head f43fa7fb (on its base b49be18).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1429 passed, 0 failed, 45 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, dispatch_chain_native_wave64_builds_whole, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: compute_tg_size_wave_count_rounds_up_partial_waves, dead_f64_inst_does_not_set_double_extensions, alloca_align_zero_encodes_without_inalloca_and_validates, alloca_non_power_of_two_align_panics, dead_tgsm_global_does_not_inflate_psv0_size_and_validates, heap_raw_buffer_omits_static_raw_flag_and_validates.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1440 passed, 0 failed, 47 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 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))), 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))), 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))), 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).
  • --skip leaves out tests that fail on main 6089122a too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7224927318 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2255#issuecomment-7224927318). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-27T17:55:15Z. --- NVIDIA and AMD full-suite run, to go with the reports above by Decodere, since none of them covers AMD. Tested exact head `f43fa7fb` (on its base `b49be18`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **1429 passed, 0 failed, 45 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `dispatch_chain_native_wave64_builds_whole`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - The new tests ran and passed: `compute_tg_size_wave_count_rounds_up_partial_waves`, `dead_f64_inst_does_not_set_double_extensions`, `alloca_align_zero_encodes_without_inalloca_and_validates`, `alloca_non_power_of_two_align_panics`, `dead_tgsm_global_does_not_inflate_psv0_size_and_validates`, `heap_raw_buffer_omits_static_raw_flag_and_validates`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **1440 passed, 0 failed, 47 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `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))), `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))), `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))), `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). - `--skip` leaves out tests that fail on main `6089122a` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Foniass commented 2026-12-01 07:41:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:41:05Z.


Triage (#1607) – head f43fa7f

This makes the same #1894 fixes as #2227, which was opened first:

  • module.rs Op::Alloca: the same if *align == 0 { 0 } encoding.
  • module.rs: the same used-globals/funcs helper split out of to_bitcode.
  • Mesh PSV0 groupshared bytes now count only live globals.

Your uses_double_extensions change is already on main, which scans self.blocks.iter().flatten(). #2227 goes further: it scans only reachable blocks, also in insts_use_type / has_rov_handle, and drops the RawAndStructuredBuffers flag in heap_raw_buffer_uav. The new heap_raw_buffer and TG_SIZE tests check behaviour main already has (5b31ca7). The only extra in this PR is the power-of-two assert on alloca alignment.
Recommendation: close (duplicate of #2227).

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304356121 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2255#issuecomment-7304356121). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:41:05Z. --- **Triage (#1607)** – head f43fa7f This makes the same #1894 fixes as #2227, which was opened first: - `module.rs` `Op::Alloca`: the same `if *align == 0 { 0 }` encoding. - `module.rs`: the same used-globals/funcs helper split out of `to_bitcode`. - Mesh PSV0 groupshared bytes now count only live globals. Your `uses_double_extensions` change is already on main, which scans `self.blocks.iter().flatten()`. #2227 goes further: it scans only reachable blocks, also in `insts_use_type` / `has_rov_handle`, and drops the `RawAndStructuredBuffers` flag in `heap_raw_buffer_uav`. The new `heap_raw_buffer` and TG_SIZE tests check behaviour main already has (5b31ca7). The only extra in this PR is the power-of-two assert on alloca alignment. Recommendation: close (duplicate of #2227). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

Pull request closed

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

No due date set.

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