compute: accept VCC and EXEC as sources in 64-bit scalar shifts #3406

Manually merged
github merged 1 commit from github-bot/gh-3404 into gh-pr/3404/base 2026-11-29 08:45:48 +00:00 AGit
Owner

@⁠Ammmae0x on GitHub · 2026-11-28 22:20 UTC · original
Ammmae0x:compute/salu-shift64-vcc-exec → main · +283 −5 · 5 files · 1 commits · merged 2026-11-29 08:42 UTC

Change

Accept VCC (106) and EXEC (126) as 64-bit S0 sources in s_lshl_b64, s_lshr_b64 and
s_ashr_i64 in the direct C++ compute path (src/gfx1013_direct_compute.inl).

Refs #3226, #2935

The shift handler previously accepted only aligned SGPR pairs as S0
(s0 <= 104 && !(s0 & 1)), refusing VCC and EXEC even though i.dst already accepts VCC
and sibling 64-bit ops (s_not_b64, s_cselect_b64, s_bcnt*/s_ff*/s_flbit*) accept
VCC/EXEC as 64-bit sources. One line changes s0_pair to also accept s0 == 106 || s0 == 126;
lo = operand32(i, s0) and hi = operand32(i, s0 + 1) are read before writing i.dst / i.dst + 1,
so in-place s_lshl_b64 vcc, vcc, k / s_lshr_b64 vcc, vcc, k keep their original inputs, and
SCC = (D != 0) is unchanged. Odd SGPRs, M0 (124), EXEC as destination and invalid s1
shift sources are still refused with the exact existing error strings.

This is AI-assisted.

Verification

Commit under test: b1fca1f08105f17b1b045f3a71c1eaec3d7ede26
(compute: accept VCC and EXEC as sources in 64-bit scalar shifts), branch
compute/salu-shift64-vcc-exec, from origin/main 0614f68c.

Linux (this host; no Windows toolchain, no GPU):

  • /tmp/pe-env/bin/python -B /tmp/shift64_vcc_exec_harness.py (offline harness in /tmp, not in
    the repo; decodes every case program with tools/disasm_rdna2.py and cross-checks eval_shift
    against an independent brute-force reference):
    harness OK: 18 cases x wave32/wave64, shift encodings, SCC pack, store offsets, references and s0_pair guard all match
  • Spot-mutations, each killed by the harness and restored cleanly (run on copies in /tmp, never
    in the worktree): M1 s_lshl_b64 reference computed as a right shift, M2 in-place op emitted
    first instead of last, M3 EXEC restore dropped, M4 s0 == 106 || s0 == 126 dropped from the
    C++ guard, M5 SCC pack using the wrong temp register — all 5 killed.
  • /tmp/pe-env/bin/python -B tests/form_coverage_check.py: form coverage checks passed
  • /tmp/pe-env/bin/python -B tests/docs_links_check.py: Checked 160 Markdown files and 682 links.
  • /tmp/pe-env/bin/python -B tests/bidi_controls_check.py: Checked 2582 tracked source, script and build/CI files: no bidirectional controls.
  • python3 -B -m py_compile on both touched test files: pass.
  • g++ -std=c++20 -Wall -Wextra on the guard expression: accepts 0/104/106/126, refuses
    23/105/124/127/107.
  • All 10 refusal encodings in the new test were decoded with tools/disasm_rdna2.py and match
    the intended instructions.

Not run here (needs Windows): cmake --build --preset dev --target compile_dxil native_store_replay
and ctest --preset dev --no-tests=error -R '^(native_salu_shift64_vcc_exec_|native_salu_shift64_)' -V,
including native_salu_shift64_vcc_exec_hardware on a real adapter (exit 77 is a skip, not a pass).

Evidence and follow-up

