shader: lower private LDS counter updates #912

Merged
stan495 merged 2 commits from upstream-pr/919 into main 2026-11-23 17:42:31 +00:00
stan495 commented 2026-11-23 17:09:59 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-23T17:09:59Z.


Scope

Lower five gfx1030 private LDS counter operations at offset zero. ds_inc_u32 and ds_dec_u32 use unsigned threshold and zero checks. ds_inc_rtn_u32, ds_dec_rtn_u32 and ds_wrap_rtn_b32 also return the old word.

Verification

Tested 03a101a on Windows 11 25H2 (10.0.26200.9974). The D3D12 debug layer was enabled. Hardware used AMD Radeon RX 7900 XTX (32.0.32029.2010), and 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_private|ds_route|guard_read)_(warp|hardware)$|^compute_store_aot_warp$' -V

7 passed, 0 failed, 0 skipped. Both backends matched the CPU reference across 320 UAV words for one and three groups, including the untouched words and values near zero and the limit. Skipping each update produced the expected mismatch at word 1. For increment, the skipped update left fffffff0 instead of 00000000.

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

LLVM 15.0.7 assembly, decoding and translation passed. The coverage records include all five new forms.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6564634442 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/919). Originally posted by [stan495](https://github.com/stan495) on 2026-11-23T17:09:59Z. --- ## Scope Lower five gfx1030 private LDS counter operations at offset zero. `ds_inc_u32` and `ds_dec_u32` use unsigned threshold and zero checks. `ds_inc_rtn_u32`, `ds_dec_rtn_u32` and `ds_wrap_rtn_b32` also return the old word. ## Verification Tested `03a101a` on Windows 11 25H2 (10.0.26200.9974). The D3D12 debug layer was enabled. Hardware used AMD Radeon RX 7900 XTX (32.0.32029.2010), and 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_private|ds_route|guard_read)_(warp|hardware)$|^compute_store_aot_warp$' -V ``` 7 passed, 0 failed, 0 skipped. Both backends matched the CPU reference across 320 UAV words for one and three groups, including the untouched words and values near zero and the limit. Skipping each update produced the expected mismatch at word 1. For increment, the skipped update left `fffffff0` instead of `00000000`. ```sh python3 -B tests/compute_store_check.py binary llvm-mc-15 llvm-objcopy-15 libLLVM-15.so.1 ``` LLVM 15.0.7 assembly, decoding and translation passed. The coverage records include all five new forms.
upstream-sync closed this pull request 2026-11-24 06:45:24 +00:00
R0Y00 commented 2026-11-24 06:49:24 +00:00 (Migrated from github.com)

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


I updated this branch against current main, retaining the signed min/max, reverse subtraction and half-read tests alongside the four counter fixtures. The stale u32 rejection case now checks the still-unsupported u64 form. On the updated head, all four focused Windows WARP tests passed. GitHub is running the full checks on ec5221d.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7108739323 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/919#issuecomment-7108739323). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T17:29:36Z. --- I updated this branch against current main, retaining the signed min/max, reverse subtraction and half-read tests alongside the four counter fixtures. The stale u32 rejection case now checks the still-unsupported u64 form. On the updated head, all four focused Windows WARP tests passed. GitHub is running the full checks on ec5221d.
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!912
No description provided.