Direct DXIL: reject invalid stage exports and graphics LDS ops #2092

Merged
Decodere merged 1 commit from upstream-pr/2102 into main 2026-11-29 13:59:35 +00:00
Decodere commented 2026-11-25 04:13:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T04:13:53Z.


What is in it
Matches the HLSL recompiler's stage guards (recomp/emit.rs) in the direct DXIL translator's Lw::export() and Lw::ds() (crates/xcl/src/gpu/dxil/lower_mem.rs):

  • In Lw::export(): after dispatching Entry::Mesh (self.mesh.is_some()) and Entry::Vertex / Entry::Pixel (self.gfx.is_some()), rejects Entry::Compute (self.res.is_none()) and Entry::Geometry (self.geom.is_some()) with err(d, "export target") before reaching the kernel-mode KERNEL_EXPORTS store path. Previously, ENC_EXP in Entry::Compute panicked on self.res.expect("res") when EN != 0 and silently returned Ok(()) when EN == 0, while ENC_EXP in Entry::Geometry silently wrote kernel-export offsets into the geometry mesh-record UAV (u1).
  • In Lw::ds(): after handling wave-level ds_swizzle_b32 and ds_bpermute_b32 (with ds_nop already skipped in NOOPS), rejects LDS ENC_DS operations in Entry::Vertex and Entry::Pixel (self.gfx.is_some()) with err(d, "LDS outside compute") before GDS / LDS lowering. Previously, direct DXIL emitted invalid addrspace(3) TGSM ops in graphics stages and returned Ok.
  • Adds 4 unit tests in gpu::dxil::lower_mem::stage_guard_tests covering compute EXP (EN = 0xF and EN = 0, wave32 and wave64), geometry EXP (EN = 0xF and EN = 0, ES-only and GS-only, native and split), VS/PS LDS ops (DS_READ_B32, DS_WRITE_B32, and GDS = 1), and positive dxil.dll validation controls for kernel EXP, compute LDS, and VS/PS DS_SWIZZLE_B32 / DS_BPERMUTE_B32 / DS_NOP + valid EXP.

Part of #1269

Tested
Environment: Windows 11 Home 26200, Intel Core i5-11400F, 32 GB RAM, NVIDIA GeForce RTX 4060 8 GB (driver 621.14, wave32), Rust 1.100.0, DXC 1.9.2609.5 (01b62ad4).

  • Failing-first pre-fix check (cargo test -j 4 -p xcl --lib gpu::dxil::lower_mem::stage_guard_tests -- --nocapture): 1 passed, 3 failed (compute_export_rejected panicked at lower_mem.rs:2511:28: res -> "the direct DXIL translator panicked: res"; geometry_export_rejected and graphics_lds_rejected unexpectedly succeeded; valid_stage_ops_still_translate_and_validate passed).
  • Post-fix targeted tests (cargo test --release -p xcl --lib gpu::dxil::lower_mem::stage_guard_tests -- --nocapture): 4 passed, 0 failed (including dxil 1.9.2609.5 validation of positive controls).
  • Full release workspace build & test (cargo build --release --workspace and cargo test --release --workspace -- --test-threads=4 --nocapture): 1,158 passed, 0 failed, 46 ignored across 21 test binaries (1102 in xcl lib, 56 across the remaining 20 binaries), with 27 SKIPPED lines on this RTX 4060:
    • 20 no wave64 (RTX 4060 is wave32-only)
    • 3 per-lane form: refused (wave32 f16 arithmetic, f16 packed, f32 conversions)
    • 2 no d3d12SDKLayers.dll / no D3D12 debug layer
    • 1 cannot disable the driver cache (Windows Developer Mode not enabled)
    • 1 no heap windows

Regression run
Paired 60 s runs via scripts/smoke.ps1 on clean origin/main (cbc296ab) and clean PR head (00b5eef7):

Main (cbc296ab65a2661a61e3e2da109134bcd5319f60):

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

PR (00b5eef722359d70fd2549a12a5f87edb9b154f5):

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

