Recompiler: VS / PS in the per-lane form as DXIL #1839

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

@⁠teidenzero on GitHub · 2026-11-24 21:38 UTC · original
teidenzero:vsps-dxil-main → main · +146 −5 · 2 files · 1 commits · draft

The DXIL adapter's half of the per-lane VS / PS stages: a follow-up to #1745, whose description lists VS / PS with only its lowering half. Part of #1269. The runtime does not call the VS / PS entry points yet (pso.rs sends only compute programs to the per-lane form), so nothing changes outside the tests.

What is in it (one commit)

  • crates/xcl/src/gpu/recomp/lower_dxil.rs:
    • DxilIr sets a VS / PS up in Lw's entry block, as kernel.rs does: setup_lanes_gfx, then #1426's setup_vertex / setup_pixel, whose input loads must come before every use. graphics_start hands the lowering the initial VGPRs and the lane's bit of the launch EXEC (ballot(true), without a PS's helper lanes); graphics_end is #1426's finish_gfx.
    • A VS / PS's ballots and lane reads go through Lw's ballot, rla and read_lane_half, which know a wave32 program's half in 64-lane hardware and see a PS's helper lanes through quad reads.
    • lower_dxil::vertex / pixel give the signed containers.
    • The test per_lane_vs_and_ps_with_a_branch_before_their_exports_draw_as_the_hlsl_path.
  • crates/xcl/src/gpu/recomp/lower.rs, the bridge: an export's EXEC goes in only as the guard, which #1426's export_gfx takes, as for v_cmpx. Passed as a number, EXEC refused every export ("s126: a mask read as a number").

The exports write #1426's output temporaries. These reach finish_gfx in the exit block through Lw's SSA, because the adapter's branches go through Lw (gefydev's point on #1269), so the lowering needs no variable of its own for them.