New fixture tests/native_salu_shift64_vcc_exec_check.py (synthetic; follows
tests/native_salu_shift64_check.py and the Task 2 native_salu_bitscan64_vcc test, which passed
Windows verification 5/5 on the first try): each of the 18 hardware dispatches runs all three
shifts from one VCC/EXEC source value and stores four planes (one result plane per op plus a
packed SCC plane: bit 0 lshl, bit 1 lshr, bit 2 ashr). Coverage: wave64 amounts 0, 1, 31, 32, 63, 64 (64 & 63 wraps to 0) for both sources, wave32 amounts 0, 32, 64 for both sources,
in-place s_lshl_b64 vcc, vcc, 1 and s_lshr_b64 vcc, vcc, 32 folded into the wave64 vcc
dispatches, sign-bit preservation vs zero-fill (s_ashr_i64 vs s_lshr_b64), and SCC = (D != 0)
per op (primed opposite before each op, so every op must write SCC). Negative controls refuse
M0, odd SGPR, EXEC as destination, exec_hi alone as S0, and invalid s1 (VCC/EXEC/M0).

Assumptions: EXEC as a source narrows the active lane mask, so the fixture restores EXEC to
all ones before the vector readback stores (wave64: s_mov_b64 exec, -1; wave32: the s_mov_b32
pair). The 12-bit MUBUF store offset caps wave64 at four planes, so the three SCC bits are packed
into one word with s_or_b32/s_lshl_b32 instead of a fifth plane.

The existing tests/native_salu_shift64_check.py obsolete VCC-as-S0 refusal is replaced with
an M0 refusal; the EXEC destination refusal and the VCC-as-S1 refusal are intact.
docs/experiments/native-direct-salu-shift64.md documents VCC/EXEC as S0.

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.

Windows Verification (b1fca1f0)

  • Environment: Windows build 26100, MSVC 19.50.35727.0, adapter NVIDIA GeForce RTX 4050 Laptop GPU (driver 32.0.15.9186, XBOX2WINDOWS_ADAPTER=NVIDIA), D3D12 debug layer off, commit b1fca1f08105f17b1b045f3a71c1eaec3d7ede26.
  • cmake --build --preset dev --target compile_dxil native_store_replay -> exit 0
  • cmake --build --preset release --target compile_dxil native_store_replay -> exit 0
  • ctest --preset dev --no-tests=error -R '^(native_salu_shift64_vcc_exec_|native_salu_shift64_)' --output-on-failure -> 4/4 passed (0 skips)
  • ctest --preset release --no-tests=error -R '^(native_salu_shift64_vcc_exec_|native_salu_shift64_)' --output-on-failure -> 4/4 passed (0 skips)
  • .\out\pe-env\Scripts\python.exe -B tests/form_coverage_check.py -> form coverage checks passed (exit 0)
  • .\out\pe-env\Scripts\python.exe -B tests/docs_links_check.py -> Self-test passed. Checked 160 Markdown files and 682 links. (exit 0)
  • .\out\pe-env\Scripts\python.exe -B tests/bidi_controls_check.py -> Self-test passed. Checked 2584 tracked source, script and build/CI files: no bidirectional controls. (exit 0)