Not tested

  • Native wave64 GPU execution (20 no wave64 skips on RTX 4060), D3D12 debug layer tests (2 skips without d3d12SDKLayers.dll), driver cache disable toggle (1 skip without Windows Developer Mode), and heap-window OOM fallback (1 skip without XCL_HEAP_WINDOWS).
  • Retail titles other than title: 29640639 (and runtime title execution specifically exercising malformed compute/geometry EXP or graphics LDS shaders under XCL_DIRECT_DXIL).

AI use
Google Antigravity (Gemini 4 Neon) wrote the stage guards, unit tests, and this PR description. All pre-fix/post-fix unit tests, full release workspace tests, paired 60 s smoke runs, and scripts/pr_check.py --local validation were run locally on this machine.

<!-- greyfinch-sync:ivall/xcl:issue:5485049138 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2102). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-25T04:13:53Z. --- **What is in it** Matches the HLSL recompiler's stage guards (`recomp/emit.rs`) in the direct DXIL translator's `Lw::export()` and `Lw::ds()` (`crates/xcl/src/gpu/dxil/lower_mem.rs`): - In `Lw::export()`: after dispatching `Entry::Mesh` (`self.mesh.is_some()`) and `Entry::Vertex` / `Entry::Pixel` (`self.gfx.is_some()`), rejects `Entry::Compute` (`self.res.is_none()`) and `Entry::Geometry` (`self.geom.is_some()`) with `err(d, "export target")` before reaching the kernel-mode `KERNEL_EXPORTS` store path. Previously, `ENC_EXP` in `Entry::Compute` panicked on `self.res.expect("res")` when `EN != 0` and silently returned `Ok(())` when `EN == 0`, while `ENC_EXP` in `Entry::Geometry` silently wrote kernel-export offsets into the geometry mesh-record UAV (`u1`). - In `Lw::ds()`: after handling wave-level `ds_swizzle_b32` and `ds_bpermute_b32` (with `ds_nop` already skipped in `NOOPS`), rejects LDS `ENC_DS` operations in `Entry::Vertex` and `Entry::Pixel` (`self.gfx.is_some()`) with `err(d, "LDS outside compute")` before `GDS` / LDS lowering. Previously, direct DXIL emitted invalid `addrspace(3)` TGSM ops in graphics stages and returned `Ok`. - Adds 4 unit tests in `gpu::dxil::lower_mem::stage_guard_tests` covering compute `EXP` (`EN = 0xF` and `EN = 0`, wave32 and wave64), geometry `EXP` (`EN = 0xF` and `EN = 0`, ES-only and GS-only, native and split), VS/PS LDS ops (`DS_READ_B32`, `DS_WRITE_B32`, and `GDS = 1`), and positive `dxil.dll` validation controls for kernel `EXP`, compute LDS, and VS/PS `DS_SWIZZLE_B32` / `DS_BPERMUTE_B32` / `DS_NOP` + valid `EXP`. Part of #1269 **Tested** Environment: Windows 11 Home 26200, Intel Core i5-11400F, 32 GB RAM, NVIDIA GeForce RTX 4060 8 GB (driver 621.14, wave32), Rust 1.100.0, DXC `1.9.2609.5` (`01b62ad4`). - Failing-first pre-fix check (`cargo test -j 4 -p xcl --lib gpu::dxil::lower_mem::stage_guard_tests -- --nocapture`): 1 passed, 3 failed (`compute_export_rejected` panicked at `lower_mem.rs:2511:28: res` -> `"the direct DXIL translator panicked: res"`; `geometry_export_rejected` and `graphics_lds_rejected` unexpectedly succeeded; `valid_stage_ops_still_translate_and_validate` passed). - Post-fix targeted tests (`cargo test --release -p xcl --lib gpu::dxil::lower_mem::stage_guard_tests -- --nocapture`): 4 passed, 0 failed (including `dxil 1.9.2609.5` validation of positive controls). - Full release workspace build & test (`cargo build --release --workspace` and `cargo test --release --workspace -- --test-threads=4 --nocapture`): 1,158 passed, 0 failed, 46 ignored across 21 test binaries (`1102` in `xcl` lib, `56` across the remaining 20 binaries), with 27 `SKIPPED` lines on this RTX 4060: - 20 `no wave64` (RTX 4060 is wave32-only) - 3 `per-lane form: refused` (wave32 f16 arithmetic, f16 packed, f32 conversions) - 2 `no d3d12SDKLayers.dll` / `no D3D12 debug layer` - 1 `cannot disable the driver cache` (Windows Developer Mode not enabled) - 1 `no heap windows` **Regression run** Paired 60 s runs via `scripts/smoke.ps1` on clean `origin/main` (`cbc296ab`) and clean PR head (`00b5eef7`): Main (`cbc296ab65a2661a61e3e2da109134bcd5319f60`): ``` xcl-smoke v1 commit: cbc296ab65a2661a61e3e2da109134bcd5319f60 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1591 (PresentX 1591) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14478 MB ``` PR (`00b5eef722359d70fd2549a12a5f87edb9b154f5`): ``` xcl-smoke v1 commit: 00b5eef722359d70fd2549a12a5f87edb9b154f5 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1589 (PresentX 1589) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14486 MB ``` **Not tested** - Native wave64 GPU execution (20 `no wave64` skips on RTX 4060), D3D12 debug layer tests (2 skips without `d3d12SDKLayers.dll`), driver cache disable toggle (1 skip without Windows Developer Mode), and heap-window OOM fallback (1 skip without `XCL_HEAP_WINDOWS`). - Retail titles other than `title: 29640639` (and runtime title execution specifically exercising malformed compute/geometry `EXP` or graphics LDS shaders under `XCL_DIRECT_DXIL`). **AI use** Google Antigravity (Gemini 4 Neon) wrote the stage guards, unit tests, and this PR description. All pre-fix/post-fix unit tests, full release workspace tests, paired 60 s smoke runs, and `scripts/pr_check.py --local` validation were run locally on this machine.
futurepro62 commented 2026-11-25 06:05:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-25T05:16:32Z.


