Repository navigation
Conversation
…ge_sample_l A 1D image takes one address component, x. image_load becomes Texture1D.Load(int2(x, 0)), image_load_mip Load(int2(x, mip)), image_sample_lz SampleLevel(smp, x, 0) and image_sample_l SampleLevel(smp, x, level), the mip and the level being the last address register. Only glc, slc and dlc are accepted next to dim and dmask. These forms were refused with unverified 1D image sample address or modifiers; the implicit image_sample was already lowered. tests/startup_image_1d_check.py translates source-built fixtures (words checked against llvm-mc 19) and requires the exact call. No draw runs these forms: not measured on WARP or hardware.
Collaborator
Author
tedin7
pushed a commit
to tedin7/Xbox2Windows
that referenced
this pull request
Nov 26, 2026
…ster-loop-tx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 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-Support one-dimensional textures in translated startup draws #1630 one and may come from a stale cache.AI-assisted. Commands listed were executed locally.