# dev preset (4/4 passed, 0 skips)
2762: compiled s_lshl_b64, s_lshr_b64 and s_ashr_i64 (including descriptor overwrite); 7 invalid operand/destination forms refused; 6 reference mutants differ
1/4 Test #2762: native_salu_shift64_controls ............   Passed    0.83 sec
2/4 Test #2763: native_salu_shift64_hardware ............   Passed   10.89 sec
2764: compiled s_lshl_b64, s_lshr_b64 and s_ashr_i64 from VCC and EXEC sources (including in-place VCC); 10 invalid operand/destination forms refused; 4 reference mutants differ
3/4 Test #2764: native_salu_shift64_vcc_exec_controls ...   Passed    0.87 sec
2765: wave64 vcc amount=0: results, packed SCC and guards matched
2765: wave64 vcc amount=1 inplace lshl: results, packed SCC and guards matched
2765: wave64 vcc amount=31: results, packed SCC and guards matched
2765: wave64 vcc amount=32 inplace lshr: results, packed SCC and guards matched
2765: wave64 vcc amount=63: results, packed SCC and guards matched
2765: wave64 vcc amount=64: results, packed SCC and guards matched
2765: wave64 exec amount=0: results, packed SCC and guards matched
2765: wave64 exec amount=1: results, packed SCC and guards matched
2765: wave64 exec amount=31: results, packed SCC and guards matched
2765: wave64 exec amount=32: results, packed SCC and guards matched
2765: wave64 exec amount=63: results, packed SCC and guards matched
2765: wave64 exec amount=64: results, packed SCC and guards matched
2765: wave32 vcc amount=0: results, packed SCC and guards matched
2765: wave32 vcc amount=32: results, packed SCC and guards matched
2765: wave32 vcc amount=64: results, packed SCC and guards matched
2765: wave32 exec amount=0: results, packed SCC and guards matched
2765: wave32 exec amount=32: results, packed SCC and guards matched
2765: wave32 exec amount=64: results, packed SCC and guards matched
4/4 Test #2765: native_salu_shift64_vcc_exec_hardware ...   Passed    5.18 sec
The following tests passed:
	native_salu_shift64_controls
	native_salu_shift64_hardware
	native_salu_shift64_vcc_exec_controls
	native_salu_shift64_vcc_exec_hardware
100% tests passed, 0 tests failed out of 4
Total Test time (real) =  17.93 sec

# release preset (4/4 passed, 0 skips)
2762: compiled s_lshl_b64, s_lshr_b64 and s_ashr_i64 (including descriptor overwrite); 7 invalid operand/destination forms refused; 6 reference mutants differ
1/4 Test #2762: native_salu_shift64_controls ............   Passed    0.58 sec
2/4 Test #2763: native_salu_shift64_hardware ............   Passed    8.56 sec
2764: compiled s_lshl_b64, s_lshr_b64 and s_ashr_i64 from VCC and EXEC sources (including in-place VCC); 10 invalid operand/destination forms refused; 4 reference mutants differ
3/4 Test #2764: native_salu_shift64_vcc_exec_controls ...   Passed    0.58 sec
2765: wave64 vcc amount=0: results, packed SCC and guards matched
2765: wave64 vcc amount=1 inplace lshl: results, packed SCC and guards matched
2765: wave64 vcc amount=31: results, packed SCC and guards matched
2765: wave64 vcc amount=32 inplace lshr: results, packed SCC and guards matched
2765: wave64 vcc amount=63: results, packed SCC and guards matched
2765: wave64 vcc amount=64: results, packed SCC and guards matched
2765: wave64 exec amount=0: results, packed SCC and guards matched
2765: wave64 exec amount=1: results, packed SCC and guards matched
2765: wave64 exec amount=31: results, packed SCC and guards matched
2765: wave64 exec amount=32: results, packed SCC and guards matched
2765: wave64 exec amount=63: results, packed SCC and guards matched
2765: wave64 exec amount=64: results, packed SCC and guards matched
2765: wave32 vcc amount=0: results, packed SCC and guards matched
2765: wave32 vcc amount=32: results, packed SCC and guards matched
2765: wave32 vcc amount=64: results, packed SCC and guards matched
2765: wave32 exec amount=0: results, packed SCC and guards matched
2765: wave32 exec amount=32: results, packed SCC and guards matched
2765: wave32 exec amount=64: results, packed SCC and guards matched
4/4 Test #2765: native_salu_shift64_vcc_exec_hardware ...   Passed    4.09 sec
The following tests passed:
	native_salu_shift64_controls
	native_salu_shift64_hardware
	native_salu_shift64_vcc_exec_controls
	native_salu_shift64_vcc_exec_hardware
