shader: integrate explicit startup mip loads from #1284 #1379
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1386"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T10:13:03Z.
Integrates Evan-Lowry's #1284 with current main. The original commits are retained. The fork has maintainer edits disabled. Refs #1284.
The merge retains the mip, flat-parameter, inline-sampler, host-CPU and ordinary translator CI commands and the two startup-runtime documentation sections. On Windows at
d926b1f9these five checks passed individually with the project Python environment:The mip check exercised 2D packed coordinates, 3D nonconsecutive coordinates, and implicit mip zero. The original PR contains the hardware/WARP two-mip readback evidence.
The combined candidate at
3696ec96also includes #1381. Its source retains the verified array-sampling and ordinary array-load cases and rejects the unverified combination of an explicit mip load on a 2D array. Both feature fixtures, the 3D, explicit LOD, flat, inline sampler, and existing startup translator checks passed (7 scripts). The original #1381 can land independently.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T10:17:10Z.
Review: COMMENTED
Technical review at
3696ec9661216acebde8fb91af983640e32ec674:Checks run
docs_links_check.py,bidi_controls_check.py,startup_translator_check.py,startup_image_load_mip_check.py --llvm-mc llvm-mc-19,startup_image_2d_array_check.py binary llvm-mc-19,startup_image_3d_check.py binary llvm-mc-19, andstartup_image_sample_l_check.py binary llvm-mc-19all passed.--preset dev, targetoffscreen_check):ctest -R '^startup_image_(3d|load_mip|2d_array)_(controls|warp)$'6/6 passed (2.19s)./O2(--preset release, targetoffscreen_check):ctest -R '^startup_image_(3d|load_mip|2d_array)_(controls|warp)$'6/6 passed (2.03s).Code audit
tools/startup/gfx2hlsl.py:image_load_mipdecodes and rejectstfe/a16/d16/ 2D arrays / wrong address counts / emptydmask, and lowers 2D packed and 3D NSA addresses toTexture.Load(int3/int4(..., mip)).SQ_RSRC_IMG_2D_ARRAYlowers toTexture2DArray<float4>(tex2da) forimage_sample*andimage_load.tests/startup_image_load_mip_check.pyandtests/startup_image_2d_array_check.py: negative controls (wrong-mip mismatch at pixel(0, 0), unsupported modifiers/dimensions) andllvm-mcreassembly checks are solid.tests/startup_image_3d.cpp, thearrayupload loop indexesfootprints[tz].Offsetwhile usingfootprint.Footprint.RowPitch(footprints[0]); for equal-sized 2D array slices at mip 0 the row pitch is identical, thoughfootprints[tz].Footprint.RowPitchwould be slightly more direct.Looks good to merge.