shader: lower 8 scratch load and store instructions in pixel_aot (FLAT) #777
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/783"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by MrSkelee on 2026-11-23T03:01:50Z.
Lowers 8 FLAT scratch memory load and store instructions in tools/pixel_aot.py:
scratch_load_dword,scratch_load_dwordx2,scratch_load_dwordx3,scratch_load_dwordx4scratch_store_dword,scratch_store_dwordx2,scratch_store_dwordx3,scratch_store_dwordx4Highlights
uint scratch[256] = (uint[256])0;).lds,clamp), and non-entry masks.check_flat_scratch_drawstesting bit-exact integer exports across 2 multi-dword groups over 5 constant sets, with 5 negative mutations verifying mismatch detection.check_binary()for LLVM 15 parity.Verification
Local results: 1/1 test passed (0.83s).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T03:48:13Z.
The fixture covers the in-range, previously written case. The lowerer also accepts dynamic bases without proving their effective alignment or that the entire access fits the 1 KiB frame. It rounds the address down and reads from a zero-initialized array even when no store defined those words. Please scope the first version to effective addresses whose full access is provably aligned and in bounds, and reject reads without an earlier defining store. Add rejection controls for a dynamic, unproven access and a load before any store. Please also show how the load wait is preserved, or reject a consumer before the matching wait.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T14:19:50Z.
Your latest revision establishes the scratch frame bounds and rejects reads of unwritten words. I fixed one remaining wait case: after an earlier image sample, a partial VM wait could release a new scratch result too soon because it had sequence number zero. Both partial-wait spellings now keep that result pending; a full wait releases it. The scratch integer readback still passes on WARP and RTX 4060 Laptop, and LLVM 15 and the docs check passed. GitHub CI is rerunning.
Imported from R0Y00/Xbox2Windows. Originally posted by MrSkelee on 2026-11-23T14:26:52Z.
Thanks for catching the partial VM wait sequence number edge case and verifying on hardware Pulled the update locally.