Full-suite run, since this PR has no test report yet. Tested exact head 00b5eef (on its base cbc296a).

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 -- --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: 1146 passed, 0 failed, 44 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, 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_export_rejected, geometry_export_rejected, graphics_lds_rejected, valid_stage_ops_still_translate_and_validate.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1157 passed, 0 failed, 46 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 6020a33 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:7153613597 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2102#issuecomment-7153613597). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-25T05:16:32Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `00b5eef` (on its base `cbc296a`). **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 -- --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`: **1146 passed, 0 failed, 44 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`, `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_export_rejected`, `geometry_export_rejected`, `graphics_lds_rejected`, `valid_stage_ops_still_translate_and_validate`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **1157 passed, 0 failed, 46 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 `6020a33` 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.
DavidM1911 commented 2026-11-25 06:06:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T06:02:37Z.


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:7154382981 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2102#issuecomment-7154382981). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T06:02:37Z. --- 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!
upipibi commented 2026-11-26 23:18:33 +00:00 (Migrated from github.com)

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


Tested head 00b5eef722359d70fd2549a12a5f87edb9b154f5, merge-base cbc296ab65a2661a61e3e2da109134bcd5319f60, RTX 3070 (Ampere) driver 616.56, Windows 11, rustc 1.100.0

  • cargo test -p xcl --lib -- stage_guard_tests --test-threads=1 --nocapture, 3 runs on head: 4 passed, 0 failed (each run).
  • Negative control: the PR's stage_guard_tests module appended alone to the merge-base's lower_mem.rs (compiles, without the two guards): 1 passed, 3 failed (compute_export_rejected, geometry_export_rejected, graphics_lds_rejected; the compute export case panics in the translator on res). valid_stage_ops_still_translate_and_validate passes there.
  • cargo test -p xcl --lib -- --test-threads=4: head 1102 passed, 0 failed, 26 ignored; merge-base (unmodified) 1098 passed, 0 failed, 26 ignored.
  • SKIPPED lines (24, same set on both): 20 "no wave64" (32-lane waves only), 3 refused f16/conversion fixtures (#1426), 1 driver-cache test needing Windows Developer Mode.

Not tested: retail title; AMD hardware.

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

<!-- greyfinch-sync:ivall/xcl:comment:7205432379 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2102#issuecomment-7205432379). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T23:18:33Z. --- Tested head `00b5eef722359d70fd2549a12a5f87edb9b154f5`, merge-base `cbc296ab65a2661a61e3e2da109134bcd5319f60`, RTX 3070 (Ampere) driver 616.56, Windows 11, rustc 1.100.0 - `cargo test -p xcl --lib -- stage_guard_tests --test-threads=1 --nocapture`, 3 runs on head: 4 passed, 0 failed (each run). - Negative control: the PR's `stage_guard_tests` module appended alone to the merge-base's `lower_mem.rs` (compiles, without the two guards): 1 passed, 3 failed (`compute_export_rejected`, `geometry_export_rejected`, `graphics_lds_rejected`; the compute export case panics in the translator on `res`). `valid_stage_ops_still_translate_and_validate` passes there. - `cargo test -p xcl --lib -- --test-threads=4`: head 1102 passed, 0 failed, 26 ignored; merge-base (unmodified) 1098 passed, 0 failed, 26 ignored. - SKIPPED lines (24, same set on both): 20 "no wave64" (32-lane waves only), 3 refused f16/conversion fixtures (#1426), 1 driver-cache test needing Windows Developer Mode. Not tested: retail title; AMD hardware. AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).
JJAutoCompare commented 2026-11-27 00:15:21 +00:00 (Migrated from github.com)

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


Tested: Clean 00b5eef722359d70fd2549a12a5f87edb9b154f5, Windows 11 build 26200, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC, DXC/DXIL 1.9.2602.17, debug. Built with cargo test --locked -j 2 -p xcl --lib --no-run and ran the resulting executable with --exact --test-threads=1 --nocapture under the shared Arc lock. With XCL_ADAPTER=A770 and XCL_DIRECT_DXIL=1, 7 passed across graphics linking/branches, pixel survival, geometry records, mesh pass-through, compute LDS, and lane swizzle/bpermute. With XCL_DIRECT_DXIL=0, 3 passed on the same mesh, compute LDS and lane-operation controls. Both runs had 0 failures, ignores or skips. The binary hash matched before and after each run.

Not tested: Native wave64 execution, the full workspace suite, retail smoke, and on-device execution of the exact VS/PS wave-DS validator fixture.

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

<!-- greyfinch-sync:ivall/xcl:comment:7206307179 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2102#issuecomment-7206307179). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-27T00:15:21Z. --- **Tested:** Clean `00b5eef722359d70fd2549a12a5f87edb9b154f5`, Windows 11 build 26200, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC, DXC/DXIL 1.9.2602.17, debug. Built with `cargo test --locked -j 2 -p xcl --lib --no-run` and ran the resulting executable with `--exact --test-threads=1 --nocapture` under the shared Arc lock. With `XCL_ADAPTER=A770` and `XCL_DIRECT_DXIL=1`, **7 passed** across graphics linking/branches, pixel survival, geometry records, mesh pass-through, compute LDS, and lane swizzle/bpermute. With `XCL_DIRECT_DXIL=0`, **3 passed** on the same mesh, compute LDS and lane-operation controls. Both runs had 0 failures, ignores or skips. The binary hash matched before and after each run. **Not tested:** Native wave64 execution, the full workspace suite, retail smoke, and on-device execution of the exact VS/PS wave-DS validator fixture. **AI use:** T3 Code / Codex (`gpt-6.2-sol`) ran and reran the GPU checks and wrote the report.
thehollowedone commented 2026-11-28 09:37:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T09:37:27Z.


merge-check
base: e429936c10
head: 00b5eef722
merge: clean
build: cargo build --offline --locked -j 4 --workspace -> ok
tests: cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4 -> 2,129 passed, 10 failed, 48 ignored; 25 GPU skip notices. The 10 failures match my earlier untouched-main run at this base: dispatch_chain_oversized_loop_matches_whole, dispatch_chain_wave32_live_loops, dispatch_chain_wave64_live_loops_and_exchange, gpu_heap_flat_reads_match_guarded_and_root_output, console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, gpu_compute_mode_dispatch_abi, gpu_float_cas_uses_ieee_equality, and the three test_title_* e2e cases (test_title_runs_and_game_folder_is_untouched, test_title_runs_under_the_debug_layer_with_dred, test_title_draws_with_a_root_signature_under_the_debug_layer). The four new stage_guard_tests passed separately (4 passed, 0 failed, 0 ignored, 0 skipped) with cargo test --offline --locked -j 4 -p xcl --lib gpu::dxil::lower_mem::stage_guard_tests -- --nocapture.
review: none. I read the full diff. The stage checks run before the kernel export path or graphics LDS lowering; existing wave-level DS operations and valid kernel/compute exports remain covered by the positive DXIL validation controls. The PR author also supplied a failing-first check and a clean-commit smoke pair on its head.
performance: reasoned only. These checks run during shader translation and add no work to a successfully translated frame. No frame-time or memory benchmark was run here.
verdict: safe to merge relative to the checked main base; the workspace suite remains red for the same 10 base failures.
hardware / tool and model: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, DXC 1.8.2502.11; Codex (GPT-6.2 Sol) reviewed the diff and ran these checks.

<!-- greyfinch-sync:ivall/xcl:comment:7237359941 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2102#issuecomment-7237359941). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-28T09:37:27Z. --- merge-check base: e429936c10a5b8aa09470ff99dfc8c8d3d8c56fd head: 00b5eef722359d70fd2549a12a5f87edb9b154f5 merge: clean build: `cargo build --offline --locked -j 4 --workspace` -> ok tests: `cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4` -> 2,129 passed, 10 failed, 48 ignored; 25 GPU skip notices. The 10 failures match my earlier untouched-main run at this base: `dispatch_chain_oversized_loop_matches_whole`, `dispatch_chain_wave32_live_loops`, `dispatch_chain_wave64_live_loops_and_exchange`, `gpu_heap_flat_reads_match_guarded_and_root_output`, `console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk`, `gpu_compute_mode_dispatch_abi`, `gpu_float_cas_uses_ieee_equality`, and the three `test_title_*` e2e cases (`test_title_runs_and_game_folder_is_untouched`, `test_title_runs_under_the_debug_layer_with_dred`, `test_title_draws_with_a_root_signature_under_the_debug_layer`). The four new `stage_guard_tests` passed separately (4 passed, 0 failed, 0 ignored, 0 skipped) with `cargo test --offline --locked -j 4 -p xcl --lib gpu::dxil::lower_mem::stage_guard_tests -- --nocapture`. review: none. I read the full diff. The stage checks run before the kernel export path or graphics LDS lowering; existing wave-level DS operations and valid kernel/compute exports remain covered by the positive DXIL validation controls. The PR author also supplied a failing-first check and a clean-commit smoke pair on its head. performance: reasoned only. These checks run during shader translation and add no work to a successfully translated frame. No frame-time or memory benchmark was run here. verdict: safe to merge relative to the checked main base; the workspace suite remains red for the same 10 base failures. hardware / tool and model: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, DXC 1.8.2502.11; Codex (GPT-6.2 Sol) reviewed the diff and ran these checks.
throny commented 2026-11-28 13:04:23 +00:00 (Migrated from github.com)

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


merge-check claim
head: 00b5eef722

<!-- greyfinch-sync:ivall/xcl:comment:7239669624 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2102#issuecomment-7239669624). Originally posted by [throny](https://github.com/throny) on 2026-11-28T13:04:23Z. --- merge-check claim head: 00b5eef722359d70fd2549a12a5f87edb9b154f5
throny commented 2026-11-28 13:22:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T13:22:31Z.


merge-check
base: e429936c
head: 00b5eef722
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2130 passed, 9 failed, 48 ignored: the base's 9 only (26 SKIPPED lines). The 9 failures are main's own at e429936c on this GPU (#3093); base alone: 2126 passed, 9 failed, 48 ignored.
review: no blocking finding. On main an export in a compute program panics (no export resources there), and in geometry mode it writes into the kernel export area of the record buffer; the new guard refuses both. The LDS guard applies to vertex and pixel programs only, after the swizzle and permute forms are handled; mesh and compute LDS are unaffected. Behaviour change not mentioned in the description: an export with nothing enabled in a compute or geometry program was a no-op before and now sends the program to the HLSL path (low risk). A negative control in the thread shows three of the four tests fail without the fix.
performance: direct DXIL only (the graphics part only with XCL_DIRECT_DXIL=all); a one-time re-translation there.
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:7239890524 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2102#issuecomment-7239890524). Originally posted by [throny](https://github.com/throny) on 2026-11-28T13:22:31Z. --- merge-check base: e429936c head: 00b5eef722359d70fd2549a12a5f87edb9b154f5 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2130 passed, 9 failed, 48 ignored: the base's 9 only (26 SKIPPED lines). The 9 failures are main's own at e429936c on this GPU (#3093); base alone: 2126 passed, 9 failed, 48 ignored. review: no blocking finding. On main an export in a compute program panics (no export resources there), and in geometry mode it writes into the kernel export area of the record buffer; the new guard refuses both. The LDS guard applies to vertex and pixel programs only, after the swizzle and permute forms are handled; mesh and compute LDS are unaffected. Behaviour change not mentioned in the description: an export with nothing enabled in a compute or geometry program was a no-op before and now sends the program to the HLSL path (low risk). A negative control in the thread shows three of the four tests fail without the fix. performance: direct DXIL only (the graphics part only with XCL_DIRECT_DXIL=all); a one-time re-translation there. 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).
throny commented 2026-11-29 12:14:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-29T12:14:51Z.


Test report for merging this together with the other of #2102 / #2419 (both are ready to merge on their own): trial merge of both into main d8bd9a38, cargo build --workspace && cargo test --workspace -- --test-threads=4, RTX 4080 16 GB, 621.40:

  • #2102 + #2419: 2622 passed, 2 failed, 49 ignored (27 SKIPPED lines). Failing: gpu::dxil::lower_geom::tests::gpu_epilogue_filters_oob_triangles_and_no_store_emits and gpu::dxil::lower_mem::stage_guard_tests::geometry_export_rejected.
  • main alone: 2618 passed, 0 failed. Each of the two PRs alone passed in its merge checks.

So the two do not go in together as they are; whichever is merged second needs a rebase and a look at those two tests. I have not looked into which side is right.

AI use: Claude Code (Claude Fable 5.2) ran the suite and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7255673140 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2102#issuecomment-7255673140). Originally posted by [throny](https://github.com/throny) on 2026-11-29T12:14:51Z. --- Test report for merging this together with the other of #2102 / #2419 (both are ready to merge on their own): trial merge of both into `main` `d8bd9a38`, `cargo build --workspace && cargo test --workspace -- --test-threads=4`, RTX 4080 16 GB, 621.40: - #2102 + #2419: 2622 passed, **2 failed**, 49 ignored (27 SKIPPED lines). Failing: `gpu::dxil::lower_geom::tests::gpu_epilogue_filters_oob_triangles_and_no_store_emits` and `gpu::dxil::lower_mem::stage_guard_tests::geometry_export_rejected`. - `main` alone: 2618 passed, 0 failed. Each of the two PRs alone passed in its merge checks. So the two do not go in together as they are; whichever is merged second needs a rebase and a look at those two tests. I have not looked into which side is right. AI use: Claude Code (Claude Fable 5.2) ran the suite and wrote this.
throny commented 2026-11-29 14:19:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-29T14:19:53Z.


Correction to my report above: #2102 and #2419 do not clash with each other. Since #3203, kernel::translate_geometry refuses the split wave64 form when the program has an ES phase, and the new tests of both PRs call it that way, so they stop at that refusal. #3411 fixes the tests on main. Sorry for the wrong lead.

AI use: Claude Code (Claude Fable 5.2) wrote this; Claude Opus 5.5 found the cause.

<!-- greyfinch-sync:ivall/xcl:comment:7257219387 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2102#issuecomment-7257219387). Originally posted by [throny](https://github.com/throny) on 2026-11-29T14:19:53Z. --- Correction to my report above: #2102 and #2419 do not clash with each other. Since #3203, `kernel::translate_geometry` refuses the split wave64 form when the program has an ES phase, and the new tests of both PRs call it that way, so they stop at that refusal. #3411 fixes the tests on `main`. Sorry for the wrong lead. AI use: Claude Code (Claude Fable 5.2) wrote this; Claude Opus 5.5 found the cause.
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!2092
No description provided.