100% tests passed, 0 tests failed out of 4
Total Test time (real) =  13.92 sec
**@⁠Ammmae0x** on GitHub · 2026-11-28 22:20 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3404) `Ammmae0x:compute/salu-shift64-vcc-exec` → `main` · +283 −5 · 5 files · 1 commits · merged 2026-11-29 08:42 UTC ## Change Accept `VCC` (`106`) and `EXEC` (`126`) as 64-bit `S0` sources in `s_lshl_b64`, `s_lshr_b64` and `s_ashr_i64` in the direct C++ compute path (`src/gfx1013_direct_compute.inl`). Refs #3226, #2935 The shift handler previously accepted only aligned SGPR pairs as `S0` (`s0 <= 104 && !(s0 & 1)`), refusing `VCC` and `EXEC` even though `i.dst` already accepts `VCC` and sibling 64-bit ops (`s_not_b64`, `s_cselect_b64`, `s_bcnt*`/`s_ff*`/`s_flbit*`) accept `VCC`/`EXEC` as 64-bit sources. One line changes `s0_pair` to also accept `s0 == 106 || s0 == 126`; `lo = operand32(i, s0)` and `hi = operand32(i, s0 + 1)` are read before writing `i.dst` / `i.dst + 1`, so in-place `s_lshl_b64 vcc, vcc, k` / `s_lshr_b64 vcc, vcc, k` keep their original inputs, and `SCC = (D != 0)` is unchanged. Odd SGPRs, `M0` (`124`), `EXEC` as destination and invalid `s1` shift sources are still refused with the exact existing error strings. This is AI-assisted. ## Verification Commit under test: `b1fca1f08105f17b1b045f3a71c1eaec3d7ede26` (`compute: accept VCC and EXEC as sources in 64-bit scalar shifts`), branch `compute/salu-shift64-vcc-exec`, from `origin/main` `0614f68c`. Linux (this host; no Windows toolchain, no GPU): - `/tmp/pe-env/bin/python -B /tmp/shift64_vcc_exec_harness.py` (offline harness in `/tmp`, not in the repo; decodes every case program with `tools/disasm_rdna2.py` and cross-checks `eval_shift` against an independent brute-force reference): `harness OK: 18 cases x wave32/wave64, shift encodings, SCC pack, store offsets, references and s0_pair guard all match` - Spot-mutations, each killed by the harness and restored cleanly (run on copies in `/tmp`, never in the worktree): M1 `s_lshl_b64` reference computed as a right shift, M2 in-place op emitted first instead of last, M3 `EXEC` restore dropped, M4 `s0 == 106 || s0 == 126` dropped from the C++ guard, M5 SCC pack using the wrong temp register — all 5 killed. - `/tmp/pe-env/bin/python -B tests/form_coverage_check.py`: `form coverage checks passed` - `/tmp/pe-env/bin/python -B tests/docs_links_check.py`: `Checked 160 Markdown files and 682 links.` - `/tmp/pe-env/bin/python -B tests/bidi_controls_check.py`: `Checked 2582 tracked source, script and build/CI files: no bidirectional controls.` - `python3 -B -m py_compile` on both touched test files: pass. - `g++ -std=c++20 -Wall -Wextra` on the guard expression: accepts `0`/`104`/`106`/`126`, refuses `23`/`105`/`124`/`127`/`107`. - All 10 refusal encodings in the new test were decoded with `tools/disasm_rdna2.py` and match the intended instructions. Not run here (needs Windows): `cmake --build --preset dev --target compile_dxil native_store_replay` and `ctest --preset dev --no-tests=error -R '^(native_salu_shift64_vcc_exec_|native_salu_shift64_)' -V`, including `native_salu_shift64_vcc_exec_hardware` on a real adapter (exit 77 is a skip, not a pass). ## Evidence and follow-up New fixture `tests/native_salu_shift64_vcc_exec_check.py` (synthetic; follows `tests/native_salu_shift64_check.py` and the Task 2 `native_salu_bitscan64_vcc` test, which passed Windows verification 5/5 on the first try): each of the 18 hardware dispatches runs all three shifts from one `VCC`/`EXEC` source value and stores four planes (one result plane per op plus a packed SCC plane: bit 0 lshl, bit 1 lshr, bit 2 ashr). Coverage: wave64 amounts `0, 1, 31, 32, 63, 64` (`64 & 63` wraps to `0`) for both sources, wave32 amounts `0, 32, 64` for both sources, in-place `s_lshl_b64 vcc, vcc, 1` and `s_lshr_b64 vcc, vcc, 32` folded into the wave64 `vcc` dispatches, sign-bit preservation vs zero-fill (`s_ashr_i64` vs `s_lshr_b64`), and `SCC = (D != 0)` per op (primed opposite before each op, so every op must write `SCC`). Negative controls refuse `M0`, odd SGPR, `EXEC` as destination, `exec_hi` alone as `S0`, and invalid `s1` (`VCC`/`EXEC`/`M0`). Assumptions: `EXEC` as a source narrows the active lane mask, so the fixture restores `EXEC` to all ones before the vector readback stores (wave64: `s_mov_b64 exec, -1`; wave32: the `s_mov_b32` pair). The 12-bit MUBUF store offset caps wave64 at four planes, so the three SCC bits are packed into one word with `s_or_b32`/`s_lshl_b32` instead of a fifth plane. The existing `tests/native_salu_shift64_check.py` obsolete `VCC`-as-`S0` refusal is replaced with an `M0` refusal; the `EXEC` destination refusal and the `VCC`-as-`S1` refusal are intact. `docs/experiments/native-direct-salu-shift64.md` documents `VCC`/`EXEC` as `S0`. ## 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. ### Windows Verification (`b1fca1f0`) - **Environment:** Windows build `26100`, MSVC 19.50.35727.0, adapter `NVIDIA GeForce RTX 4050 Laptop GPU` (driver `32.0.15.9186`, `XBOX2WINDOWS_ADAPTER=NVIDIA`), D3D12 debug layer off, commit `b1fca1f08105f17b1b045f3a71c1eaec3d7ede26`. - `cmake --build --preset dev --target compile_dxil native_store_replay` -> exit `0` - `cmake --build --preset release --target compile_dxil native_store_replay` -> exit `0` - `ctest --preset dev --no-tests=error -R '^(native_salu_shift64_vcc_exec_|native_salu_shift64_)' --output-on-failure` -> `4/4` passed (`0` skips) - `ctest --preset release --no-tests=error -R '^(native_salu_shift64_vcc_exec_|native_salu_shift64_)' --output-on-failure` -> `4/4` passed (`0` skips) - `.\out\pe-env\Scripts\python.exe -B tests/form_coverage_check.py` -> `form coverage checks passed` (exit `0`) - `.\out\pe-env\Scripts\python.exe -B tests/docs_links_check.py` -> `Self-test passed. Checked 160 Markdown files and 682 links.` (exit `0`) - `.\out\pe-env\Scripts\python.exe -B tests/bidi_controls_check.py` -> `Self-test passed. Checked 2584 tracked source, script and build/CI files: no bidirectional controls.` (exit `0`) ```text # dev preset (4/4 passed, 0 skips) 2762: compiled s_lshl_b64, s_lshr_b64 and s_ashr_i64 (including descriptor overwrite); 7 invalid operand/destination forms refused; 6 reference mutants differ 1/4 Test #2762: native_salu_shift64_controls ............ Passed 0.83 sec 2/4 Test #2763: native_salu_shift64_hardware ............ Passed 10.89 sec 2764: compiled s_lshl_b64, s_lshr_b64 and s_ashr_i64 from VCC and EXEC sources (including in-place VCC); 10 invalid operand/destination forms refused; 4 reference mutants differ 3/4 Test #2764: native_salu_shift64_vcc_exec_controls ... Passed 0.87 sec 2765: wave64 vcc amount=0: results, packed SCC and guards matched 2765: wave64 vcc amount=1 inplace lshl: results, packed SCC and guards matched 2765: wave64 vcc amount=31: results, packed SCC and guards matched 2765: wave64 vcc amount=32 inplace lshr: results, packed SCC and guards matched 2765: wave64 vcc amount=63: results, packed SCC and guards matched 2765: wave64 vcc amount=64: results, packed SCC and guards matched 2765: wave64 exec amount=0: results, packed SCC and guards matched 2765: wave64 exec amount=1: results, packed SCC and guards matched 2765: wave64 exec amount=31: results, packed SCC and guards matched 2765: wave64 exec amount=32: results, packed SCC and guards matched 2765: wave64 exec amount=63: results, packed SCC and guards matched 2765: wave64 exec amount=64: results, packed SCC and guards matched 2765: wave32 vcc amount=0: results, packed SCC and guards matched 2765: wave32 vcc amount=32: results, packed SCC and guards matched 2765: wave32 vcc amount=64: results, packed SCC and guards matched 2765: wave32 exec amount=0: results, packed SCC and guards matched 2765: wave32 exec amount=32: results, packed SCC and guards matched 2765: wave32 exec amount=64: results, packed SCC and guards matched 4/4 Test #2765: native_salu_shift64_vcc_exec_hardware ... Passed 5.18 sec The following tests passed: native_salu_shift64_controls native_salu_shift64_hardware native_salu_shift64_vcc_exec_controls native_salu_shift64_vcc_exec_hardware 100% tests passed, 0 tests failed out of 4 Total Test time (real) = 17.93 sec # release preset (4/4 passed, 0 skips) 2762: compiled s_lshl_b64, s_lshr_b64 and s_ashr_i64 (including descriptor overwrite); 7 invalid operand/destination forms refused; 6 reference mutants differ 1/4 Test #2762: native_salu_shift64_controls ............ Passed 0.58 sec 2/4 Test #2763: native_salu_shift64_hardware ............ Passed 8.56 sec 2764: compiled s_lshl_b64, s_lshr_b64 and s_ashr_i64 from VCC and EXEC sources (including in-place VCC); 10 invalid operand/destination forms refused; 4 reference mutants differ 3/4 Test #2764: native_salu_shift64_vcc_exec_controls ... Passed 0.58 sec 2765: wave64 vcc amount=0: results, packed SCC and guards matched 2765: wave64 vcc amount=1 inplace lshl: results, packed SCC and guards matched 2765: wave64 vcc amount=31: results, packed SCC and guards matched 2765: wave64 vcc amount=32 inplace lshr: results, packed SCC and guards matched 2765: wave64 vcc amount=63: results, packed SCC and guards matched 2765: wave64 vcc amount=64: results, packed SCC and guards matched 2765: wave64 exec amount=0: results, packed SCC and guards matched 2765: wave64 exec amount=1: results, packed SCC and guards matched 2765: wave64 exec amount=31: results, packed SCC and guards matched 2765: wave64 exec amount=32: results, packed SCC and guards matched 2765: wave64 exec amount=63: results, packed SCC and guards matched 2765: wave64 exec amount=64: results, packed SCC and guards matched 2765: wave32 vcc amount=0: results, packed SCC and guards matched 2765: wave32 vcc amount=32: results, packed SCC and guards matched 2765: wave32 vcc amount=64: results, packed SCC and guards matched 2765: wave32 exec amount=0: results, packed SCC and guards matched 2765: wave32 exec amount=32: results, packed SCC and guards matched 2765: wave32 exec amount=64: results, packed SCC and guards matched 4/4 Test #2765: native_salu_shift64_vcc_exec_hardware ... Passed 4.09 sec The following tests passed: native_salu_shift64_controls native_salu_shift64_hardware native_salu_shift64_vcc_exec_controls native_salu_shift64_vcc_exec_hardware 100% tests passed, 0 tests failed out of 4 Total Test time (real) = 13.92 sec ``` <!-- WIN-VERIFY: passed | sha=b1fca1f08105f17b1b045f3a71c1eaec3d7ede26 -->
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 22:23:49 +00:00
Author
Owner

