cpp-migration: lower root-pointer global_load_dword in the direct C++ compute path #2962
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#2962
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@legacy-code-archaeologist on GitHub · 2026-11-26 23:39 UTC · original
Target branch
cpp-migration. Part of #2935 (instruction coverage: "global loads"). I am taking this; please say if you already have it locally and I will drop it.Gap: the direct compute path refuses every GLOBAL instruction.
gfx2hlsl.pylowers the compute one-dword load in thesaddrform,op_global_load_dword: ADDR = SADDR + zext(VADDR) + sext(OFFSET), with SADDR a proven root buffer pointer pair. A source-built request with a rootSRV(t0)address ins[8:9]andglobal_load_dword v1, v0, s[8:9](0xdc308000 0x01080000, LLVM 15) fails with:The run used
compile_dxil ... gfx1013-direct-cs@0built fromcpp-migratione97c5c7c. The direct path already binds such a pointer asroot_buffer_srvfor scalar loads (memory,Symbol::Type::root_address).Plan: follow the rules
gfx2hlsl.pyapplies.saddrform, one dword. The SADDR pair is a root address with the matching high half, as for the scalar root loads.root_buffer_srvbinding. The signed 64-bit byte offset is guarded to [0, 2^32) before it becomes a 32-bit address, so an overflow does not wrap into the view.off(no SADDR), a non-root or advanced pointer, unaligned offsets, the wider and sub-dword forms,lds,glc/slc/dlcother than the cache-policy pass-through gfx2hlsl accepts, and non-compute stages.compile_dxil, with refusals checked by message. A WARP/hardware dispatch reads known words from a root SRV, with a negative control (offset dropped).AI-assisted.
@legacy-code-archaeologist on GitHub · 2026-11-27 03:12 UTC · original
Done by #2966 (merged into
cpp-migration; MasterDomino ran the dispatch readback on an SM 6.6 wave32 adapter).AI-assisted.