Tested

  • NVIDIA GeForce RTX 4090 24 GB (32-lane waves, so the wave64 stages run in 32-lane waves), driver 621.24; AMD Ryzen 7 3700X; Windows 10 Pro 22H2 build 19045.6466 with the D3D12 Agility SDK 1.620.2; Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug; DXC 1.8.2502.11 from the Windows SDK, without dxil.dll.
  • cargo test --workspace --no-fail-fast -- --test-threads=1 on main 68a284a with this commit (7772597): 1289 passed, 2 failed, 46 ignored over the workspace (lib: 1219 passed, 2 failed, 26 ignored). Neither failure is in this change:
    • a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier (#2074) fails the same way on main 68a284a without this commit (3 barriers, not 1). gefydev's test-only fix is #2379. It passes on main just before #2203 and fails once #2203 is in.
    • hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory failed once in the full run (list.Close(): 0x80004005). It passes on its own, with and without this commit.
    • SKIPPED (26): 21 "no wave64" (this GPU), 1 "no heap windows", 1 "no dxil.dll", and the 3 per-lane refusals main makes on purpose (V_CVT_F16_F32, V_MUL_F16, V_PK_MUL_F16).
    • On main 1a0bbe3 (be458bf, the previous head) the same one-thread run passed: 1251 passed, 0 failed, 46 ignored. With four threads there, the D3D12 device was removed during hle::d3d12x::list_x's queue tests, and 3 of them failed with 0x887A0005. They pass on their own and in the one-thread run.
  • The new test: a VS and a PS whose exports follow a branch (the stages of dxil core_tests::graphics_stages_with_a_branch_before_their_exports), in the per-lane form, draw what the HLSL path's stages draw for both branch directions, and each links with the HLSL path's other stage. It fails without the bridge change (the VS is refused) and with the adapter's branches bypassing Lw (the VS then fails validation).
  • @⁠thehollowedone, on 61f6c2d (RTX 3080 Ti, Windows 11, comment): the new test passes in debug and in release; with discard cases added to it (every column kept, columns 8–15 kept, none kept), the HLSL path, #1426's per-instruction DXIL and the per-lane DXIL give identical readbacks.
  • @⁠vitor127wt, on 61f6c2d (RTX 5070 Ti, Linux, Proton, comment): the new test passes in a release build under Wine.
  • @⁠DavidM1911, on 61f6c2d merged with main (RTX 3060 Ti, Windows 11, comment): cargo test -p xcl --lib passes.
  • @⁠Chrysana, on be458bf (RX 9070 XT, RDNA4, and a Ryzen 7 9800X3D's RDNA2 iGPU; Windows 11; comment): the new test passes on both adapters. Both report 32 and 64 lanes, so the test builds the stages in the form that checks the wave size at run time. A probe with plain HLSL stages shows the driver picks 64-lane waves for the PS on both and for the VS on RDNA4, so the 64-lane path runs there. Their 4-thread workspace run: 1249 passed, 2 failed (the AMD fuzz seeds of #2115, which main fails the same way on that card), 46 ignored.

Regression run
Not run: there is no Series X|S title on this machine. No title program reaches this code yet (nothing calls lower_dxil::vertex / pixel at run time), so a smoke pair could not exercise it; whether the pair can wait for the VS / PS runtime wiring is asked in the comments. This PR stays a draft until that is settled.

Not tested

  • A title.
  • Which wave size the driver picks for the per-lane containers themselves: Chrysana's probe used plain HLSL stages.
  • A PS whose lane reads depend on helper lanes.
  • The runtime wiring of VS / PS (not part of this PR).

AI use

  • Claude Code (Claude Opus 5.5): wrote the change and the test, ran the checks above, and drafted this description.

🤖 Generated with Claude Code

**@⁠teidenzero** on GitHub · 2026-11-24 21:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/1839) `teidenzero:vsps-dxil-main` → `main` · +146 −5 · 2 files · 1 commits · draft The DXIL adapter's half of the per-lane VS / PS stages: a follow-up to #1745, whose description lists VS / PS with only its lowering half. Part of #1269. The runtime does not call the VS / PS entry points yet (`pso.rs` sends only compute programs to the per-lane form), so nothing changes outside the tests. **What is in it** (one commit) - `crates/xcl/src/gpu/recomp/lower_dxil.rs`: - `DxilIr` sets a VS / PS up in `Lw`'s entry block, as `kernel.rs` does: `setup_lanes_gfx`, then #1426's `setup_vertex` / `setup_pixel`, whose input loads must come before every use. `graphics_start` hands the lowering the initial VGPRs and the lane's bit of the launch EXEC (`ballot(true)`, without a PS's helper lanes); `graphics_end` is #1426's `finish_gfx`. - A VS / PS's ballots and lane reads go through `Lw`'s `ballot`, `rla` and `read_lane_half`, which know a wave32 program's half in 64-lane hardware and see a PS's helper lanes through quad reads. - `lower_dxil::vertex` / `pixel` give the signed containers. - The test `per_lane_vs_and_ps_with_a_branch_before_their_exports_draw_as_the_hlsl_path`. - `crates/xcl/src/gpu/recomp/lower.rs`, the bridge: an export's EXEC goes in only as the guard, which #1426's `export_gfx` takes, as for `v_cmpx`. Passed as a number, EXEC refused every export ("s126: a mask read as a number"). The exports write #1426's output temporaries. These reach `finish_gfx` in the exit block through `Lw`'s SSA, because the adapter's branches go through `Lw` (gefydev's point on #1269), so the lowering needs no variable of its own for them. **Tested** - NVIDIA GeForce RTX 4090 24 GB (32-lane waves, so the wave64 stages run in 32-lane waves), driver 621.24; AMD Ryzen 7 3700X; Windows 10 Pro 22H2 build 19045.6466 with the D3D12 Agility SDK 1.620.2; Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug; DXC 1.8.2502.11 from the Windows SDK, without `dxil.dll`. - `cargo test --workspace --no-fail-fast -- --test-threads=1` on `main` `68a284a` with this commit (`7772597`): 1289 passed, 2 failed, 46 ignored over the workspace (lib: 1219 passed, 2 failed, 26 ignored). Neither failure is in this change: - `a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier` (#2074) fails the same way on `main` `68a284a` without this commit (3 barriers, not 1). gefydev's test-only fix is #2379. It passes on `main` just before #2203 and fails once #2203 is in. - `hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory` failed once in the full run (`list.Close()`: `0x80004005`). It passes on its own, with and without this commit. - SKIPPED (26): 21 "no wave64" (this GPU), 1 "no heap windows", 1 "no dxil.dll", and the 3 per-lane refusals `main` makes on purpose (`V_CVT_F16_F32`, `V_MUL_F16`, `V_PK_MUL_F16`). - On `main` `1a0bbe3` (`be458bf`, the previous head) the same one-thread run passed: 1251 passed, 0 failed, 46 ignored. With four threads there, the D3D12 device was removed during `hle::d3d12x::list_x`'s queue tests, and 3 of them failed with `0x887A0005`. They pass on their own and in the one-thread run. - The new test: a VS and a PS whose exports follow a branch (the stages of dxil `core_tests::graphics_stages_with_a_branch_before_their_exports`), in the per-lane form, draw what the HLSL path's stages draw for both branch directions, and each links with the HLSL path's other stage. It fails without the bridge change (the VS is refused) and with the adapter's branches bypassing `Lw` (the VS then fails validation). - @⁠thehollowedone, on `61f6c2d` (RTX 3080 Ti, Windows 11, [comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1839)): the new test passes in debug and in release; with discard cases added to it (every column kept, columns 8–15 kept, none kept), the HLSL path, #1426's per-instruction DXIL and the per-lane DXIL give identical readbacks. - @⁠vitor127wt, on `61f6c2d` (RTX 5070 Ti, Linux, Proton, [comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1839)): the new test passes in a release build under Wine. - @⁠DavidM1911, on `61f6c2d` merged with `main` (RTX 3060 Ti, Windows 11, [comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1839)): `cargo test -p xcl --lib` passes. - @⁠Chrysana, on `be458bf` (RX 9070 XT, RDNA4, and a Ryzen 7 9800X3D's RDNA2 iGPU; Windows 11; [comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1839)): the new test passes on both adapters. Both report 32 and 64 lanes, so the test builds the stages in the form that checks the wave size at run time. A probe with plain HLSL stages shows the driver picks 64-lane waves for the PS on both and for the VS on RDNA4, so the 64-lane path runs there. Their 4-thread workspace run: 1249 passed, 2 failed (the AMD fuzz seeds of #2115, which `main` fails the same way on that card), 46 ignored. **Regression run** Not run: there is no Series X|S title on this machine. No title program reaches this code yet (nothing calls `lower_dxil::vertex` / `pixel` at run time), so a smoke pair could not exercise it; whether the pair can wait for the VS / PS runtime wiring is asked in the comments. This PR stays a draft until that is settled. **Not tested** - A title. - Which wave size the driver picks for the per-lane containers themselves: Chrysana's probe used plain HLSL stages. - A PS whose lane reads depend on helper lanes. - The runtime wiring of VS / PS (not part of this PR). **AI use** - Claude Code (Claude Opus 5.5): wrote the change and the test, ran the checks above, and drafted this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The DXIL adapter's half of the VS / PS stages (#1269):

- `DxilIr` sets a VS / PS up in `Lw`'s entry block, as `kernel.rs` does:
  `setup_lanes_gfx`, then #1426's `setup_vertex` / `setup_pixel`, whose
  input loads must come before every use. `graphics_start` hands the
  lowering the initial VGPRs and the lane's bit of the launch EXEC
  (`ballot(true)`, without a PS's helper lanes); `graphics_end` is #1426's
  `finish_gfx`.
- A VS / PS's ballots and lane reads go through `Lw`'s `ballot`, `rla` and
  `read_lane_half`, which know a wave32 program's half in 64-lane hardware
  and see a PS's helper lanes through quad reads.
- `lower_dxil::vertex` / `pixel` give the signed containers.
- The bridge passes an export's EXEC only as the guard, which #1426's
  `export_gfx` takes, as it does for `v_cmpx`: passed as a number, EXEC
  refused every export ("s126: a mask read as a number").

The exports write #1426's output temporaries. These reach `finish_gfx` in
the exit block through `Lw`'s SSA, since the adapter's branches go through
`Lw` (gefydev's point in #1269), so the lowering needs no variable of its
own for them.

Tested on an RTX 4090 (32-lane waves; Windows 10 22H2, DXC 1.8.2502):
- per_lane_vs_and_ps_with_a_branch_before_their_exports_draw_as_the_hlsl_path
  (new): a VS and a PS whose exports follow a branch draw what the HLSL
  path's stages draw for both branch directions, and each links with the
  HLSL path's other stage. It fails without the bridge change (the VS is
  refused) and with the adapter's branches bypassing `Lw` (the VS fails
  validation);
- cargo test --workspace -- --test-threads=1 on main 68a284a with this
  commit: 1289 passed, 2 failed, 46 ignored (lib 1219 passed). Neither
  failure is in this change: main fails
  a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier the
  same way (its test-only fix is #2379), and
  d32s8_targets_take_their_own_size_of_video_memory passes on its own,
  with and without this commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:06:54 +00:00
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-24 21:48 UTC · original

Tested

On 61f6c2d6, I extended the stock VS/PS draw fixture to check discard. With the same HLSL vertex shader, HLSL, per-instruction DXIL and per-lane DXIL produced identical 16×16 readbacks for all three settings.

  • Keeping every column wrote 256 pixels.
  • Keeping only columns 8–15 wrote 128 pixels and left columns 0–7 at the clear value.
  • Discarding every column left all 256 pixels at the clear value.

The fixture compares positive screen coordinates with an integer V_CMPX_LT_U32 before the final export. Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, DXC 1.8.2502.11. cargo test --offline --locked -p xcl --lib per_lane_vs_and_ps_with_a_branch_before_their_exports_draw_as_the_hlsl_path -- --nocapture --test-threads=1 passed 1/1 as shipped and 1/1 with the added discard cases in debug, with zero skips. The stock test also passed 1/1 in release.

Not tested

This report covers synthetic wave32-adapter draws. It does not cover helper-lane reads, native wave64, or runtime routing.

AI-assisted. Codex (GPT-6 family, exact variant unavailable) extended and ran the fixture and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-24 21:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/1839#issuecomment-7145419763) **Tested** On [`61f6c2d6`](https://github.com/xcl-dev/xcl/commit/61f6c2d6d0abd4d2114372b139ea6cfaf4af8e7f), I extended the stock VS/PS draw fixture to check discard. With the same HLSL vertex shader, HLSL, per-instruction DXIL and per-lane DXIL produced identical 16×16 readbacks for all three settings. - Keeping every column wrote 256 pixels. - Keeping only columns 8–15 wrote 128 pixels and left columns 0–7 at the clear value. - Discarding every column left all 256 pixels at the clear value. The fixture compares positive screen coordinates with an integer `V_CMPX_LT_U32` before the final export. Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, DXC 1.8.2502.11. `cargo test --offline --locked -p xcl --lib per_lane_vs_and_ps_with_a_branch_before_their_exports_draw_as_the_hlsl_path -- --nocapture --test-threads=1` passed 1/1 as shipped and 1/1 with the added discard cases in debug, with zero skips. The stock test also passed 1/1 in release. **Not tested** This report covers synthetic wave32-adapter draws. It does not cover helper-lane reads, native wave64, or runtime routing. AI-assisted. Codex (GPT-6 family, exact variant unavailable) extended and ran the fixture and drafted this report.
Author
Owner

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

Requested retail smoke pair and VS/PS test — RTX 5070 Ti / Proton

Tested

  • RTX 5070 Ti 16 GB, NVIDIA 620.73.04, Ryzen 7 9700X, 32 GB DDR5, CachyOS 7.3.5-2-cachyos, Proton Experimental 11.0 (experimental-11.0-20261112-x86_64), vkd3d-proton ec207194 with the #257 patch and dxil-spirv 7c048638. Rust 1.100.0, LLVM-MinGW 20261117 (x86_64-pc-windows-gnullvm), DXC 1.9.2609.5.
  • Clean release builds with cargo build --locked --release --target x86_64-pc-windows-gnullvm -p xcl --bin xcl. Ran scripts/linux/smoke.sh "$PROTON" "$PREFIX" "$GAME" from #257 for 60 s on main 266b845e4b2a193ea7ce1b86698ead08dc4a10c0 and PR head 61f6c2d6d0abd4d2114372b139ea6cfaf4af8e7f, same retail title with no injected input. The title runs used fresh Wine prefixes and caches, networking off, and a 16 GiB Linux scope limit with no swap.
  • Built the release library test with cargo test --locked --release --target x86_64-pc-windows-gnullvm -p xcl --lib --no-run. Ran gpu::recomp::lower_dxil::tests::per_lane_vs_and_ps_with_a_branch_before_their_exports_draw_as_the_hlsl_path --exact --test-threads=1 --nocapture in Proton Wine on the PR. 1 passed, 0 failed, 0 ignored, 0 skipped.

Regression run

The requested pair below comes from the Wine smoke script. I abbreviated the local folder name in the title field.

main

xcl-smoke v1
commit: 266b845e4b2a193ea7ce1b86698ead08dc4a10c0
gpu: NVIDIA GeForce RTX 5070 Ti
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1175 (PresentX 1175)
presents per 2 s (last 3): 60 60 59
device removals: 0
crashes: 0
peak commit: 0 MB

PR head

xcl-smoke v1
commit: 61f6c2d6d0abd4d2114372b139ea6cfaf4af8e7f
gpu: NVIDIA GeForce RTX 5070 Ti
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1192 (PresentX 1192)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

Linux scope peaks were 9.56 GiB (base) and 6.61 GiB (PR), with no OOM kills. Wine reported 0 MB in the Windows peak-commit field. The retail pair covers startup. The VS/PS path ran in the synthetic test.

AI use — OpenAI Codex (GPT-6, exact variant unavailable) ran the tests, checked the logs, and drafted this report.

**@⁠vitor127wt** on GitHub · 2026-11-24 22:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/1839#issuecomment-7146201651) **Requested retail smoke pair and VS/PS test — RTX 5070 Ti / Proton** **Tested** - RTX 5070 Ti 16 GB, NVIDIA 620.73.04, Ryzen 7 9700X, 32 GB DDR5, CachyOS `7.3.5-2-cachyos`, Proton Experimental 11.0 (`experimental-11.0-20261112-x86_64`), vkd3d-proton `ec207194` with the #257 patch and dxil-spirv `7c048638`. Rust 1.100.0, LLVM-MinGW 20261117 (`x86_64-pc-windows-gnullvm`), DXC 1.9.2609.5. - Clean release builds with `cargo build --locked --release --target x86_64-pc-windows-gnullvm -p xcl --bin xcl`. Ran `scripts/linux/smoke.sh "$PROTON" "$PREFIX" "$GAME"` from #257 for 60 s on `main` `266b845e4b2a193ea7ce1b86698ead08dc4a10c0` and PR head `61f6c2d6d0abd4d2114372b139ea6cfaf4af8e7f`, same retail title with no injected input. The title runs used fresh Wine prefixes and caches, networking off, and a 16 GiB Linux scope limit with no swap. - Built the release library test with `cargo test --locked --release --target x86_64-pc-windows-gnullvm -p xcl --lib --no-run`. Ran `gpu::recomp::lower_dxil::tests::per_lane_vs_and_ps_with_a_branch_before_their_exports_draw_as_the_hlsl_path --exact --test-threads=1 --nocapture` in Proton Wine on the PR. **1 passed, 0 failed, 0 ignored, 0 skipped.** **Regression run** The requested pair below comes from the Wine smoke script. I abbreviated the local folder name in the `title` field. `main` ``` xcl-smoke v1 commit: 266b845e4b2a193ea7ce1b86698ead08dc4a10c0 gpu: NVIDIA GeForce RTX 5070 Ti title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1175 (PresentX 1175) presents per 2 s (last 3): 60 60 59 device removals: 0 crashes: 0 peak commit: 0 MB ``` PR head ``` xcl-smoke v1 commit: 61f6c2d6d0abd4d2114372b139ea6cfaf4af8e7f gpu: NVIDIA GeForce RTX 5070 Ti title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1192 (PresentX 1192) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` Linux scope peaks were 9.56 GiB (base) and 6.61 GiB (PR), with no OOM kills. Wine reported 0 MB in the Windows peak-commit field. The retail pair covers startup. The VS/PS path ran in the synthetic test. **AI use** — OpenAI Codex (GPT-6, exact variant unavailable) ran the tests, checked the logs, and drafted this report.
Author
Owner

@⁠teidenzero on GitHub · 2026-11-24 22:35 UTC · original

Thank you @⁠thehollowedone and @⁠vitor127wt for the runs on 61f6c2d. Your test results (the discard cases, the release builds, the run under Proton) are now under Tested in the description.

On the smoke pair, a question for @⁠gefydev and the maintainers. The pair above comes from the Wine smoke script in #257, and CONTRIBUTING asks for scripts/smoke.ps1. More to the point, no title program reaches this code yet: pso.rs sends only compute programs to the per-lane form, and nothing calls lower_dxil::vertex / pixel at run time, so a smoke pair cannot exercise it. Can this PR go without the pair, or should the pair come with the VS / PS runtime wiring, where a title run tests the path for real? Until then this PR stays a draft.

AI use: Claude Code (Claude Opus 5.5) drafted this comment.

**@⁠teidenzero** on GitHub · 2026-11-24 22:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/1839#issuecomment-7146421821) Thank you @⁠thehollowedone and @⁠vitor127wt for the runs on `61f6c2d`. Your test results (the discard cases, the release builds, the run under Proton) are now under **Tested** in the description. On the smoke pair, a question for @⁠gefydev and the maintainers. The pair above comes from the Wine smoke script in #257, and CONTRIBUTING asks for `scripts/smoke.ps1`. More to the point, no title program reaches this code yet: `pso.rs` sends only compute programs to the per-lane form, and nothing calls `lower_dxil::vertex` / `pixel` at run time, so a smoke pair cannot exercise it. Can this PR go without the pair, or should the pair come with the VS / PS runtime wiring, where a title run tests the path for real? Until then this PR stays a draft. AI use: Claude Code (Claude Opus 5.5) drafted this comment.
Author
Owner

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

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

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

Thanks!

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

@⁠teidenzero on GitHub · 2026-11-25 13:18 UTC · original

Rebased onto main 1a0bbe3 as be458bf. The only conflict was in lower_dxil.rs's tests: the tests from #1864 and #1865 had been added in the same spot as the new one. All three tests are kept. cargo test --workspace -- --test-threads=1: 1251 passed, 0 failed, 46 ignored. Thanks @⁠DavidM1911 for the run on the merged branch.

@⁠emirduran707, @⁠AlpPesen: you ran scripts/smoke.ps1 pairs on an AMD card for your per-lane PRs (#1864, #2014). I have no Series X|S title of my own, so this PR can't carry the pair without help. If one of you has time, two things would let it leave draft:

  • a smoke pair: one build from main 1a0bbe3 and one from be458bf, same title and seconds. No title program reaches the new entry points yet, so the two runs should match.
  • cargo test -p xcl --lib -- per_lane_vs_and_ps: on AMD the stages run in native wave64, which no one has tested yet.

AI use: Claude Code (Claude Opus 5.5) drafted this comment.

**@⁠teidenzero** on GitHub · 2026-11-25 13:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/1839#issuecomment-7163599618) Rebased onto `main` `1a0bbe3` as `be458bf`. The only conflict was in `lower_dxil.rs`'s tests: the tests from #1864 and #1865 had been added in the same spot as the new one. All three tests are kept. `cargo test --workspace -- --test-threads=1`: 1251 passed, 0 failed, 46 ignored. Thanks @⁠DavidM1911 for the run on the merged branch. @⁠emirduran707, @⁠AlpPesen: you ran `scripts/smoke.ps1` pairs on an AMD card for your per-lane PRs (#1864, #2014). I have no Series X|S title of my own, so this PR can't carry the pair without help. If one of you has time, two things would let it leave draft: - a smoke pair: one build from `main` `1a0bbe3` and one from `be458bf`, same title and seconds. No title program reaches the new entry points yet, so the two runs should match. - `cargo test -p xcl --lib -- per_lane_vs_and_ps`: on AMD the stages run in native wave64, which no one has tested yet. AI use: Claude Code (Claude Opus 5.5) drafted this comment.
Author
Owner

@⁠Chrysana on GitHub · 2026-11-25 14:51 UTC · original

AMD run of be458bf, for "Native wave64 (no AMD GPU here)" under Not tested. On RDNA4 the per-lane VS and PS run in 64-lane hardware waves, and the new test passes there. It also passes on an RDNA2 iGPU, where the PS runs in 64-lane waves and the VS in 32-lane waves.

Setup: AMD Radeon RX 9070 XT 16 GB (RDNA4), driver 32.0.32015.2008, and the Ryzen 7 9800X3D's integrated AMD Radeon(TM) Graphics (RDNA2), driver 32.0.21045.11001; 31 GB RAM, Windows 11 26200.9974, rustc 1.100.0 MSVC, DXC 1.9.2602.17, debug. This PR's head as pushed (on main 1a0bbe3).

Tested

  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 on the RX 9070 XT: 1249 passed, 2 failed, 46 ignored. The two failures are fuzz_validate_and_gpu_1 (seed 722) and fuzz_validate_and_gpu_3 (seed 1599), the AMD seeds of #2115; main 06c9f55 fails the same two on this card.
  • SKIPPED: f16_programs_on_the_gpu (4) and f32_programs_on_the_gpu (2) (per-lane refusals, #1426), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), pso_measurement_compiles_an_exact_synthetic_record (no Developer Mode), test_title_draws_with_a_root_signature_under_the_debug_layer and uploads_start_from_each_subresources_state (no debug layer).
  • per_lane_vs_and_ps_with_a_branch_before_their_exports_draw_as_the_hlsl_path passes on both adapters (XCL_ADAPTER=1 for the iGPU).
  • Which hardware wave the per-lane VS / PS get. Both adapters report 32 and 64 lanes, so graphics_wave32() is true and the stages are built wave-size independent. For a VS / PS, kernel.rs finish doesn't use hw, so the container carries no wave size and the driver picks one. A local probe (not pushed) draws with a plain HLSL VS and PS that write WaveGetLaneCount() from both stages and WaveActiveCountBits(true) from the PS, on 8×8 and 64×64 targets:
adapter PS lanes per wave PS active lanes per wave VS lanes per wave
RX 9070 XT (RDNA4) 64 64 64
Radeon iGPU (RDNA2) 64 64 32

So on these cards the new test's per-lane stages run in 64-lane hardware waves (the PS on both, the VS on RDNA4). That is the case read_lane_half handles and a 32-lane-only GPU can't reach.

Not tested

  • The probe measures what the driver picks for a plain HLSL shader. I assume it picks the same for the per-lane containers, but didn't probe them directly.
  • A title run: the runtime doesn't call the VS / PS entry points yet.
  • This head merged onto current main.

AI use

  • Claude Code (Claude Opus 5.5) built the tree, wrote and ran the local probe, ran the suite and drafted this comment. I checked it before posting.
**@⁠Chrysana** on GitHub · 2026-11-25 14:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/1839#issuecomment-7165936617) AMD run of `be458bf`, for "Native wave64 (no AMD GPU here)" under **Not tested**. **On RDNA4 the per-lane VS and PS run in 64-lane hardware waves, and the new test passes there. It also passes on an RDNA2 iGPU, where the PS runs in 64-lane waves and the VS in 32-lane waves.** **Setup:** AMD Radeon RX 9070 XT 16 GB (RDNA4), driver 32.0.32015.2008, and the Ryzen 7 9800X3D's integrated AMD Radeon(TM) Graphics (RDNA2), driver 32.0.21045.11001; 31 GB RAM, Windows 11 26200.9974, rustc 1.100.0 MSVC, DXC 1.9.2602.17, debug. This PR's head as pushed (on `main` `1a0bbe3`). **Tested** - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4` on the RX 9070 XT: 1249 passed, 2 failed, 46 ignored. The two failures are `fuzz_validate_and_gpu_1` (seed 722) and `fuzz_validate_and_gpu_3` (seed 1599), the AMD seeds of #2115; `main` `06c9f55` fails the same two on this card. - SKIPPED: `f16_programs_on_the_gpu` (4) and `f32_programs_on_the_gpu` (2) (per-lane refusals, #1426), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows), `pso_measurement_compiles_an_exact_synthetic_record` (no Developer Mode), `test_title_draws_with_a_root_signature_under_the_debug_layer` and `uploads_start_from_each_subresources_state` (no debug layer). - `per_lane_vs_and_ps_with_a_branch_before_their_exports_draw_as_the_hlsl_path` passes on both adapters (`XCL_ADAPTER=1` for the iGPU). - **Which hardware wave the per-lane VS / PS get.** Both adapters report 32 and 64 lanes, so `graphics_wave32()` is true and the stages are built wave-size independent. For a VS / PS, `kernel.rs` `finish` doesn't use `hw`, so the container carries no wave size and the driver picks one. A local probe (not pushed) draws with a plain HLSL VS and PS that write `WaveGetLaneCount()` from both stages and `WaveActiveCountBits(true)` from the PS, on 8×8 and 64×64 targets: | adapter | PS lanes per wave | PS active lanes per wave | VS lanes per wave | |---|---|---|---| | RX 9070 XT (RDNA4) | 64 | 64 | 64 | | Radeon iGPU (RDNA2) | 64 | 64 | 32 | So on these cards the new test's per-lane stages run in 64-lane hardware waves (the PS on both, the VS on RDNA4). That is the case `read_lane_half` handles and a 32-lane-only GPU can't reach. **Not tested** - The probe measures what the driver picks for a plain HLSL shader. I assume it picks the same for the per-lane containers, but didn't probe them directly. - A title run: the runtime doesn't call the VS / PS entry points yet. - This head merged onto current `main`. **AI use** - Claude Code (Claude Opus 5.5) built the tree, wrote and ran the local probe, ran the suite and drafted this comment. I checked it before posting.
Author
Owner

@⁠teidenzero on GitHub · 2026-11-25 19:33 UTC · original

The head is now 7772597, rebased onto main 68a284a (only the tests clashed again, this time with #2074's). @⁠emirduran707, @⁠AlpPesen: if you run the smoke pair, please build main 68a284a and 7772597. This commit's code is unchanged, so the runs on be458bf still apply.

AI use: Claude Code (Claude Opus 5.5) drafted this comment.

**@⁠teidenzero** on GitHub · 2026-11-25 19:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/1839#issuecomment-7172468020) The head is now `7772597`, rebased onto `main` `68a284a` (only the tests clashed again, this time with #2074's). @⁠emirduran707, @⁠AlpPesen: if you run the smoke pair, please build `main` `68a284a` and `7772597`. This commit's code is unchanged, so the runs on `be458bf` still apply. AI use: Claude Code (Claude Opus 5.5) drafted this comment.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 06:28 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 06:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/1839#issuecomment-7184456954) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
Author
Owner

@⁠bmjask on GitHub · 2026-11-25 21:31 UTC · original · reviewed

No concrete source defect found in the graphics adapter; VS/PS setup, EXEC guards, ballot/read-lane, SSA/output flow and HLSL parity fixture look internally consistent, with external RTX/RDNA coverage. Not merge-ready: draft, runtime does not route VS/PS to these entries, helper-lane PS read/discard remains untested, no title/runtime path evidence, and current Windows/description checks fail. Require clean CI plus helper-lane coverage and defer merge until wiring/title evidence or an approved staging plan.

**@⁠bmjask** on GitHub · 2026-11-25 21:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/1839#pullrequestreview-6065255374) · **reviewed** No concrete source defect found in the graphics adapter; VS/PS setup, EXEC guards, ballot/read-lane, SSA/output flow and HLSL parity fixture look internally consistent, with external RTX/RDNA coverage. Not merge-ready: draft, runtime does not route VS/PS to these entries, helper-lane PS read/discard remains untested, no title/runtime path evidence, and current Windows/description checks fail. Require clean CI plus helper-lane coverage and defer merge until wiring/title evidence or an approved staging plan.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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