startup: pixel-stage resource-heap image record in gfx2hlsl (translator and manifest) #2761
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!2761
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2761/head"
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?
@tedin7 on GitHub · 2026-11-26 06:32 UTC · original
tedin7:x2w-ps-heap-image→main· +110 −10 · 4 files · 2 commits · closed without mergingPart of #1723
What this unblocks: a pixel program that loads an image descriptor through the resource heap (
s_load_dwordx8at index << 5) now translates, with the record named in the manifest instead of refused. The translator and manifest only: the draw-time binding of that record is a separate slice, so no draw uses it yet.Source: AMD "RDNA 2" Instruction Set Architecture reference guide, SMEM instruction S_LOAD_DWORDX8 (image resource descriptor load); Microsoft DirectX-Specs, D3D12 resource binding specification, descriptor heaps.
What changed (
tools/startup/gfx2hlsl.py):heap_recordnow serves the pixel stage: eight dwords (the image record) there, four (the buffer record) in compute. Other widths and the vertex stage keep their refusals.s_and_b32 word, -16) before it becomes a byte offset of ans_buffer_loadfrom a table buffer. The mark carries through a literals_add; ans_mulof a masked word is not named. Pixel stage only, because the compute dispatch does not read a mask.mask Mis written by a sharedheap_wherehelper (graphics and compute use the same text). Two-hop index chains (an index read from a non-table buffer) stay refused by name.Tests: new
startup_gfx2hlsl_pixel_heap_image(x8 record, x4 and compute-x8 refusals, mask marks, multiply refusal, manifest words) and an updated control instartup_gfx2hlsl_heap_record.Verification (Linux only, no Win2025 run yet):
python3 -B tests/startup_gfx2hlsl_pixel_heap_image_check.py: PASSpython3 -B tests/startup_gfx2hlsl_heap_record_check.py: PASSpython3 -B tests/startup_gfx2hlsl_heap_word_check.py: PASSorigin/main: all unchangedremote_pycheck.sh --compare origin/main: no new failuresDraft until an independent review and a Win2025 run.
AI-assisted; commands listed were executed locally.
@tedin7 on GitHub · 2026-11-26 10:12 UTC · original
Withdrawn: shader translation is moving to the native C++ frontend (see #870), so we are not continuing this change to the Python translator. The branch stays available if any part is useful later. Thank you to everyone who reviewed and tested it.
Pull request closed