shader: lower quad-local DPP16 and DPP8 v_movrel ops in pixel_aot #422

Merged
KomaGuy merged 3 commits from upstream-pr/428 into main 2026-11-23 23:43:28 +00:00
KomaGuy commented 2026-11-22 01:41:29 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KomaGuy on 2026-11-22T01:41:29Z.


Change

Lower quad-local DPP16 (quad_perm) and DPP8 (dpp8) forms for all four relative VGPR-indexing move instructions in tools/pixel_aot.py, covering the final 4 DPP16 and 4 DPP8 forms (+8 forms on both gfx1013 and gfx1030):

  • Supported v_*_dpp instructions (4): v_movreld_b32_dpp, v_movrels_b32_dpp, v_movrelsd_b32_dpp, and v_movrelsd_2_b32_dpp.
  • Static & runtime-dynamic m0 indexing:
    • Resolves static m0 immediates directly (VGPR[dst + m0], VGPR[src + m0], or split src + m0[9:0] / dst + m0[25:16] on v_movrelsd_2_b32_dpp).
    • Tracks scalar possible-ones bitmasks across s_bfe_u32, s_and_b64, s_or_b64, s_lshl_b64, s_lshr_b64, and s_mov_b32 so runtime-dynamic m0 offsets proven bounded (up to 16 reachable slots, all initialized and in 0..255) lower to conditional VGPR selects and per-slot conditional updates (reading all reachable sources before updating destinations, supporting overlapping source/destination banks).
    • Swizzles the selected 32-bit word via portable SM 6.0 quad intrinsics (QuadReadAcross*, QuadReadLaneAt, WaveGetLaneIndex() & 3u), emitting zero extra helper functions for existing shaders.
    • Rejects m0 still holding interp_base, unbounded or overly wide dynamic m0, out-of-range or uninitialized reachable VGPRs, source modifiers (-/|.|), cross-quad DPP8, row_*/wave_*, partial masks, non-VGPR operands, WQM, and vmcnt / sample_dest hazards.
  • Genuine 4-lane quad fixture: DPP_MOVREL_BODY derives quad coordinates from uv.x/uv.y, tests all 4 forms across both DPP16 and DPP8 with both runtime-dynamic m0 (different VGPR indices across 2 constant sets on one compiled shader) and static m0, and verifies 5 negative mutations.

Verification

Tested on Linux x86_64 (Python 3.13.5, LLVM 19.1.7, Clang 19.1.7) on top of ac48a50:

  • python3 -B tests/pixel_aot_check.py binary llvm-mc-19 llvm-objcopy-19 libLLVM-19.so — passed (controls, negative controls, and llvm-mc -mcpu=gfx1013 assembly→DXBC/XDAT/XBCH/FSSM→disassembly→lowering parity for DPP_MOVREL_BODY and all existing fixtures).
  • python3 -B tests/ffx_dispatch_aot_check.py llvm-mc-19 llvm-objcopy-19 libLLVM-19.so — passed.
  • python3 -B tests/script_state_check.py, tests/bcpack_check.py, tests/resource_ranges_check.py, tests/layout_chunks_check.py, tests/docs_links_check.py, tests/bidi_controls_check.py — all passed.
  • Verified tools/form_coverage.py records 4 DPP16 and 4 DPP8 forms against both docs/coverage/gfx1013.tsv and docs/coverage/rdna2.tsv.
  • Executed the actual generated HLSL for DPP_MOVREL_BODY and all 5 negative mutations on a 4-lane SIMT 2×2 pixel quad C++20 harness with clang++-19 -std=c++20 -O2 -Wall -Wextra -Wpedantic -Werror -fsanitize=undefined,address — bit-exact match across all 4 quad lanes on both constant sets and all 5 mutations caught; 0 sanitizer errors.
  • Windows C++, DXC (dxc -Gis -T ps_6_0), WARP (pixel_aot_warp), and hardware (pixel_aot_hardware) checks were not run locally on Linux; relying on the build-and-test Windows CI job to verify DXC compilation and D3D12 WARP quad readback.

