shader: lower private LDS floating-point updates in normal mode #946

Manually merged
github merged 4 commits from gh-pr/946/head into gh-pr/946/base 2026-11-26 22:30:16 +00:00
Owner

@⁠stan495 on GitHub · 2026-11-23 18:13 UTC · original
stan495:codex/gfx1030-ds-add-f32 → main · +119 −4 · 4 files · 4 commits · merged 2026-11-23 20:40 UTC

Scope

Lower private LDS add, returning add, min, max and compare-and-store for binary32. The normal-rne input contract bounds the mode to normal values or positive zero with round-to-nearest-even.

Verification

Tested 1c1ef3d 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_f32|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. Changing addition to subtraction first differed at word 0 (bf000000 expected, 40b00000 observed). Switching min and max or swapping compare and replacement operands also changed the readback.

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.

**@⁠stan495** on GitHub · 2026-11-23 18:13 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/946) `stan495:codex/gfx1030-ds-add-f32` → `main` · +119 −4 · 4 files · 4 commits · merged 2026-11-23 20:40 UTC ## Scope Lower private LDS add, returning add, min, max and compare-and-store for binary32. The normal-rne input contract bounds the mode to normal values or positive zero with round-to-nearest-even. ## Verification Tested `1c1ef3d` 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_f32|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. Changing addition to subtraction first differed at word 0 (bf000000 expected, 40b00000 observed). Switching min and max or swapping compare and replacement operands also changed the readback. ```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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:30:14 +00:00
github manually merged commit fc26b58fdf into gh-pr/946/base 2026-11-26 22:30:16 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-23 20:25 UTC · original

I resolved the four shared-file conflicts in fc26b58, retaining the earlier private-LDS qword and wide-replacement paths. The LLVM 15 binary check passed. The Windows draw-lds-f32, draw-lds-qword, and draw-lds-wide-replacement checks passed on both WARP and RTX 4060 Laptop (six runs). The opt-in still covers only the documented normal-RNE inputs and results, including positive zero. The updated head is waiting for CI.

**@⁠R0Y00** on GitHub · 2026-11-23 20:25 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/946#issuecomment-7113033376) I resolved the four shared-file conflicts in `fc26b58`, retaining the earlier private-LDS qword and wide-replacement paths. The LLVM 15 binary check passed. The Windows `draw-lds-f32`, `draw-lds-qword`, and `draw-lds-wide-replacement` checks passed on both WARP and RTX 4060 Laptop (six runs). The opt-in still covers only the documented normal-RNE inputs and results, including positive zero. The updated head is waiting for CI.
This discussion has been locked. Commenting is limited to contributors.
No description provided.