@⁠Leyukaka on GitHub · 2026-11-29 03:45 UTC · original · approved these changes

Reviewed b1fca1f0 (diff only). Approve.

  • src/gfx1013_direct_compute.inl:3642: VCC (106) and EXEC (126) are accepted as the 64-bit S0 pair of s_lshl_b64/s_lshr_b64/s_ashr_i64. The high word comes from operand32(i, s0 + 1) (107/127, accepted at :180-184). lo, hi and the amount are read at :3648-3656, before the writes at :3664-3666, so in-place vcc, vcc is safe. exec_hi alone (127), odd registers and m0 as S0, and VCC/EXEC/m0 as S1, stay refused.
  • The VCC-as-S0 refusal at tests/native_salu_shift64_check.py:148 is replaced by m0. No other test on main (212d4b5f) asserts that refusal.
  • A local run of this head merged onto main 212d4b5f plus other pending changes: the four native_salu_shift64* tests pass; with || s0 == 126 dropped, native_salu_shift64_vcc_exec_controls and native_salu_shift64_vcc_exec_hardware fail and the two older tests still pass.
  • Not covered: the 4 "reference mutants" mutate the Python reference, not the C++, so they only show that the cases discriminate. A wrong high word in the handler is caught only by _hardware; _controls checks compilation, the presence of the three i64 shift ops and the refusals.
  • CI: neither new test runs on this PR, since the pr preset filter (CMakePresets.json:51) has no native_salu_*. After merge, push CI runs _controls but excludes _hardware$.
  • Nit: in wave32, enable_exec sets exec_hi to 1 (ZERO + 1), while the doc says the fixture restores exec to all ones; that holds only for exec_lo.