Evidence and follow-up

  • All new test fixtures in tests/pixel_aot_check.py are original MIT-licensed gfx1013 assembly sequences built from source at test time.
  • Semantics follow the AMD RDNA 2 Instruction Set Architecture Reference Guide (M0[31:0] for v_movrel{s,d,sd}_b32, M0[9:0] source / M0[25:16] destination for v_movrelsd_2_b32) and DirectX Shader Model 6.0 quad-intrinsic specification.
  • Complements #408 (20 f32/move/select), #414 (23 integer/bitwise/shift), #419 (23 f16), #421 (19 conversions), and #423 (12 extra f32/carry/dot) with zero opcode overlap — completing 101/101 DPP16 + 101/101 DPP8 on gfx1013 and 100/100 DPP16 + 100/100 DPP8 on gfx1030.
  • This contribution was AI-assisted.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6536949044 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/428). Originally posted by [KomaGuy](https://github.com/KomaGuy) on 2026-11-22T01:41:29Z. --- ## Change Lower quad-local `DPP16` (`quad_perm`) and `DPP8` (`dpp8`) forms for all four relative VGPR-indexing move instructions in `tools/pixel_aot.py`, covering the final 4 `DPP16` and 4 `DPP8` forms (+8 forms on both `gfx1013` and `gfx1030`): - **Supported `v_*_dpp` instructions (4):** `v_movreld_b32_dpp`, `v_movrels_b32_dpp`, `v_movrelsd_b32_dpp`, and `v_movrelsd_2_b32_dpp`. - **Static & runtime-dynamic `m0` indexing:** - Resolves static `m0` immediates directly (`VGPR[dst + m0]`, `VGPR[src + m0]`, or split `src + m0[9:0]` / `dst + m0[25:16]` on `v_movrelsd_2_b32_dpp`). - Tracks scalar possible-ones bitmasks across `s_bfe_u32`, `s_and_b64`, `s_or_b64`, `s_lshl_b64`, `s_lshr_b64`, and `s_mov_b32` so runtime-dynamic `m0` offsets proven bounded (up to 16 reachable slots, all initialized and in `0..255`) lower to conditional VGPR selects and per-slot conditional updates (reading all reachable sources before updating destinations, supporting overlapping source/destination banks). - Swizzles the selected 32-bit word via portable SM 6.0 quad intrinsics (`QuadReadAcross*`, `QuadReadLaneAt`, `WaveGetLaneIndex() & 3u`), emitting zero extra helper functions for existing shaders. - Rejects `m0` still holding `interp_base`, unbounded or overly wide dynamic `m0`, out-of-range or uninitialized reachable VGPRs, source modifiers (`-`/`|.|`), cross-quad `DPP8`, `row_*`/`wave_*`, partial masks, non-VGPR operands, WQM, and `vmcnt` / `sample_dest` hazards. - **Genuine 4-lane quad fixture:** `DPP_MOVREL_BODY` derives quad coordinates from `uv.x`/`uv.y`, tests all 4 forms across both `DPP16` and `DPP8` with both runtime-dynamic `m0` (different VGPR indices across 2 constant sets on one compiled shader) and static `m0`, and verifies 5 negative mutations. ## Verification Tested on Linux x86_64 (Python 3.13.5, LLVM 19.1.7, Clang 19.1.7) on top of `ac48a50`: - `python3 -B tests/pixel_aot_check.py binary llvm-mc-19 llvm-objcopy-19 libLLVM-19.so` — passed (controls, negative controls, and `llvm-mc -mcpu=gfx1013` assembly→DXBC/XDAT/XBCH/FSSM→disassembly→lowering parity for `DPP_MOVREL_BODY` and all existing fixtures). - `python3 -B tests/ffx_dispatch_aot_check.py llvm-mc-19 llvm-objcopy-19 libLLVM-19.so` — passed. - `python3 -B tests/script_state_check.py`, `tests/bcpack_check.py`, `tests/resource_ranges_check.py`, `tests/layout_chunks_check.py`, `tests/docs_links_check.py`, `tests/bidi_controls_check.py` — all passed. - Verified `tools/form_coverage.py` records 4 `DPP16` and 4 `DPP8` forms against both `docs/coverage/gfx1013.tsv` and `docs/coverage/rdna2.tsv`. - Executed the actual generated HLSL for `DPP_MOVREL_BODY` and all 5 negative mutations on a 4-lane SIMT 2×2 pixel quad C++20 harness with `clang++-19 -std=c++20 -O2 -Wall -Wextra -Wpedantic -Werror -fsanitize=undefined,address` — bit-exact match across all 4 quad lanes on both constant sets and all 5 mutations caught; 0 sanitizer errors. - Windows C++, DXC (`dxc -Gis -T ps_6_0`), WARP (`pixel_aot_warp`), and hardware (`pixel_aot_hardware`) checks were not run locally on Linux; relying on the `build-and-test` Windows CI job to verify DXC compilation and D3D12 WARP quad readback. ## Evidence and follow-up - All new test fixtures in `tests/pixel_aot_check.py` are original MIT-licensed `gfx1013` assembly sequences built from source at test time. - Semantics follow the [AMD RDNA 2 Instruction Set Architecture Reference Guide](https://docs.amd.com/v/u/en-US/rdna2-shader-instruction-set-architecture) (`M0[31:0]` for `v_movrel{s,d,sd}_b32`, `M0[9:0]` source / `M0[25:16]` destination for `v_movrelsd_2_b32`) and DirectX Shader Model 6.0 quad-intrinsic specification. - Complements #408 (20 `f32`/move/select), #414 (23 integer/bitwise/shift), #419 (23 `f16`), #421 (19 conversions), and #423 (12 extra `f32`/carry/dot) with zero opcode overlap — completing **101/101 `DPP16` + 101/101 `DPP8` on `gfx1013`** and **100/100 `DPP16` + 100/100 `DPP8` on `gfx1030`**. - This contribution was AI-assisted. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets.
upstream-sync closed this pull request 2026-11-24 06:43:00 +00:00
abilliontokens commented 2026-11-24 06:48:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by abilliontokens on 2026-11-22T02:38:59Z.


Physical-silicon verification: v_movrel* DPP forms pass on wave 4 / 32 / 64

Independent verification of the wave-width-independence claim ("valid across wave sizes 4 (WARP) through 64") that CI cannot cover (CI excludes _hardware tests). Measured on this dual-GPU Windows box. This is the first Windows/hardware coverage for the dynamic-VGPR-indexing forms.

PR head: 5654af9e70b7e109d80860060fd96c333f62d8ef (single commit on ac48a50, an ancestor of current main; PR mergeable/clean).

Environment

  • Windows 11 Pro, build 26200.9711
  • Toolchain via tools/dev.ps1 (VS 2022 BuildTools, MSVC 14.44.35207); venv Python for INTAKE_PYTHON
  • DXC: C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x64/dxc.exe (Windows SDK 10.0.26100.0, CTest find_program)
  • debug_layer=unavailable on every backend (harness-reported); no debug-layer diagnostics available or claimed here
  • Backends (harness-reported adapter/driver lines):
    • WARP: adapter=Microsoft Basic Render Driver vendor=1414 device=008c, driver=10.0.26100.9711 — native wave width 4
    • adapter=AMD Radeon RX 9060 XT vendor=1002 device=7590, driver=32.0.32029.2010 — native wave width 64 (RDNA4)
    • adapter=NVIDIA GeForce RTX 5060 Ti vendor=10de device=2d04, driver=32.0.16.2124 — native wave width 32

Commands (exact)

git fetch origin pull/428/head:pr-428; git worktree add out/wt-428 pr-428
Set-Location out/wt-428; .\tools\dev.ps1 | Out-Null; $ErrorActionPreference='Continue'
cmake --preset dev -B out/build/dev-428 "-DINTAKE_PYTHON=C:/Users/james/Documents/Xbox2Windows/out/pe-env/Scripts/python.exe"
cmake --build out/build/dev-428                                          # 387/387 targets, 0 errors
ctest --test-dir out/build/dev-428 --no-tests=error -R '^pixel_aot_' --output-on-failure   # default adapter + WARP: 2/2 Passed
$env:XBOX2WINDOWS_ADAPTER='RX 9060 XT';  ctest --test-dir out/build/dev-428 --no-tests=error -R '^pixel_aot_hardware$' --output-on-failure
$env:XBOX2WINDOWS_ADAPTER='RTX 5060 Ti'; ctest --test-dir out/build/dev-428 --no-tests=error -R '^pixel_aot_hardware$' --output-on-failure
out/pe-env/Scripts/python.exe -B tests/pixel_aot_check.py binary out/tools/llvm-mc.exe out/tools/llvm15/bin/llvm-objcopy.exe out/tools/llvm15/bin/LLVM-C.dll

Results

Backend Native wave Result Readback
WARP 10.0.26100.9711 4 pixel_aot_warp: Passed (4.11 s) pixels=4096 channels=16384 max_absolute_error=0
AMD RX 9060 XT (driver 32.0.32029.2010) 64 pixel_aot_hardware: Passed (23.05 s default; explicit re-run also Passed) pixels=4096 channels=16384 max_absolute_error=0
NVIDIA RTX 5060 Ti (driver 32.0.16.2124) 32 pixel_aot_hardware: Passed pixels=4096 channels=16384 max_absolute_error=0
  • Binary round trip (LLVM 15.0.7 wrapper + llvm-objcopy + LLVM-C.dll): exit 0 — check_binary is assert-only/silent on success and includes with_constants(DPP_MOVREL_BODY): gfx1013 assembly → DXBC/XDAT/XBCH/FSSM → disassembly → lowering parity passed alongside all pre-existing fixtures.
  • The draw run's FORM_COVERAGE_RECORD confirms all four new opcodes translated on every backend: v_movreld_b32_dpp v_movrels_b32_dpp v_movrelsd_b32_dpp v_movrelsd_2_b32_dpp (both the runtime-dynamic-m0 and static-m0 constant sets exercised by the fixture).
  • No pixel_aot_* skips on any backend; capability skips outside this group (bvh_wave64_*, wave_shuffle_warp) did not occur here.
  • First mismatch: none — zero mismatches on any backend; nothing to quote.

Wave-width verdict

The wave-width-independence claim holds on silicon as measured for the dynamic-VGPR-indexing forms: bit-exact readback (max_absolute_error=0 over 16384 channels) on all three native widths (WARP 4, RTX 5060 Ti 32, RX 9060 XT 64) — i.e. the QuadReadAcross* / QuadReadLaneAt-based conditional-select lowering behaves identically whether the quad occupies a full wave (WARP width 4), a quarter wave (RDNA4 wave 64), or half a Blackwell wave (width 32). Everything above was measured on this box except the native wave-width labels themselves, which are platform facts for these adapters.

#421 (conversions) and #423 (extra f32/carry/dot) were verified in separate worktrees; separate comments posted there.

AI-assisted; runs executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7073035742 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/428#issuecomment-7073035742). Originally posted by [abilliontokens](https://github.com/abilliontokens) on 2026-11-22T02:38:59Z. --- ## Physical-silicon verification: v_movrel* DPP forms pass on wave 4 / 32 / 64 Independent verification of the wave-width-independence claim ("valid across wave sizes 4 (WARP) through 64") that CI cannot cover (CI excludes `_hardware` tests). Measured on this dual-GPU Windows box. This is the first Windows/hardware coverage for the dynamic-VGPR-indexing forms. **PR head:** `5654af9e70b7e109d80860060fd96c333f62d8ef` (single commit on `ac48a50`, an ancestor of current `main`; PR mergeable/clean). ### Environment - Windows 11 Pro, build **26200.9711** - Toolchain via `tools/dev.ps1` (VS 2022 BuildTools, MSVC 14.44.35207); venv Python for `INTAKE_PYTHON` - DXC: `C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x64/dxc.exe` (Windows SDK 10.0.26100.0, CTest `find_program`) - **debug_layer=unavailable** on every backend (harness-reported); no debug-layer diagnostics available or claimed here - Backends (harness-reported adapter/driver lines): - WARP: `adapter=Microsoft Basic Render Driver vendor=1414 device=008c`, `driver=10.0.26100.9711` — native wave width 4 - `adapter=AMD Radeon RX 9060 XT vendor=1002 device=7590`, `driver=32.0.32029.2010` — native wave width 64 (RDNA4) - `adapter=NVIDIA GeForce RTX 5060 Ti vendor=10de device=2d04`, `driver=32.0.16.2124` — native wave width 32 ### Commands (exact) ```powershell git fetch origin pull/428/head:pr-428; git worktree add out/wt-428 pr-428 Set-Location out/wt-428; .\tools\dev.ps1 | Out-Null; $ErrorActionPreference='Continue' cmake --preset dev -B out/build/dev-428 "-DINTAKE_PYTHON=C:/Users/james/Documents/Xbox2Windows/out/pe-env/Scripts/python.exe" cmake --build out/build/dev-428 # 387/387 targets, 0 errors ctest --test-dir out/build/dev-428 --no-tests=error -R '^pixel_aot_' --output-on-failure # default adapter + WARP: 2/2 Passed $env:XBOX2WINDOWS_ADAPTER='RX 9060 XT'; ctest --test-dir out/build/dev-428 --no-tests=error -R '^pixel_aot_hardware$' --output-on-failure $env:XBOX2WINDOWS_ADAPTER='RTX 5060 Ti'; ctest --test-dir out/build/dev-428 --no-tests=error -R '^pixel_aot_hardware$' --output-on-failure out/pe-env/Scripts/python.exe -B tests/pixel_aot_check.py binary out/tools/llvm-mc.exe out/tools/llvm15/bin/llvm-objcopy.exe out/tools/llvm15/bin/LLVM-C.dll ``` ### Results | Backend | Native wave | Result | Readback | |---|---|---|---| | WARP 10.0.26100.9711 | 4 | **pixel_aot_warp: Passed** (4.11 s) | `pixels=4096 channels=16384 max_absolute_error=0` | | AMD RX 9060 XT (driver 32.0.32029.2010) | 64 | **pixel_aot_hardware: Passed** (23.05 s default; explicit re-run also Passed) | `pixels=4096 channels=16384 max_absolute_error=0` | | NVIDIA RTX 5060 Ti (driver 32.0.16.2124) | 32 | **pixel_aot_hardware: Passed** | `pixels=4096 channels=16384 max_absolute_error=0` | - **Binary round trip (LLVM 15.0.7 wrapper + `llvm-objcopy` + `LLVM-C.dll`): exit 0** — `check_binary` is assert-only/silent on success and includes `with_constants(DPP_MOVREL_BODY)`: gfx1013 assembly → DXBC/XDAT/XBCH/FSSM → disassembly → lowering parity passed alongside all pre-existing fixtures. - The draw run's `FORM_COVERAGE_RECORD` confirms all four new opcodes translated on every backend: `v_movreld_b32_dpp v_movrels_b32_dpp v_movrelsd_b32_dpp v_movrelsd_2_b32_dpp` (both the runtime-dynamic-`m0` and static-`m0` constant sets exercised by the fixture). - No `pixel_aot_*` skips on any backend; capability skips outside this group (`bvh_wave64_*`, `wave_shuffle_warp`) did not occur here. - **First mismatch: none** — zero mismatches on any backend; nothing to quote. ### Wave-width verdict The wave-width-independence claim **holds on silicon as measured** for the dynamic-VGPR-indexing forms: bit-exact readback (`max_absolute_error=0` over 16384 channels) on all three native widths (WARP 4, RTX 5060 Ti 32, RX 9060 XT 64) — i.e. the `QuadReadAcross*` / `QuadReadLaneAt`-based conditional-select lowering behaves identically whether the quad occupies a full wave (WARP width 4), a quarter wave (RDNA4 wave 64), or half a Blackwell wave (width 32). Everything above was measured on this box except the native wave-width labels themselves, which are platform facts for these adapters. #421 (conversions) and #423 (extra f32/carry/dot) were verified in separate worktrees; separate comments posted there. _AI-assisted; runs executed locally._
thepatrickworld commented 2026-11-24 06:48:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-22T17:43:32Z.


@KomaGuy Independent AMD (RDNA4, native wave64) result on 2d16598. Measurements only, no code change.

Why this adapter matters for these forms

Your lowering turns quad-local DPP16/DPP8 relative moves into QuadReadAcross*, QuadReadLaneAt and WaveGetLaneIndex() & 3u. The RX 9070 XT is a native wave64 part, not wave32, so the quad-intrinsic path is exercised under a different lane topology than your adapter. That is the specific thing this run adds; it is not just a repeat of your numbers.

Environment

  • Windows 11 25H2, build 26200.9711
  • MSVC 19.44.35230 (toolset 14.44.35207), Windows SDK 10.0.26100.0, DXC 1.9.2602.17
  • AMD Radeon RX 9070 XT, vendor 1002, device 7550, driver 32.0.32029.2010. native_wave_width=64 logical_width=64 measured in the same worktree (bvh_waves_hardware); the pixel_aot harness does not print the wave width itself.
  • debug_layer=unavailable (Tools.Graphics.DirectX is NotPresent here)
  • Clean worktree of the PR head 2d16598.

Commands

cmake --preset dev
cmake --build --preset dev --parallel 12 --target offscreen_check
set XBOX2WINDOWS_ADAPTER=AMD Radeon RX 9070 XT
ctest --preset dev --no-tests=error -V -R "^pixel_aot_(hardware|warp)$"

Observed

1/2 Test #184: pixel_aot_hardware ... Passed
2/2 Test #191: pixel_aot_warp ..... Passed
Total Test time (real) = 37.55 sec
  • 111 draw cases on hardware per backend: 110 at pixels=4096 channels=16384 and one at pixels=64 channels=256, every one max_absolute_error=0.
  • 111 draw cases on WARP in the same build, same split, max_absolute_error=0.
  • No case reported a non-zero absolute error on either backend.

What it establishes

The static and runtime-dynamic m0 resolution, the split m0[9:0] / m0[25:16] destination path on v_movrelsd_2_b32_dpp, and the refusal set (unbounded m0, out-of-range or uninitialised indexed VGPRs, cross-quad DPP8, row_*/wave_*, partial masks, WQM) behave identically on a wave64 adapter, where WaveGetLaneIndex() & 3u has to select the same quad as on wave32.

The negative mutations built into DPP_MOVREL_BODY are part of the same run and did not fire, so the fixtures are still discriminating.

Limit

The harness prints per-draw counters but no per-program label, so this is a whole-suite result: I can say every one of the 111 draws matched with zero absolute error, not which line of output belongs to which of the four instructions.

AI-assisted; runs executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7083056020 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/428#issuecomment-7083056020). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-22T17:43:32Z. --- @KomaGuy **Independent AMD (RDNA4, native wave64) result on `2d16598`.** Measurements only, no code change. ### Why this adapter matters for these forms Your lowering turns quad-local `DPP16`/`DPP8` relative moves into `QuadReadAcross*`, `QuadReadLaneAt` and `WaveGetLaneIndex() & 3u`. The RX 9070 XT is a **native wave64** part, not wave32, so the quad-intrinsic path is exercised under a different lane topology than your adapter. That is the specific thing this run adds; it is not just a repeat of your numbers. ### Environment - Windows 11 25H2, build **26200.9711** - MSVC **19.44.35230** (toolset 14.44.35207), Windows SDK 10.0.26100.0, DXC **1.9.2602.17** - **AMD Radeon RX 9070 XT**, vendor 1002, device 7550, driver **32.0.32029.2010**. `native_wave_width=64 logical_width=64` measured in the same worktree (`bvh_waves_hardware`); the `pixel_aot` harness does not print the wave width itself. - `debug_layer=unavailable` (`Tools.Graphics.DirectX` is `NotPresent` here) - Clean worktree of the PR head `2d16598`. ### Commands ``` cmake --preset dev cmake --build --preset dev --parallel 12 --target offscreen_check set XBOX2WINDOWS_ADAPTER=AMD Radeon RX 9070 XT ctest --preset dev --no-tests=error -V -R "^pixel_aot_(hardware|warp)$" ``` ### Observed ``` 1/2 Test #184: pixel_aot_hardware ... Passed 2/2 Test #191: pixel_aot_warp ..... Passed Total Test time (real) = 37.55 sec ``` - **111 draw cases on hardware** per backend: 110 at `pixels=4096 channels=16384` and one at `pixels=64 channels=256`, every one `max_absolute_error=0`. - **111 draw cases on WARP** in the same build, same split, `max_absolute_error=0`. - No case reported a non-zero absolute error on either backend. ### What it establishes The static and runtime-dynamic `m0` resolution, the split `m0[9:0]` / `m0[25:16]` destination path on `v_movrelsd_2_b32_dpp`, and the refusal set (unbounded `m0`, out-of-range or uninitialised indexed VGPRs, cross-quad `DPP8`, `row_*`/`wave_*`, partial masks, WQM) behave identically on a wave64 adapter, where `WaveGetLaneIndex() & 3u` has to select the same quad as on wave32. The negative mutations built into `DPP_MOVREL_BODY` are part of the same run and did not fire, so the fixtures are still discriminating. ### Limit The harness prints per-draw counters but **no per-program label**, so this is a whole-suite result: I can say every one of the 111 draws matched with zero absolute error, not which line of output belongs to which of the four instructions. _AI-assisted; runs executed locally._
KomaGuy commented 2026-11-24 06:48:44 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KomaGuy on 2026-11-22T20:11:24Z.


Thanks @thepatrickworld for the independent RX 9070 XT wave64 verification on the v_movrel* forms! Holding this branch in place until the earlier DPP PRs land, then I'll refresh onto main.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7085014457 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/428#issuecomment-7085014457). Originally posted by [KomaGuy](https://github.com/KomaGuy) on 2026-11-22T20:11:24Z. --- Thanks @thepatrickworld for the independent RX 9070 XT wave64 verification on the `v_movrel*` forms! Holding this branch in place until the earlier DPP PRs land, then I'll refresh onto `main`.
FZNull commented 2026-11-24 06:48:53 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by FZNull on 2026-11-23T00:30:11Z.


Independent Windows verification on a physical GPU (the PR author verified only on Linux and left Windows to CI). I trial-merged this PR onto main and ran the draws here.

Merge state: conflicts against current main (5a2c782) in docs/experiments.md and tests/pixel_aot_check.py, both from additive hunks landing on the same regions (main gained #477/#475/#471 content there). tools/pixel_aot.py merged cleanly. I resolved the two hunks locally for measurement only; nothing was pushed. The PR needs a rebase to be mergeable (mergeable_state: dirty).

Environment: Windows 11 build 26300.9974, NVIDIA GeForce RTX 4060, driver 32.0.16.2124, debug layer unavailable, MSVC 19.50.35726, Windows SDK 10.0.26100.0, DXC 1.9.2609.5, Python 3.13.12.

Build: 881/881 targets, exit 0.

Check Result
pixel_aot_warp PASS, 12.65 s, max_absolute_error=0
pixel_aot_hardware Draw passes: exit 0, max_absolute_error=0 for every case. ctest reports Timeout because the test's TIMEOUT property is 60 s and the draw takes 61.2 s on this machine (see #448).
tests/rdna2_tools_check.py PASS
tests/form_coverage_check.py PASS

The four new forms do run in the hardware draw: FORM_COVERAGE_RECORD contains v_movreld_b32_dpp, v_movrels_b32_dpp, v_movrelsd_b32_dpp and v_movrelsd_2_b32_dpp, matching the four DPP16/DPP8 forms this PR declares.

The timeout is not a mismatch — the same test needs about 59 s on this adapter on unmodified main and crosses the 60 s limit once the extra draw cases are added. Raising or removing the per-test TIMEOUT, or landing the batch-device mode proposed in #448, would let the hardware job report the result instead of a timeout.

Verdict on behavior: the new DPP16/DPP8 v_movrel* lowering produces correct pixels on RTX 4060 hardware and WARP at this commit. The blocker for merging is the rebase, not the DQ.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7088401959 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/428#issuecomment-7088401959). Originally posted by [FZNull](https://github.com/FZNull) on 2026-11-23T00:30:11Z. --- Independent Windows verification on a physical GPU (the PR author verified only on Linux and left Windows to CI). I trial-merged this PR onto main and ran the draws here. **Merge state:** conflicts against current main (`5a2c782`) in `docs/experiments.md` and `tests/pixel_aot_check.py`, both from additive hunks landing on the same regions (main gained #477/#475/#471 content there). `tools/pixel_aot.py` merged cleanly. I resolved the two hunks locally for measurement only; nothing was pushed. The PR needs a rebase to be mergeable (`mergeable_state: dirty`). **Environment:** Windows 11 build 26300.9974, NVIDIA GeForce RTX 4060, driver 32.0.16.2124, debug layer unavailable, MSVC 19.50.35726, Windows SDK 10.0.26100.0, DXC 1.9.2609.5, Python 3.13.12. **Build:** 881/881 targets, exit 0. | Check | Result | |---|---| | `pixel_aot_warp` | **PASS**, 12.65 s, `max_absolute_error=0` | | `pixel_aot_hardware` | Draw passes: exit 0, `max_absolute_error=0` for every case. ctest reports `Timeout` because the test's `TIMEOUT` property is 60 s and the draw takes 61.2 s on this machine (see #448). | | `tests/rdna2_tools_check.py` | **PASS** | | `tests/form_coverage_check.py` | **PASS** | The four new forms do run in the hardware draw: `FORM_COVERAGE_RECORD` contains `v_movreld_b32_dpp`, `v_movrels_b32_dpp`, `v_movrelsd_b32_dpp` and `v_movrelsd_2_b32_dpp`, matching the four DPP16/DPP8 forms this PR declares. The timeout is not a mismatch — the same test needs about 59 s on this adapter on unmodified main and crosses the 60 s limit once the extra draw cases are added. Raising or removing the per-test `TIMEOUT`, or landing the batch-device mode proposed in #448, would let the hardware job report the result instead of a timeout. Verdict on behavior: the new DPP16/DPP8 `v_movrel*` lowering produces correct pixels on RTX 4060 hardware and WARP at this commit. The blocker for merging is the rebase, not the DQ. _AI-assisted._
thepatrickworld commented 2026-11-24 06:49:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-23T17:23:39Z.


Follow-up: the three earlier DPP PRs are now measured on RDNA4. Since your note above, #421, #423 and #419 all have an independent wave64 run plus a coverage audit:

All three are green on the RX 9070 XT, and in each case I checked the fixture against an external mutation rather than trusting the pass. Two of the findings are code-level rather than coverage-level, so they may matter for the refresh:

  1. #423: v_sin_f32_dpp and v_cos_f32_dpp emit sin((x) * 6.283185307179586f) directly, while v_sin_f32/v_cos_f32 go through sin32/cos32, which call turns() first. The comment above those helpers explains why the reduction is required. Same instruction, two lowerings: past |x| = 0.5 the DPP path loses precision and beyond ~2.7e6 it carries no information. No case in the fixture exceeds |x| = 0.25, so this is not caught.
  2. #419: dpp_sincos_f16 special-cases cosine && abs(phase) == 0.25 and !cosine && phase == 0.0, then falls through to pack16_rne(sin(phase * 2π)). At a half turn that lands on an f16 subnormal: WARP returns 0x8001, RDNA4 returns 0x0000 for the same shader. That is also why no endpoint case exists at ±0.5 turns — it would make _warp and _hardware disagree. A guard at ±0.5 turns, mirroring the cosine one, makes the case backend-stable.

Unrelated to this series, but it affects anyone measuring on AMD: main currently has one red hardware test, pixel_aot_comparisons_hardware (041ca68, case f32-cmp-1), caused by a subnormal comparison meeting the FP32 flush. Reported on #855.

On #428 itself: still 2d16598, base a8e2d398a, which is now 807 commits behind main (a8a88e1), with conflicts in both files. I am deliberately not measuring the trial merge — with eight conflict regions in tools/pixel_aot.py, that would be measuring the resolution, not your PR. Ping me when the rebase lands and I will re-run the wave64 draw on the refreshed head the same day, with the same command and adapter, so the numbers stay comparable with the 2d16598 run above.

AI-assisted; all runs and mutations executed locally on the adapter described in the earlier comment.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7108592365 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/428#issuecomment-7108592365). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-23T17:23:39Z. --- **Follow-up: the three earlier DPP PRs are now measured on RDNA4.** Since your note above, `#421`, `#423` and `#419` all have an independent wave64 run plus a coverage audit: - `#421` — https://github.com/R0Y00/Xbox2Windows/pull/421#issuecomment-7107500778 - `#423` — https://github.com/R0Y00/Xbox2Windows/pull/423#issuecomment-7107956814 - `#419` — https://github.com/R0Y00/Xbox2Windows/pull/419#issuecomment-7108482626 All three are green on the RX 9070 XT, and in each case I checked the fixture against an external mutation rather than trusting the pass. Two of the findings are code-level rather than coverage-level, so they may matter for the refresh: 1. **`#423`**: `v_sin_f32_dpp` and `v_cos_f32_dpp` emit `sin((x) * 6.283185307179586f)` directly, while `v_sin_f32`/`v_cos_f32` go through `sin32`/`cos32`, which call `turns()` first. The comment above those helpers explains why the reduction is required. Same instruction, two lowerings: past `|x| = 0.5` the DPP path loses precision and beyond ~2.7e6 it carries no information. No case in the fixture exceeds `|x| = 0.25`, so this is not caught. 2. **`#419`**: `dpp_sincos_f16` special-cases `cosine && abs(phase) == 0.25` and `!cosine && phase == 0.0`, then falls through to `pack16_rne(sin(phase * 2π))`. At a half turn that lands on an f16 subnormal: WARP returns `0x8001`, RDNA4 returns `0x0000` for the same shader. That is also why no endpoint case exists at `±0.5` turns — it would make `_warp` and `_hardware` disagree. A guard at `±0.5` turns, mirroring the cosine one, makes the case backend-stable. Unrelated to this series, but it affects anyone measuring on AMD: `main` currently has one red hardware test, `pixel_aot_comparisons_hardware` (`041ca68`, case `f32-cmp-1`), caused by a subnormal comparison meeting the FP32 flush. Reported on `#855`. On `#428` itself: still `2d16598`, base `a8e2d398a`, which is now **807 commits behind** `main` (`a8a88e1`), with conflicts in both files. I am deliberately not measuring the trial merge — with eight conflict regions in `tools/pixel_aot.py`, that would be measuring the resolution, not your PR. Ping me when the rebase lands and I will re-run the wave64 draw on the refreshed head the same day, with the same command and adapter, so the numbers stay comparable with the `2d16598` run above. _AI-assisted; all runs and mutations executed locally on the adapter described in the earlier comment._
KomaGuy commented 2026-11-24 06:49:35 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KomaGuy on 2026-11-23T19:52:38Z.


Thanks @FZNull for the RTX 4060 verification and @thepatrickworld for the thorough RDNA4 audits across the whole series! I'm addressing the feedback on #421 and #423 now, and I'll rebase #428 onto main (with its own split CTest entry) and ping you for a wave64 re-run once the earlier DPP PRs land.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7112234547 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/428#issuecomment-7112234547). Originally posted by [KomaGuy](https://github.com/KomaGuy) on 2026-11-23T19:52:38Z. --- Thanks @FZNull for the RTX 4060 verification and @thepatrickworld for the thorough RDNA4 audits across the whole series! I'm addressing the feedback on #421 and #423 now, and I'll rebase #428 onto `main` (with its own split CTest entry) and ping you for a wave64 re-run once the earlier DPP PRs land.
R0Y00 commented 2026-11-24 06:49:51 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T23:18:11Z.


#421 has now merged. Please go ahead with the refresh you described. #428 currently conflicts in the lowerer, draw fixture and experiment notes. Please keep the standalone CTest and the static/dynamic m0 and overlap controls. Once the refreshed head is ready, the independent wave64 rerun can use that exact revision.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7116799657 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/428#issuecomment-7116799657). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T23:18:11Z. --- #421 has now merged. Please go ahead with the refresh you described. #428 currently conflicts in the lowerer, draw fixture and experiment notes. Please keep the standalone CTest and the static/dynamic m0 and overlap controls. Once the refreshed head is ready, the independent wave64 rerun can use that exact revision.
thepatrickworld commented 2026-11-24 06:49:52 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-23T23:35:04Z.


Refreshed head d0bede8c (merge of 2d16598 with 45ad903) measured on the RX 9070 XT, as asked.

  • adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550, backend=hardware, driver 32.0.32029.2010, debug_layer=unavailable, Windows build 26200.9711, XBOX2WINDOWS_ADAPTER set to the adapter name
  • DXC 1.9.2602.17, preset dev, clean tree (git status --porcelain empty), INTAKE_PYTHON set to the local venv, 122 ^pixel_aot_ entries registered
  • ctest --preset dev --no-tests=error -R '^pixel_aot_dpp_movrel_' -V, three consecutive runs
pixel_aot_dpp_movrel_hardware ....  Passed  2.14 / 1.79 / 1.87 s
pixel_aot_dpp_movrel_warp ........  Passed  1.44 / 1.14 / 1.24 s

Exit 0 in each run, both entries passed in all three (six executions, none skipped), and each draw reports pixels=4096 channels=16384 max_absolute_error=0.

The five mutation controls are part of the same exit code rather than a separate line: pixel_aot_check.py:15758-15775 raises unless every mutated draw returns 1 with a pixel_mismatch in stderr, so a 0 here means all five were rejected after the rebase.

Scope, so this is not read as more than it is: only the ^pixel_aot_dpp_movrel_ selection ran at this head; the rest of the hardware suite was not replayed there. Wave width is not printed by the harness either — the 64 lanes on this adapter were measured with native_wave_width at 2d16598, not at this head, so treat "native wave64" as the architecture, not as a fresh measurement.

What is new is the split entry, not the coverage: these four forms already had hardware runs in this thread through the whole pixel_aot_hardware entry — 5654af9e on the RX 9060 XT and RTX 5060 Ti, and 2d16598 on this adapter.

Two things on the merge itself. git merge-tree --write-tree origin/main d0bede8 reports no conflict against main at d4cbfcd. And the Linux jobs on this head passed at 23:27Z (Run platform-independent Python checks, Assemble and translate gfx1013 fixtures); the two Windows jobs were still in progress when I looked, so nothing here should be read as their result.

One suggestion for the PR body, since it is the reason the refresh matters: the Linux evidence is still stated on top of ac48a50, which the refresh supersedes. The pixel-binary job at d0bede8c runs pixel_aot_check.py binary (windows.yml:34) and passed, so that line can move to the head — "Linux x86_64 checks, pixel_aot_check.py binary included, pass in CI at d0bede8c; Windows DXC, WARP and hardware are covered by the reruns in this thread."

AI-assisted; one machine, one adapter.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7117126924 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/428#issuecomment-7117126924). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-23T23:35:04Z. --- Refreshed head `d0bede8c` (merge of `2d16598` with `45ad903`) measured on the RX 9070 XT, as asked. - `adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550`, `backend=hardware`, driver `32.0.32029.2010`, `debug_layer=unavailable`, Windows build `26200.9711`, `XBOX2WINDOWS_ADAPTER` set to the adapter name - DXC `1.9.2602.17`, preset `dev`, clean tree (`git status --porcelain` empty), `INTAKE_PYTHON` set to the local venv, 122 `^pixel_aot_` entries registered - `ctest --preset dev --no-tests=error -R '^pixel_aot_dpp_movrel_' -V`, three consecutive runs ``` pixel_aot_dpp_movrel_hardware .... Passed 2.14 / 1.79 / 1.87 s pixel_aot_dpp_movrel_warp ........ Passed 1.44 / 1.14 / 1.24 s ``` Exit 0 in each run, both entries passed in all three (six executions, none skipped), and each draw reports `pixels=4096 channels=16384 max_absolute_error=0`. The five mutation controls are part of the same exit code rather than a separate line: `pixel_aot_check.py:15758-15775` raises unless every mutated draw returns 1 with a `pixel_mismatch` in stderr, so a 0 here means all five were rejected after the rebase. Scope, so this is not read as more than it is: only the `^pixel_aot_dpp_movrel_` selection ran at this head; the rest of the hardware suite was not replayed there. Wave width is not printed by the harness either — the 64 lanes on this adapter were measured with `native_wave_width` at `2d16598`, not at this head, so treat "native wave64" as the architecture, not as a fresh measurement. What is new is the split entry, not the coverage: these four forms already had hardware runs in this thread through the whole `pixel_aot_hardware` entry — `5654af9e` on the RX 9060 XT and RTX 5060 Ti, and `2d16598` on this adapter. Two things on the merge itself. `git merge-tree --write-tree origin/main d0bede8` reports no conflict against `main` at `d4cbfcd`. And the Linux jobs on this head passed at 23:27Z (`Run platform-independent Python checks`, `Assemble and translate gfx1013 fixtures`); the two Windows jobs were still in progress when I looked, so nothing here should be read as their result. One suggestion for the PR body, since it is the reason the refresh matters: the Linux evidence is still stated on top of `ac48a50`, which the refresh supersedes. The `pixel-binary` job at `d0bede8c` runs `pixel_aot_check.py binary` (`windows.yml:34`) and passed, so that line can move to the head — "Linux x86_64 checks, `pixel_aot_check.py binary` included, pass in CI at `d0bede8c`; Windows DXC, WARP and hardware are covered by the reruns in this thread." _AI-assisted; one machine, one adapter._
KomaGuy commented 2026-11-24 06:49:52 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KomaGuy on 2026-11-23T23:42:27Z.


Refreshed onto main (45ad903c, after #419, #421, #423, and the #1030 uniform quad-read bit-mask fix) in d0bede8c, with all 4 CI checks green:

  • Reused main's shared parse_dpp and emit_quad_swizzle_u32 helpers (removing the duplicate DPP helpers and rejecting unproved bound_ctrl: / fi: modifiers).
  • Added TrackedScalar so any scalar overwrite automatically invalidates scalar_mask (with a negative control in check_controls).
  • Split the draw into its own CTest entry pixel_aot_dpp_movrel_{hardware,warp} (draw-dpp-movrel, with FORM_COVERAGE_RECORD) and updated docs/experiments.md.

@thepatrickworld — refreshed head is d0bede8c and MERGEABLE if you'd like to re-run pixel_aot_dpp_movrel_hardware on RDNA4.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7117269681 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/428#issuecomment-7117269681). Originally posted by [KomaGuy](https://github.com/KomaGuy) on 2026-11-23T23:42:27Z. --- Refreshed onto `main` (`45ad903c`, after #419, #421, #423, and the #1030 uniform quad-read bit-mask fix) in `d0bede8c`, with all 4 CI checks green: - Reused `main`'s shared `parse_dpp` and `emit_quad_swizzle_u32` helpers (removing the duplicate DPP helpers and rejecting unproved `bound_ctrl:` / `fi:` modifiers). - Added `TrackedScalar` so any scalar overwrite automatically invalidates `scalar_mask` (with a negative control in `check_controls`). - Split the draw into its own CTest entry `pixel_aot_dpp_movrel_{hardware,warp}` (`draw-dpp-movrel`, with `FORM_COVERAGE_RECORD`) and updated `docs/experiments.md`. @thepatrickworld — refreshed head is `d0bede8c` and `MERGEABLE` if you'd like to re-run `pixel_aot_dpp_movrel_hardware` on RDNA4.
thepatrickworld commented 2026-11-24 06:49:53 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-23T23:49:54Z.


Already run — the rerun on d0bede8c is above, posted before your message crossed mine: pixel_aot_dpp_movrel_hardware Passed 2.14 / 1.79 / 1.87 s and _warp Passed 1.44 / 1.14 / 1.24 s, three runs each, max_absolute_error=0 over 16384 channels, no skips, on an RX 9070 XT (1002:7550, driver 32.0.32029.2010).

So nothing is waiting on me for this head. The one thing I flagged there and would repeat: wave width is not printed by the harness, so the "wave64" in the run is the architecture, not a measurement at d0bede8c.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7117410376 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/428#issuecomment-7117410376). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-23T23:49:54Z. --- Already run — the rerun on `d0bede8c` is above, posted before your message crossed mine: `pixel_aot_dpp_movrel_hardware` Passed 2.14 / 1.79 / 1.87 s and `_warp` Passed 1.44 / 1.14 / 1.24 s, three runs each, `max_absolute_error=0` over 16384 channels, no skips, on an RX 9070 XT (`1002:7550`, driver `32.0.32029.2010`). So nothing is waiting on me for this head. The one thing I flagged there and would repeat: wave width is not printed by the harness, so the "wave64" in the run is the architecture, not a measurement at `d0bede8c`. _AI-assisted._
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
R0Y00/Xbox2Windows!422
No description provided.