shader: accept idxen offen raw loads through a reflected table record #3707
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3707
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3705"
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?
@lukaslw-lab on GitHub · 2026-12-01 06:38 UTC · original
lukaslw-lab:shader/mesh-idxen-offen-raw-load→main· +26 −1 · 4 files · 1 commits · merged 2026-12-01 08:45 UTCChange
Graphics raw buffer loads (
buffer_load_dword*) accepted IDXEN or OFFEN, not both. With both set, the second address VGPR is a byte offset inside the indexed record:The stride comes from the reflected table SRV, as it already does for IDXEN alone. The offset is dword-aligned like the unindexed raw path. A load reads zero when the index is past the view or the access does not end inside the record, as a structured-buffer read does.
The mesh lowerer now passes its reflected container stage to the shared ALU (
alu.graphics_interface), which VS and PS already do. Without it, a mesh IDXEN load always stopped atindexed raw load needs a reflected table SRV. Nothing else reads that field.This is item 3 of #3705. On the 6 captured slot 86 requests that stopped at
raw buffer load needs offen with zero scalar offset and no modifiers, with #3704 and #3706 also applied, all 6 now pass the load. Their next refusal is a lane-mask block,s_xor_b64 s[20:21], vcc, -1followed bys_and_saveexec_b64. Refs #3705, #3643.Not in this PR: binding the view in the slot 86 runtime.
native_mesh86.inlaccepts onlybuffer_srv,raw_vector_srv,byte_window_srvandroot_buffer_srvfor a mesh SRV. A pipeline that usesindexed_raw_srvwould still be refused at creation (unsupported native Mesh86 SRV shape).d3d12_draw.inl,expected_stride). The slot 86 binder needs the same check.Verification
Build
releaseat this branch (Windows 10 19045, MSVC 2022, DXC 1.9.2609):42 of the 43 also fail on this host with
main's sources (Windows 10 without the Agility SDK; NVIDIA RTX 3080 Ti, driver 32.0.16.1047, debug layer on;pixel_aot_*use the local LLVM tools). The 43rd,pixel_aot_core_vector_warp, failed once in the parallel run and passed 3 of 3 alone with this change; it does not use the native lowerer.New cases in
native_direct_container_check.py, next toindexed-pixel-record-*:indexed-offset-pixel-record-16: record 1, byte 8, immediate 4. Checks the dword mask, theule 8in-record bound (16 − 4 − 4) and the added offset.indexed-offset-pixel-record-4and-0: refused,outside a verified dword-aligned record.Controls:
raw buffer load needs offen with zero scalar offset and no modifiers.Evidence and follow-up
Source-built words only. The counts on captured requests are local and offline (
compile_dxil ... gfx1013-container-ms-texture-heap).Checklist
AI-assisted.
🤖 Generated with Claude Code
s_bitset1_b32, then stop at a scalar loop #3705s_bitset1_b32, then stop at a scalar loop #3705s_bitset1_b32, then stop at a scalar loop #3705@R0Y00 on GitHub · 2026-12-01 08:43 UTC · original · approved these changes
Reviewed reflected record stride validation and the within-record byte offset guard. The native_direct_container and native_direct_mesh fixtures passed in the integration. Slot 86 runtime view binding remains a follow-up.
s_bitset1_b32, then stop at a scalar loop #3705github-bot referenced this pull request2026-12-02 21:54:05 +00:00