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

Manually merged
github merged 1 commit from gh-pr/558/head into gh-pr/558/base 2026-11-26 22:01:44 +00:00
Owner

@⁠RonLogic on GitHub · 2026-11-22 11:59 UTC · original
RonLogic:shader/compute-runtime-constants → main · +138 −17 · 5 files · 1 commits · merged 2026-11-22 13:44 UTC

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.

**@⁠RonLogic** on GitHub · 2026-11-22 11:59 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/558) `RonLogic:shader/compute-runtime-constants` → `main` · +138 −17 · 5 files · 1 commits · merged 2026-11-22 13:44 UTC ## 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:01:41 +00:00
github manually merged commit 24b186b43f into gh-pr/558/base 2026-11-26 22:01:43 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.