startup: lower 1D image_load, image_load_mip, image_sample_lz and image_sample_l #1724
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!1724
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1724/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-24 17:52 UTC · original
tedin7:x2w-frontier-gfx-img1d→main· +208 −10 · 7 files · 2 commits · closed without mergingPart of the refusal triage in #870 (the
image dimension SQ_RSRC_IMG_1Drefusals, 2 of the 29 shaders in the GTX 1660 SUPER cache). No open pull request covers the remaining 1D forms: #1630 (merged) lowered only the implicitimage_samplewith one coordinate.Change
A 1D image takes one address component, x. In
image()oftools/startup/gfx2hlsl.py:The mip and the level are the last address register, so an NSA list such as
[v3, v1]reads x fromv3. The 1D sample check now acceptsglc,slcanddlcnext todimanddmask(they do not change the value); every other modifier, an emptydmaskand a wrong address count are refused withunverified 1D image address or modifiers(the message no longer says "sample"). Compare, gather and offset forms on a 1D image are unchanged and refused. Theaxescount is now defined once for all dimensions.I did not touch the runtime:
tex1dbinding and upload come from #1630.Test
New
tests/startup_image_1d_check.py(CTeststartup_image_1d, also in the Windows pixel-binary job withllvm-mc-15): 14 source-built fixtures with words checked againstllvm-mc-19. It requires the exact call for each form, theTexture1D<float4>declaration and thetex1dmanifest line, and the refusals.tests/startup_image_sample_l_check.pyno longer expects 1D to be refused.Four local mutations of the lowering each make the check fail, and the tree was restored after each: the mip read as 0, the level taken from the first register,
unormaccepted on 1D, the texture bound astex2d. Also run and passing:startup_image_sample_l_check,_sample_c_check,_3d_check,_2d_array_check,_load_mip_check,startup_translator_check,startup_gfx2hlsl_smem_offset_check,docs_links_check,bidi_controls_checkandgit diff --check. A merge against the heads of #1711, #1707 and #1699 has no conflicts (the docs note is placed so it does not touch the lines #1711 edits).What this does not establish
load,image_sampleandimage_sample_lzcannot be reached from assembled code (llvm-mcrejects such addresses), so removing that clause is not caught; the same refusal is kept for thelandload_mipforms by their own checks.image dimension SQ_RSRC_IMG_1D) is the pre-#1630 one and may come from a stale cache.AI-assisted. Commands listed were executed locally.
@tedin7 on GitHub · 2026-11-24 17:54 UTC · original
Closing this draft: #1722 already covers 1D
image_sample_lz/image_sample_lfrom #1721. Will only revisit non-overlapping 1Dimage_load/image_load_mipafter #1722 lands if still needed. AI-assisted.Pull request closed