shader: lower private qword comparisons and XOR #936

Closed
stan495 wants to merge 0 commits from upstream-pr/943 into main
stan495 commented 2026-11-23 18:08:44 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-23T18:08:44Z.


Superseded by #1002, which merged the same five non-returning forms. The returning variants remain in #944 and now build on the implementation in main.

Scope

Lower signed and unsigned qword min/max and per-dword XOR. Compare unsigned low dwords only when the high dwords are equal.

Depends on #942. The draft includes the prerequisite in its branch history. Review the five forms in commit 5bc4456.

Verification

Tested 5bc4456 on Windows 11 25H2 (10.0.26200.9974) with the D3D12 debug layer enabled. Hardware used AMD Radeon RX 7900 XTX (32.0.32029.2010). WARP used Microsoft Basic Render Driver (10.0.26100.9818).

cmake --build --preset dev --target offscreen_check
$env:XBOX2WINDOWS_ADAPTER = '7900 XTX'
ctest --preset dev --no-tests=error -R '^compute_store_aot_(lds_qword|lds_private|ds_route|guard_read)_(warp|hardware)$|^compute_store_aot_warp$' -V

9 passed, 0 failed, 0 skipped. Both backends compared all 320 UAV words. Switching the comparison signedness first differed at word 0. Replacing XOR with OR first differed at word 16 (fffffff0 expected, fffffff8 observed).

python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1

LLVM 15.0.7 round trips reproduced the same HLSL as text translation. Coverage records include all five new forms.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6565740092 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/943). Originally posted by [stan495](https://github.com/stan495) on 2026-11-23T18:08:44Z. --- Superseded by #1002, which merged the same five non-returning forms. The returning variants remain in #944 and now build on the implementation in main. ## Scope Lower signed and unsigned qword min/max and per-dword XOR. Compare unsigned low dwords only when the high dwords are equal. Depends on #942. The draft includes the prerequisite in its branch history. Review the five forms in commit `5bc4456`. ## Verification Tested `5bc4456` on Windows 11 25H2 (10.0.26200.9974) with the D3D12 debug layer enabled. Hardware used AMD Radeon RX 7900 XTX (32.0.32029.2010). WARP used Microsoft Basic Render Driver (10.0.26100.9818). ```powershell cmake --build --preset dev --target offscreen_check $env:XBOX2WINDOWS_ADAPTER = '7900 XTX' ctest --preset dev --no-tests=error -R '^compute_store_aot_(lds_qword|lds_private|ds_route|guard_read)_(warp|hardware)$|^compute_store_aot_warp$' -V ``` 9 passed, 0 failed, 0 skipped. Both backends compared all 320 UAV words. Switching the comparison signedness first differed at word 0. Replacing XOR with OR first differed at word 16 (fffffff0 expected, fffffff8 observed). ```sh python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 ``` LLVM 15.0.7 round trips reproduced the same HLSL as text translation. Coverage records include all five new forms.
upstream-sync closed this pull request 2026-11-24 06:45:31 +00:00

Pull request closed

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!936
No description provided.