shader: lower indexed gfx1030 raw vector loads #1247
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1254"
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 stan495 on 2026-11-24T05:34:53Z.
Change
Lower
buffer_load_dwordx2,buffer_load_dwordx3andbuffer_load_dwordx4in the gfx1030 compute store profile. Accept a verifiedidxendispatch-thread index, zero scalar offset, an aligned immediate and a consecutive destination range. All words must fit in one valid, unswizzled source record. Capture the address before marking the destination range pending, so the index can alias a destination. The caller-bound rawt0must remain stable, in range and disjoint from the output. Native descriptor bounds and pixel bindings are out of scope.Follow-up to merged #1225; supersedes the stacked draft stan495/Xbox2Windows#4. The upstream merge at
f1b16abd266144c4ec3517fb989060a4ee7a50ceresolves the adjacent README rows by retaining both raw vector reads and the upstream image-load entry.Verification
Tested clean head
4c272ccb07da285b90b28669e13d6334a6b68ce1:34 passed, 0 failed, 0 skipped; Markdown links passed. Both
compute_store_aot_mubuf_vector_{hardware,warp}tests contributed all three new gfx1030 forms. Windows build 26300.9974, Intel Arc B390 (32.0.101.8509), Microsoft Basic Render Driver/WARP (10.0.26100.9818); debug layer unavailable on both. The translated shaders matched all 320 CPU reference words at one and two groups, including gaps and untouched tail. Swapping first and last channels failed at word 0:8b06bba2expected,8b0acf53/8b0ee304/8b12f6b5actual for x2/x3/x4. Invalid destination spans, record overruns, and use or overwrite of the last destination beforevmcnt(0)were rejected.Passed in Ubuntu 22.04.5 with LLVM 15.0.7. The three source-built wave32 programs assemble and decode, and the synthetic container CLI emits the same HLSL as direct lowering. The GPU tests execute the translated desktop DXIL.
Evidence and follow-up
The fixtures are original synthetic sources under the repository's MIT License. The README experiment row and
docs/experiments.mdspecify the command and input contract.This change was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T06:00:09Z.
Review: COMMENTED
Dual-platform review of
4d100c9c7337fe31a00356fbded8f46e290c640e(shader: lower indexed gfx1030 raw vector loads).Linux / LLVM-19 Checks
git diff --check origin/main...HEAD: PASSdocs_links_check.py: PASS (16 Markdown files, 282 links)bidi_controls_check.py: PASS (1054 tracked files, no bidirectional controls)LLVM_LIB=/usr/lib/llvm-19/lib/libLLVM-19.so python -B tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so: PASS (exit 0; includesmubuf_vector_controlsandgfx1030_binaryforbuffer_load_dwordx2/x3/x4)Windows Server 2025 (Build 26100, MSVC 14.44, D3D12 WARP)
Command:
C:\OEM\run_pr_test.ps1 -Pr 1254 -Targets 'offscreen_check,offscreen_check' -Regex '^compute_store_aot_mubuf_vector_' -Jobs 6 -Parallel 4dev(Debug):offscreen_checkbuilt;ctest2/2 Passed (compute_store_aot_mubuf_vector_hardware2.78s,compute_store_aot_mubuf_vector_warp2.88s)release(/O2):offscreen_checkbuilt;ctest2/2 Passed (compute_store_aot_mubuf_vector_hardware2.81s,compute_store_aot_mubuf_vector_warp2.81s)Code Review Notes
tools/compute_store_aot.py: extends thebuffer_load_dwordmatcher tobuffer_load_dwordx[234], enforcescpu == "gfx1030",idxen,!offen, DWORD-aligned immediate offset, and consecutive VGPR destination range, and captures source addresses before clearing/marking destination registers so index-destination aliasing (v8in the fixture) works as intended.tests/compute_store_check.py:mubuf_vector_controls()exercises negative rejections (wrong dest count,v255overflow,offen, unaligned offset, record overrun,tfe, UAV source, missingvmcnt(0)/lgkmcnt(0), pre-wait read/overwrite of last dest,gfx1013), andmubuf_vector_draw()checks 1- and 2-group CPU reference parity plus a first/last channel-swap failure check.