**@⁠Leyukaka** on GitHub · 2026-11-29 03:45 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3404#pullrequestreview-6101285300) · **approved these changes** Reviewed `b1fca1f0` (diff only). Approve. - `src/gfx1013_direct_compute.inl:3642`: VCC (106) and EXEC (126) are accepted as the 64-bit `S0` pair of `s_lshl_b64`/`s_lshr_b64`/`s_ashr_i64`. The high word comes from `operand32(i, s0 + 1)` (107/127, accepted at `:180-184`). `lo`, `hi` and the amount are read at `:3648-3656`, before the writes at `:3664-3666`, so in-place `vcc, vcc` is safe. `exec_hi` alone (127), odd registers and `m0` as `S0`, and VCC/EXEC/`m0` as `S1`, stay refused. - The VCC-as-`S0` refusal at `tests/native_salu_shift64_check.py:148` is replaced by `m0`. No other test on `main` (212d4b5f) asserts that refusal. - A local run of this head merged onto `main` 212d4b5f plus other pending changes: the four `native_salu_shift64*` tests pass; with `|| s0 == 126` dropped, `native_salu_shift64_vcc_exec_controls` and `native_salu_shift64_vcc_exec_hardware` fail and the two older tests still pass. - Not covered: the 4 "reference mutants" mutate the Python reference, not the C++, so they only show that the cases discriminate. A wrong high word in the handler is caught only by `_hardware`; `_controls` checks compilation, the presence of the three i64 shift ops and the refusals. - CI: neither new test runs on this PR, since the `pr` preset filter (`CMakePresets.json:51`) has no `native_salu_*`. After merge, push CI runs `_controls` but excludes `_hardware$`. - Nit: in wave32, `enable_exec` sets `exec_hi` to 1 (`ZERO + 1`), while the doc says the fixture restores `exec` to all ones; that holds only for `exec_lo`.
github-bot changed target branch from main to gh-pr/3404/base 2026-11-29 08:45:42 +00:00
github manually merged commit b1fca1f081 into gh-pr/3404/base 2026-11-29 08:45:48 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.