shader: lower bounded runtime constant reads in compute stores #552

Merged
RonLogic merged 1 commit from upstream-pr/558 into main 2026-11-22 13:44:12 +00:00
RonLogic commented 2026-11-22 11:59:52 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-22T11:59:52Z.


Change

Follow up on #539 by letting translated raw-UAV store kernels take runtime DWORD inputs. An explicit nonoverlapping descriptor table entry binds b0. Accept aligned immediate s_buffer_load_dword{,x2,x4} within that 64-byte binding, with descriptor provenance and scalar waits checked before use. Preserve the existing fixed and indexed store paths and legacy test reference files.

Verification

Built and tested at 24b186b on Windows 11 26300.9974 using x64 MSVC 19.52.37029.0. All six tests passed, with zero capability skips, on RTX 4070 (32.0.16.2124) and WARP (10.0.26100.9818). The D3D12 debug layer was enabled.

ctest --preset dev --no-tests=error -R "^(compute_store_aot|compute_root|compute_tables)_(warp|hardware)$" -V
python -B tests/docs_links_check.py

The same compiled shader dispatched with two buffers of input constants. Both dispatches matched all 320 words, including untouched guard words. With the second upload and first reference, the first mismatch was word 4 (80000000 expected, 7fc00000 observed), and all eight written words differed. A truncated constants payload was rejected. The LLVM binary round-trip is covered by the existing Linux CI job and was not run locally because this Windows setup lacks LLVM 15 assembler tools.

Evidence and follow-up

The regression uses original MIT-licensed gfx1013 source and independent word values. Dynamic scalar addresses, stores beyond the existing raw-UAV address profile, and original runtime descriptor layouts remain outside this profile. The README and experiments page document the optional binding.

AI-assisted: yes.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6542104779 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/558). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-22T11:59:52Z. --- ## Change Follow up on #539 by letting translated raw-UAV store kernels take runtime DWORD inputs. An explicit nonoverlapping descriptor table entry binds b0. Accept aligned immediate `s_buffer_load_dword{,x2,x4}` within that 64-byte binding, with descriptor provenance and scalar waits checked before use. Preserve the existing fixed and indexed store paths and legacy test reference files. ## Verification Built and tested at `24b186b` on Windows 11 26300.9974 using x64 MSVC 19.52.37029.0. All six tests passed, with zero capability skips, on RTX 4070 (32.0.16.2124) and WARP (10.0.26100.9818). The D3D12 debug layer was enabled. ```text ctest --preset dev --no-tests=error -R "^(compute_store_aot|compute_root|compute_tables)_(warp|hardware)$" -V python -B tests/docs_links_check.py ``` The same compiled shader dispatched with two buffers of input constants. Both dispatches matched all 320 words, including untouched guard words. With the second upload and first reference, the first mismatch was word 4 (`80000000` expected, `7fc00000` observed), and all eight written words differed. A truncated constants payload was rejected. The LLVM binary round-trip is covered by the existing Linux CI job and was not run locally because this Windows setup lacks LLVM 15 assembler tools. ## Evidence and follow-up The regression uses original MIT-licensed gfx1013 source and independent word values. Dynamic scalar addresses, stores beyond the existing raw-UAV address profile, and original runtime descriptor layouts remain outside this profile. The README and experiments page document the optional binding. AI-assisted: yes.
upstream-sync closed this pull request 2026-11-24 06:43:41 +00:00
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!552
No description provided.