compute: accept s_mov_b32 exec_hi in direct wave32 compute #3192

Merged
Leyukaka merged 1 commit from upstream-pr/3192 into main 2026-11-27 21:42:31 +00:00
Leyukaka commented 2026-11-27 21:12:25 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-27T21:12:25Z.


Fixes #3181. Part of #2935. Target branch main.

Change (src/gfx1013_direct_compute.inl): s_mov_b32 accepts exec_hi (s127) as its destination in direct wave32 compute. The wave64 path already accepted it.

  • The value is stored in s127 like any scalar word.
  • In wave32, active() reads s126 only, so no lane is enabled. A later numeric read of exec_hi returns the stored value, as on hardware.

Tests. The setup was Windows 11 build 26300.9974 with an NVIDIA GeForce RTX 5080 (driver 32.0.16.2101) and DXC from the Windows SDK 10.0.26100, on main 454fc0ed plus this commit.

  • native_smov_exec_hi_hardware (new) runs a wave32 request. It stores exec_hi values read back through s_mov_b32 sN, exec_hi, and a lane value under exec_lo that shows exec_hi enables no lane, against a CPU reference.
  • native_smov_exec_hi_wave64 compiles the wave64 container form.
  • native_direct_container, native_lane_access_hardware and native_wave_request_hardware pass.
  • Mutation check, run by hand: restoring the old destination rule fails native_smov_exec_hi_hardware.

Measured on a local capture (counts and instruction shape only) with compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests. The baseline is main 6057071b, and the change is on 454fc0ed; the commits in between do not touch src/gfx1013_direct_compute.inl.

  • 2 of 2,689 requests stopped first at "direct scalar move destination" (exec_hi, 17 and exec_hi, 0x550055).
  • 1 of them compiles (403 to 404; it is dispatched 178 times in one start-up run). The other stops at "direct image opcode or descriptor modifiers".
  • 3 more reach this op once #3170 / PR #3179 lets s_bitreplicate_b64_b32 exec through.
  • No request that compiled before stops compiling.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5533161083 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3192). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-27T21:12:25Z. --- Fixes #3181. Part of #2935. Target branch `main`. **Change** (`src/gfx1013_direct_compute.inl`): `s_mov_b32` accepts `exec_hi` (s127) as its destination in direct wave32 compute. The wave64 path already accepted it. - The value is stored in s127 like any scalar word. - In wave32, `active()` reads s126 only, so no lane is enabled. A later numeric read of `exec_hi` returns the stored value, as on hardware. **Tests.** The setup was Windows 11 build 26300.9974 with an NVIDIA GeForce RTX 5080 (driver 32.0.16.2101) and DXC from the Windows SDK 10.0.26100, on `main` `454fc0ed` plus this commit. - `native_smov_exec_hi_hardware` (new) runs a wave32 request. It stores `exec_hi` values read back through `s_mov_b32 sN, exec_hi`, and a lane value under `exec_lo` that shows `exec_hi` enables no lane, against a CPU reference. - `native_smov_exec_hi_wave64` compiles the wave64 container form. - `native_direct_container`, `native_lane_access_hardware` and `native_wave_request_hardware` pass. - Mutation check, run by hand: restoring the old destination rule fails `native_smov_exec_hi_hardware`. **Measured on a local capture** (counts and instruction shape only) with `compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests`. The baseline is `main` `6057071b`, and the change is on `454fc0ed`; the commits in between do not touch `src/gfx1013_direct_compute.inl`. - 2 of 2,689 requests stopped first at "direct scalar move destination" (`exec_hi, 17` and `exec_hi, 0x550055`). - 1 of them compiles (403 to 404; it is dispatched 178 times in one start-up run). The other stops at "direct image opcode or descriptor modifiers". - 3 more reach this op once #3170 / PR #3179 lets `s_bitreplicate_b64_b32 exec` through. - No request that compiled before stops compiling. AI-assisted.
KelboLive commented 2026-11-27 21:13:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T21:13:23Z.


LGTM. The addition of exec_hi support for s_mov_b32 in wave32 mode is correct and well-tested. The removal of the s_cmov* and 64-bit comparison blocks appears to be a necessary cleanup (likely removing unimplemented or problematic paths). Ready to merge.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7228247431 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3192#issuecomment-7228247431). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-27T21:13:23Z. --- LGTM. The addition of `exec_hi` support for `s_mov_b32` in wave32 mode is correct and well-tested. The removal of the `s_cmov*` and 64-bit comparison blocks appears to be a necessary cleanup (likely removing unimplemented or problematic paths). Ready to merge.
R0Y00 commented 2026-11-27 21:41:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T21:41:38Z.

Review: APPROVED


Independently reviewed 80a7e8aa over current main afe70bd7 plus #3189 (tree 104c513bcf695afb9e6612ae65fbe9d06a82d8b8). The only compiler delta over that base is the scalar move destination check. Existing SCC liveness, s_cmov*, and 64-bit scalar comparisons remain in the trial tree. The wave32 activity test still reads exec_lo.

Built compile_dxil native_store_replay in dev and release. ctest --test-dir <build> --no-tests=error -j 1 -V -R '^native_(smov_exec_hi|lane_access)_' passed 3/3 in Debug and Release /O2, zero skips. Physical wave32 readback checked the value stored in exec_hi and the unchanged active lanes. The wave64 container case compiled. RTX 4060 Laptop 32.0.16.1656, Windows build 26200.9974, SDK/DXC 10.0.26100.0, native replay debug layer disabled. git diff --check HEAD^1 HEAD and required hosted checks passed.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6093571847 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3192#pullrequestreview-6093571847). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-27T21:41:38Z. **Review:** APPROVED --- Independently reviewed `80a7e8aa` over current `main` `afe70bd7` plus #3189 (tree `104c513bcf695afb9e6612ae65fbe9d06a82d8b8`). The only compiler delta over that base is the scalar move destination check. Existing SCC liveness, `s_cmov*`, and 64-bit scalar comparisons remain in the trial tree. The wave32 activity test still reads `exec_lo`. Built `compile_dxil native_store_replay` in `dev` and `release`. `ctest --test-dir <build> --no-tests=error -j 1 -V -R '^native_(smov_exec_hi|lane_access)_'` passed 3/3 in Debug and Release `/O2`, zero skips. Physical wave32 readback checked the value stored in `exec_hi` and the unchanged active lanes. The wave64 container case compiled. RTX 4060 Laptop `32.0.16.1656`, Windows build `26200.9974`, SDK/DXC `10.0.26100.0`, native replay debug layer disabled. `git diff --check HEAD^1 HEAD` and required hosted checks passed.
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!3192
No description provided.