Skip to content

shader: lower gfx1013 array and 3D float image stores - #1649

Merged
tedin7 merged 2 commits into
R0Y00:mainfrom
Jess-Doit:shader/compute-image-store-layers
Nov 25, 2026
Merged

tedin7 merged 2 commits into
R0Y00:mainfrom
Jess-Doit:shader/compute-image-store-layers

Conversation

@Jess-Doit

@Jess-Doit Jess-Doit commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Refs #1545

Follows #1611 (merged). The change is cafdbde7, plus merges of main and a controls-and-docs commit at the head (a9fb1792).

Change

Allow full-mask gfx1013 RGBA32 FLOAT image_store to a 2D array or volume
at mip zero. --image-uav-dimension declares the matching view at u0.
The three address VGPRs supply X, Y and slice or depth in order. The caller
supplies unique destination texels. The SRV mip load profile continues to
use a separate 2D read-only texture.

The source-built cases write 64 texels across two slices or depth planes.
The CPU reference compares each word of each slice and mip, including
5,120 untouched words in the array and 4,416 in the volume. The
swapped-coordinate control exchanges Y with slice or depth while holding
the data and reference fixed. Translation controls reject a mismatched UAV
dimension, sparse DMASK, short address, A16, D16 and explicit mip stores.

Verification

Tested cafdbde7ed044c364719bf78e5a887a7e821f8e9 on Windows 10 22H2
build 19045.6456 using Windows SDK 10.0.26100.0 DXC and cs_6_0.

Adapter Driver Array Volume Swapped-coordinate control
GTX 1060 6 GB 32.0.15.6094 5,376/5,376 4,672/4,672 288 mismatches per texture
In-box WARP 10.0.19041.5794 5,376/5,376 4,672/4,672 288 mismatches per texture

The control first differs at mip 0, word 129, with 40110001 expected and
40110000 read. The D3D12 debug layer was enabled and reported zero warnings
or errors in the new dispatches. Debug and Release each passed 27 tests,
including all previous compute image, texture and MIMG checks and the docs
link check. Both selections had zero failures and zero capability skips.

. .\tools\dev.ps1
$env:VULKAN_SDK = 'C:\VulkanSDK\1.4.363.0'
$env:XBOX2WINDOWS_ADAPTER = '1060'
$env:X2W_D3D12_DEBUG = '1'
$venvPython = (Resolve-Path 'out/pe-env/Scripts/python.exe').Path
foreach ($preset in 'dev', 'release') {
    cmake --preset $preset "-DINTAKE_PYTHON:FILEPATH=$venvPython"
    cmake --build --preset $preset --target offscreen_check -j 2
    ctest --preset $preset --no-tests=error -j 1 -R '^(compute_store_aot_.*(image|texture|mimg).*|docs_links)$' -V
}

After merging #1611's head (057686c2), an independent Debug rerun on the same host passed 26/26:
ctest --preset dev --no-tests=error -R '^compute_store_aot_.*(image|texture|mimg)'. That includes
compute_store_aot_gfx1013_image_store_layers_{warp,hardware}.

At the head a9fb1792, after merging main at a4d17cf5, all 28 compute image, texture and MIMG tests passed in Debug on the GTX 1060 and WARP with no skips. The head's controls-and-docs commit was rerun on both adapters as well.

Local LLVM 23.1.6 reassembled both programs byte-for-byte, and the
disassembly matched the fixture source. The Ubuntu job uses LLVM 15 for
the binary and container CLI checks.

python3 -B tests/compute_mimg_float_store_layers_check.py --binary llvm-mc-15 llvm-objcopy-15 --llvm libLLVM-15.so.1

AI-assisted (Codex).

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peer review on faa78cd4:

Findings

No P1 or P2 defects found.

  • tools/compute_store_aot.py: --image-uav-dimension (2d, 2d-array, 3d) is gated to gfx1013 R32G32B32A32_FLOAT store bindings; image_store checks that the instruction's dim:SQ_RSRC_IMG_* matches image_uav_dimension, requires dmask:0xf, rejects a16, mip, packed, image_load, and image_get_resinfo for layered dimensions, requires 3 consecutive address VGPRs (x, y, slice/depth), and emits uint3(x, y, z) indexing into RWTexture2DArray<float4> / RWTexture3D<float4>.
  • tests/compute_check.cpp: texture_array_flag (1u << 31) and texture_volume_flag ((1u << 31) | (1u << 30)) are distinct in texture_format_mask; upload_texture and readback iterate texture_subresources(desc) (MipLevels * DepthOrArraySize for 2D arrays, MipLevels for 3D) and footprint.Depth slices, matching the Python reference order.
  • .github/workflows/windows.yml: adds tests/compute_mimg_float_store_layers_check.py with --binary llvm-mc-15 llvm-objcopy-15 --llvm libLLVM-15.so.1, matching its CLI arguments and the sibling compute_mimg_float_store_check.py entry.
  • Title-neutrality: clean.

Verification

  • Linux:
    • python3 -B tests/compute_mimg_float_store_layers_check.py --binary llvm-mc-19 llvm-objcopy-19 --llvm libLLVM.so.19.1 — PASS (exit 0; 2d-array and 3d translation controls, llvm-mc-19 machine words, libLLVM.so.19.1 disassembly, and container CLI roundtrip).
  • Win2025 (OS build 26100, MSVC 14.44.35207, WARP; *_hardware excluded):
    • Debug (--preset dev): cmake --build --preset dev --target offscreen_check -- -j 6 (4.78s), ctest --preset dev -R '^(compute_store_aot_gfx1013_image_store_layers_warp|compute_store_aot_gfx1013_image_store_warp|compute_store_aot_mimg_store_warp|compute_store_aot_mimg_load_warp|compute_store_aot_mimg_mip_warp|compute_store_aot_mimg_packed_warp|compute_store_aot_mimg_resinfo_warp|compute_store_aot_mimg_msaa_warp|compute_store_aot_mimg_atomic_integer_warp|compute_store_aot_mimg_atomic_minmax_warp|compute_store_aot_mimg_atomic_exchange_warp|compute_store_aot_mimg_atomic_counter_warp|compute_store_aot_mimg_store_packed_warp)$' --parallel 4 --no-tests=error --output-on-failure — 13/13 passed (19.78s; compute_store_aot_gfx1013_image_store_layers_warp 3.62s).
    • Release /O2 (--preset release): cmake --build --preset release --target offscreen_check -- -j 6 (2.75s), ctest --preset release -R '^(compute_store_aot_gfx1013_image_store_layers_warp|compute_store_aot_gfx1013_image_store_warp|compute_store_aot_mimg_store_warp|compute_store_aot_mimg_load_warp|compute_store_aot_mimg_mip_warp|compute_store_aot_mimg_packed_warp|compute_store_aot_mimg_resinfo_warp|compute_store_aot_mimg_msaa_warp|compute_store_aot_mimg_atomic_integer_warp|compute_store_aot_mimg_atomic_minmax_warp|compute_store_aot_mimg_atomic_exchange_warp|compute_store_aot_mimg_atomic_counter_warp|compute_store_aot_mimg_store_packed_warp)$' --parallel 4 --no-tests=error --output-on-failure — 13/13 passed (20.16s; compute_store_aot_gfx1013_image_store_layers_warp 3.61s).
  • Local mutation check:
    • Temporarily forced layered = False in tools/compute_store_aot.py; python3 -B tests/compute_mimg_float_store_layers_check.py --binary llvm-mc-19 llvm-objcopy-19 --llvm libLLVM.so.19.1 failed as expected (ValueError: Unsupported image store target, exit 1). Restored cleanly (git status --short clean).

AI-assisted; commands listed were executed locally.

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review of head 34d3c61 (comment only, not an approval). My earlier review was at faa78cd, which is an ancestor of this head.

Verdict: 0 P1 / 0 P2.

Since faa78cd only main merges were added (34d3c61 merges main a4d17cf); the PR's own commit cafdbde and its 8 files are unchanged, and my earlier points still hold (dimension gating, texture_array_flag and texture_volume_flag kept distinct in the mask, the windows.yml entry, title neutrality). GitHub CI at this head: the gfx1013 fixture assembly, the platform-independent Python checks and the Windows build and test succeeded; the O2 run was skipped.

What I checked

  • Coordinates: address_words gets + int(layered) and the address is uint3(x, y, coordinates[2]); an undefined slice register fails with "Unverified image coordinates".
  • DMASK must be 0xf; sparse masks, short addresses, a16, d16, image_store_mip, a layered image_load_mip and image_uav_mip of 1 are rejected. A dim: that does not match the declared view, layered loads, resinfo and packed forms, a gfx1030 array view, a raw-output 3D view and an unknown dimension are rejected. A 2D SRV load with a 2D-array UAV store translates correctly.
  • There is no format conversion (float RGBA32) and no slice clamping in the translator; D3D12 drops out-of-range UAV writes. The docs should say so (nit).
  • I recomputed the reference counts by hand: array 5376 words (4096+1024+256), volume 4672 (4096+512+64), and the swapped-coordinate control gives 128+128+32 = 288 mismatches with the first difference at word 129. All match the test and PR text. The Texture2DArray and Texture3D UAV fields and the footprint loops are in the right order.
  • scan_unsupported_shaders.py only lists mnemonics, so there is nothing to keep in agreement. No assertion is weakened (one error message changed wording and nothing searches the old text). The test checks the translator's generated HLSL against an independent Python reference. No title content.

Run

  • python3 -B tests/compute_mimg_float_store_layers_check.py --binary llvm-mc-19 llvm-objcopy-19 --llvm libLLVM.so.19.1: exit 0 (both 2d-array and 3d: controls, machine words, disassembly round trip, container CLI). compute_mimg_float_store_check, compute_store_check binary, compute_mimg_msaa_check, compute_entry_layout_check binary, docs_links_check (17 files, 366 links), bidi_controls_check (1299 files) and git diff --check origin/main...HEAD: exit 0.
  • llvm-mc-19 on gfx1013 and gfx1030 encodes image_store ... dim:SQ_RSRC_IMG_2D_ARRAY identically (28 0f 20 f0 08 0e 06 00). x86_64-w64-mingw32-g++ -std=c++20 -fsyntax-only tests/compute_check.cpp (generated headers stubbed): one error at line 385 in the old render_msaa_texture code, the same error as on main; none in the changed code.
  • Mutations in tools/compute_store_aot.py (each restored with git checkout --, final run green). Caught: y and slice swapped in the address; DMASK requirement dropped; layered allowed with an explicit mip; dimension-match check dropped; 3d mapped to RWTexture2DArray; slice register dropped from address_words. NOT caught: removing the not write clause of the layered guard (the or mip clause and gfx1013's own target check still reject the tested load, so I judge it equivalent), and removing the non-2d gate at the top of lower() (redundant with the in-instruction layered check for stores; a gfx1030 or raw-output declaration with no store is never tested directly).

Nits

  • The PR body still says the PR is the single commit cafdbde and the Windows results are for it; the head is now a merge commit.
  • The docs do not say an out-of-range slice or depth write is dropped.
  • No test combines a layered store with a separate 2D SRV load, or the gfx1030 plus 2d-array gate directly.
  • #1683, #1684, #1675, #1673, #1591, #1580, #1579 and #1566 also touch compute_store_aot.py and/or docs/experiments.md (textual conflict risk only); #1711 is a different pipeline.

Not run: the --draw runs (dxc and D3D12: the array and volume UAV views, upload and readback loops, and the 5376 and 4672 word comparisons). I rely on the PR's Windows results at cafdbde, my earlier WARP run and the green Windows job at this head; I did not run a new GPU or WARP pass at the merged head.

Linux limits: no Windows, WARP, DXC or GPU here; LLVM 19 only (CI pins LLVM 15). Anything that needs them was not run.

AI-assisted; commands listed were executed locally.

@Jess-Doit

Copy link
Copy Markdown
Contributor Author

Thanks @tedin7. These are in a9fb1792:

  • Body: it now describes the head as cafdbde7 plus the main merges and this commit, and records the reruns at the head: 28/28 image, texture and MIMG tests on the GTX 1060 and WARP, then the layers tests again after this commit.
  • Docs: docs/experiments.md now says the translator does not clamp the slice or depth coordinate, that a D3D12 UAV store outside the view is dropped, and that the console's behaviour for an out-of-range layer hasn't been measured.
  • Controls:
    • a 2D image_load_mip from the separate SRV followed by a 2D-array store translates to Texture2D<float4> at t0 and RWTexture2DArray<float4> at u0, indexed uint3(tid.x, tid.y, slice);
    • array and volume views are refused on gfx1030.

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of head a9fb1792d0c728dd078329036909ac2e6f95145d. My earlier reviews were on faa78cd4 and 34d3c61b; since then the PR added only a9fb1792 (a combined-translation control, a gfx1030 refusal control and docs).

Verdict: no P1 and no P2.

Linux limits. Linux x86_64, llvm-mc-19 and llvm-objcopy-19 (CI pins 15), Python 3. No Windows, no DXC, no GPU, and I did not run the pipeline's Windows helper, so the array and volume readbacks (5,376 and 4,672 words, the swapped-coordinate control) and the debug-layer results are the author's GTX 1060 and WARP numbers, not reproduced by me. I read the tests/compute_check.cpp changes instead of running them.

What changed since 34d3c61b.

  • tests/compute_mimg_float_store_layers_check.py: combined_controls() (called at the start of main) checks that a 2D image_load_mip from the separate SRV followed by a 2D-array store emits Texture2D<float4> at t0 and RWTexture2DArray<float4> at u0 with the store outputData[uint3(tid.x, tid.y, 0x00000001u)], and that array and 3D views are refused on gfx1030.
  • docs/experiments.md: states that the slice or depth coordinate is not clamped, that a D3D12 UAV store outside the view is dropped, and that the console's out-of-range behaviour is not measured. That is the honest wording for the open question I raised.

What I read in the lowering (tools/compute_store_aot.py)

  • The dimension regex takes 2D_ARRAY|2D|3D in that order; a store must match --image-uav-dimension; layered loads, resinfo, a16, mip and packed forms are refused; the address is three words (+ int(layered)) emitted as uint3(x, y, slice). The array and volume views are limited to the gfx1013 RGBA32 FLOAT store binding.
  • Harness (tests/compute_check.cpp): the selector bits are distinct (texture_array_flag and texture_volume_flag differ in bit 30), the expected word count is 5,376 for four layers and 4,672 for depths 4, 2 and 1 (depth >>= level for the volume, which my arithmetic reproduces: 10244 + 2562 + 64*1), the 3D UAV uses {mip, 0, ~0u}, the array UAV covers all slices, and the upload and readback loops walk GetCopyableFootprints per subresource with footprint.Depth slices, matching the Python reference order.

What I ran on this head (worktree at the exact SHA; clean after every mutation)

  • python3 -B tests/compute_mimg_float_store_layers_check.py: passes (combined, 2d-array and 3d controls). With --binary llvm-mc-19 llvm-objcopy-19 --llvm /usr/lib/llvm-19/lib/libLLVM-19.so: both programs match llvm-mc and the container CLI.
  • python3 -B tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so (the CI entry for the translator as a whole): exit 0.
  • git merge-tree --write-tree origin/main HEAD: clean; also clean against #1684. git diff --check origin/main...HEAD, docs_links_check.py (17 files, 366 links), bidi_controls_check.py: clean.
  • Five mutations of tools/compute_store_aot.py, each restored, each makes the controls fail: slice and Y swapped in the address; the extra address word dropped; the view-match check removed; the array view declared as RWTexture3D; array and 3D views allowed on gfx1030.

Findings

  1. P3, observation, not a regression: a layered image_store ... dim:SQ_RSRC_IMG_2D_ARRAY unorm is accepted and the modifier is dropped, exactly as for the 2D form today (the dimension regex has (?: unorm)?). I translated the fixture with unorm added and got the same uint3 store. If unorm should be refused for the new forms, that is a separate change; the fixtures do not use it.
  2. P3: the docs name the unclamped slice as unmeasured on the console; a title that stores to an out-of-range layer would be dropped by the desktop UAV, which is a possible silent difference. No code change is needed now.
  3. Not verified by me: the Windows results above and the CI jobs.

AI-assisted; commands listed were executed locally.

@Jess-Doit

Copy link
Copy Markdown
Contributor Author

Thanks @tedin7. On finding 1 (unorm accepted and dropped on the layered store): I think that's correct, so I'm leaving it as is.

  • Coordinates: for image_store and image_load, the address VGPRs are integer texel coordinates. unorm (the MIMG UNRM bit) only changes how sample instructions interpret their coordinates.
  • ISA field description: as I read it, UNRM forces unnormalized addressing and must be set for image stores and atomics. So ... dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm is the usual spelling of the same store, and the emitted outputData[uint3(x, y, slice)] is the same either way.
  • The 2D form: from shader: lower gfx1013 float image stores and mip loads #1611 it already treats it the same way.

If you or the maintainer prefer the profile to refuse unorm until a fixture spells it, that's a one-line change, but I don't think it's needed.

On finding 2 (an out-of-range layer is dropped by the desktop UAV): agreed. That's the open question docs/experiments.md now records.

@Jess-Doit

Copy link
Copy Markdown
Contributor Author

Status: ready to merge from our side.

All review feedback on this PR is either addressed in a9fb1792 or answered above:

  • tedin7's three reviews found no P1 or P2 issues.
  • The unorm P3 is explained and kept as is.
  • The out-of-range-slice P3 is recorded in docs/experiments.md.

CI is green at the head, and the branch merges cleanly with main and with #1684. If you'd like anything else changed or tested, I'll do it.

Jess-Doit added a commit to Jess-Doit/Xbox2Windows that referenced this pull request Nov 25, 2026
…e-1d

Keeps this branch's 1D SRV dimension checks and CLI argument with main's
gfx1013 image atomic flag, descriptor-format constant and wave-size
arguments; the docs, CMake and workflow lists keep both entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jess-Doit

Copy link
Copy Markdown
Contributor Author

Merged main at 489d5797 in 248fc833 to resolve conflicts with #2013 (gfx1013 image atomics):

  • tools/compute_store_aot.py: keeps this PR's view-dimension checks and its array/3D UAV types, together with main's gfx1013 image-atomic flag and descriptor-format helper.
  • Docs, README, CMake and workflow lists: keep both entries.

Reruns after the merge:

  • Debug, GTX 1060 and WARP: 24/24 image-store, layer, atomic and MIMG draws.
  • LLVM 15 --binary checks of the layers, 2D and image-atomic fixtures.
  • docs_links_check.py, run_checks_parallel_check.py, bidi_controls_check.py and git diff --check.

Status: ready to merge from our side. CI is green at 248fc833, and every review finding is addressed or answered above. #2056 (1D) is stacked on this PR and stays a draft until it lands.

Jess-Doit added a commit to Jess-Doit/Xbox2Windows that referenced this pull request Nov 25, 2026
…e-1d

With R0Y00#2106 (D16 stores) now in the base: the image pattern takes 1D, the
layered dimensions and d16; a d16 store to any dimension other than 2D,
1D included, keeps R0Y00#2106's 'Unsupported compute instruction' refusal; the
harness keeps the 1D flag (bit 23) and the RGBA16 FLOAT flag (bit 22) with
main's per-format texel size and this branch's 1D height. README, docs,
CMake and workflow keep both entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jess-Doit

Copy link
Copy Markdown
Contributor Author

Merged main at 38fa5314 in b157cf78 to resolve the conflicts from #2106 (D16 image stores):

  • tools/compute_store_aot.py:
    • The image pattern takes both this PR's dimension group and d16.
    • The RGBA16 FLOAT setup comes before the view-dimension checks.
    • A d16 store to an array or volume keeps shader: lower gfx1013 D16 image stores to RGBA16 FLOAT #2106's Unsupported compute instruction refusal, so its controls pass unchanged.
  • tests/compute_check.cpp:
  • README, docs, CMake and workflow lists: keep both entries.

Reruns after the merge:

  • Debug and Release on the GTX 1060 and WARP: 33/33 each. That covers the gfx1013 image store, layers, D16 and atomics draws, and the MIMG draws.
  • LLVM 15 --binary checks of the layers, D16, 2D and image-atomic fixtures.
  • docs_links_check.py, run_checks_parallel_check.py, bidi_controls_check.py and git diff --check.

Status: ready to merge from our side. CI is green at b157cf78, the branch merges cleanly with main, and every review finding is addressed or answered above.

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of head b157cf78955e56f4409152843bfa3127f527a830 (merge of main into the branch; code change unchanged in tools/compute_store_aot.py).

Scope read: git diff --stat origin/main...HEAD (8 files, +346/-62), then the lower() image_store path, --image-uav-dimension, the new fixture and check script.

Commands run locally (Linux):

  • python3 tests/compute_mimg_float_store_layers_check.py -> 2d-array and 3d translation controls passed; combined SRV load + array store and gfx1030 refusal passed.
  • python3 tests/compute_mimg_float_store_check.py -> existing 2D float store controls still pass.
  • python3 tests/docs_links_check.py -> self-test passed, 18 files, 399 links.
  • python3 tests/bidi_controls_check.py -> no bidirectional controls in 1438 files.
  • git diff --check origin/main...HEAD -> clean.
  • gh pr checks 1649: Linux checks, fixture assembly and Windows build/test pass; /O2 and chart jobs skipped. PR is MERGEABLE, title is neutral.

Mutations (both reverted with git checkout -- .):

  1. Dropped + int(layered) from address_words: the checker fails (translation rejects the 3-VGPR store). Killed.
  2. Swapped X/Y in the emitted uint3(...) address: the checker's ADDRESS assertion fails. Killed.

Findings:

  • P1: none.
  • P2: none.
  • nit: IMAGE_UAV_TYPES is placed between RGBA32_FLOAT and RGBA16_FLOAT; moving it after the RGBA16 constant would keep the format constants together.
  • nit: the comment above IMAGE_FORMATS now wraps past the surrounding line width.

Logic notes: D16, A16, _mip, packed and load/resinfo forms are refused for array/3D, and a dimension that differs from the declared UAV is refused. Both match the PR text. I did not run the Windows WARP/GPU job; the PR body reports GTX 1060 and WARP results for an earlier commit, and the head only merges main.

AI-assisted; commands listed were executed locally.

Jess-Doit added a commit to Jess-Doit/Xbox2Windows that referenced this pull request Nov 25, 2026
@Jess-Doit

Copy link
Copy Markdown
Contributor Author

Merged current main (681d01f5) at 47c64785 to clear the conflict. Only CMakeLists.txt conflicted: main's form-coverage environment on the 2D image-store test is kept, along with this PR's array and 3D registrations for both adapters. Re-run on Windows 10 19045 with the debug layer on (0 D3D12 warnings or errors): GTX 1060 + WARP, 12 passed, 0 failed, 0 skipped. compute_store_check.py binary (LLVM 15), docs links, bidi and git diff --check also pass. The texture-case flag bits are unchanged.

Status: ready to merge from our side.

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review of head 47c647856ba4802d40993856ec5c25b23bb36697 (merge of main 681d01f into the branch; PR-owned code in tools/compute_store_aot.py, the new fixture/check and docs is unchanged in substance).

Scope read: git diff --stat origin/main...HEAD (8 files, +346/-62), then the lower() image_store path, --image-uav-dimension, IMAGE_UAV_TYPES, the fixture, the check script, CMake/workflow wiring and docs.

Commands run locally (Linux):

  • python3 -B tests/compute_mimg_float_store_layers_check.py -> combined SRV load + array store / gfx1030 refusal, 2d-array and 3d translation controls passed.
  • python3 -B tests/compute_mimg_float_store_layers_check.py --binary /usr/bin/llvm-mc-19 /usr/bin/llvm-objcopy-19 -> machine words match llvm-mc for 2d-array and 3d.
  • python3 -B tests/compute_mimg_float_store_check.py -> existing 2D float store controls still pass.
  • python3 tests/docs_links_check.py -> 18 files, 407 links, OK.
  • python3 tests/bidi_controls_check.py -> 1484 files, no bidirectional controls.
  • git diff --check origin/main...HEAD -> clean.
  • gh pr checks 1649: Linux checks, fixture assembly and Windows build/test pass; /O2 and chart jobs skipped. MERGEABLE, title neutral.

Mutations (each reverted with git checkout -- .):

  1. Dropped + int(layered) from address_words: checker fails. Killed.
  2. Removed the dimension != image_uav_dimension refusal: checker fails ("Expected rejection ... does not match the 3d UAV view"). Killed.
  3. Swapped Y and slice in the emitted uint3(...) address: checker fails. Killed.
  4. Dropped the a16 or mip or packed guard for layered forms: checker fails. Killed.
  5. Disabled the d16 and layered guard: checker still passes. Survived (see nit).

Findings:

  • P1: none.
  • P2: none.
  • nit: the explicit if m["d16"] and layered refusal in lower() is redundant. With it disabled, the store + " d16" controls still reject with the same message, so another check already refuses it. Either keep it as intentional defense or drop it; a control that only this guard can satisfy would pin it.
  • nit (carried over): IMAGE_UAV_TYPES sits between RGBA32_FLOAT and RGBA16_FLOAT; keeping the format constants together reads better.

Not run: the Windows WARP/GPU draw (compute_store_aot_gfx1013_image_store_layers_*). The head only merges main over code already exercised on an earlier commit, and the Windows CI job passes.

AI-assisted; commands listed were executed locally.

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

@Jess-Doit could you rebase this branch onto current main and force-push?

GitHub reports head 47c64785 as conflicting with main, so it cannot be merged as is.

Files that conflict with current main (4aaea119):

  • .github/workflows/windows.yml
  • CMakeLists.txt
  • README.md
  • docs/experiments.md
  • tests/compute_check.cpp

Commands run locally:

git fetch origin main pull/1649/head
git merge-tree --write-tree --name-only origin/main FETCH_HEAD
gh pr view 1649 --json mergeable   # CONFLICTING

Once it is rebased and CI is green it will be re-checked right away.

AI-assisted; commands listed were executed locally.

@Jess-Doit
Jess-Doit force-pushed the shader/compute-image-store-layers branch from 47c6478 to 9ae3d2e Compare November 25, 2026 17:08
@Jess-Doit

Copy link
Copy Markdown
Contributor Author

@tedin7 thanks. Rebased onto current main (7092683a) as one commit and force-pushed: head is now 9ae3d2ed.

The conflicts came from #2136's same-texel UAV loads, which merged into the same places:

  • the test lists in windows.yml and CMakeLists.txt;
  • the README row;
  • docs/experiments.md;
  • the texture selectors in tests/compute_check.cpp.

How they were resolved:

  • Both sides are kept.
  • The format mask now includes both the UAV-load flag and the array and volume flags.
  • The new CTest entries record form coverage like their neighbours.

Tests on Windows 10 build 19045, dev preset, GTX 1060 6GB (driver 32.0.15.6094) and in-box WARP 10.0.19041.

  • compute_store_aot_gfx1013_image_(store_layers|uav_load|store_d16)_: 6 of 6.
  • Pure-Python: compute_mimg_float_store_layers_check, compute_mimg_image_uav_load_check, compute_heap_store_check, form_coverage_check and docs_links_check pass.

Ready to merge from our side.

Full-mask R32G32B32A32_FLOAT image_store at mip zero into a 2D array or
3D view, declared with --image-uav-dimension 2d-array or 3d, lowers to
RWTexture2DArray<float4> or RWTexture3D<float4> at u0, indexed by three
consecutive address VGPRs. A 2D image_load_mip from a separate SRV
followed by an array store translates to the two views. Wrong view
dimensions, sparse masks and gfx1030 array or volume views are refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jess-Doit

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (5123cc6d) and force-pushed: head is now fab79c8e.

The conflict was one line in tools/compute_store_aot.py: the main() call to lower(). #2511 added buffer_float_domain= and this PR adds image_uav_dimension= at the same spot, so both are kept.

Tests, run on Windows 10 19045 with GTX 1060 + WARP:

  • ctest -R "mimg|image_store|image_load": 41 of 42 pass.
  • The one failure, startup_image_load_d16_warp, fails on main on this host too.

Ready to merge from our side.

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of head fab79c8 (comment only, no approval).

Checked:

  • tools/compute_store_aot.py: array and volume forms are accepted only for image_store, RGBA32 FLOAT, full mask, mip zero. Loads, A16, D16, _mip and packed forms are refused. The instruction dimension must match the declared --image-uav-dimension view. Unknown dimensions are refused up front.
  • Sibling checks: 2D paths, the SRV mip-load profile and the D16 store test are unchanged. The new test is added to the CMake list and to the Linux CI list in windows.yml, next to the sibling image-store tests.
  • Test: compute_mimg_float_store_layers_check.py gives static refusal controls, a source-built draw for array and volume, a CPU reference that compares every word (including untouched texels), and a swapped-coordinate negative control. No other open or merged PR covers this slice (#2056 is 1D and is a draft).

Commands run locally:

  • git diff --check origin/main...HEAD: clean
  • python3 tests/docs_links_check.py: pass
  • python3 tests/bidi_controls_check.py: pass
  • Translation controls of compute_mimg_float_store_layers_check.py (array and 3D): pass
  • Mutation: disabling the dimension-match refusal makes the controls fail ("Expected rejection: image_store dimension 2d-array does not match the 3d UAV view"). Reverted afterwards.

Not run here: the D3D12 WARP draw and the LLVM binary check (no LLVM 15 here). The Windows run comes next after updating the branch with main.

AI-assisted; commands listed were executed locally.

@tedin7

tedin7 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Win2025 WARP receipt for head a3f0a8e after updating with main.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit a3f0a8eecf35dda225bf02619dc95e490a017f70:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target offscreen_check -- -j 2): 21.54s (configure 1.78s)
    • Test (ctest --preset dev -R 'compute_store_aot_gfx1013_image_store_layers_warp|compute_store_aot_gfx1013_image_(store|uav_load)|form_coverage' --parallel 6 --no-tests=error --output-on-failure): 9/9 passed (11.05s: compute_store_aot_gfx1013_image_store_d16_hardware 0.97s, compute_store_aot_gfx1013_image_store_hardware 1.02s, compute_store_aot_gfx1013_image_store_warp 1.02s, compute_store_aot_gfx1013_image_store_d16_warp 1.04s, compute_store_aot_gfx1013_image_store_layers_warp 1.08s, compute_store_aot_gfx1013_image_uav_load_warp 2.28s, compute_store_aot_gfx1013_image_uav_load_hardware 2.33s, compute_store_aot_gfx1013_image_store_layers_hardware 3.94s, form_coverage 10.95s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target offscreen_check -- -j 2): 39.82s (configure 1.80s)
    • Test (ctest --preset release -R 'compute_store_aot_gfx1013_image_store_layers_warp|compute_store_aot_gfx1013_image_(store|uav_load)|form_coverage' --parallel 6 --no-tests=error --output-on-failure): 9/9 passed (10.49s: compute_store_aot_gfx1013_image_store_d16_warp 0.82s, compute_store_aot_gfx1013_image_store_d16_hardware 0.86s, compute_store_aot_gfx1013_image_store_warp 0.86s, compute_store_aot_gfx1013_image_store_hardware 0.89s, compute_store_aot_gfx1013_image_store_layers_warp 0.93s, compute_store_aot_gfx1013_image_uav_load_warp 1.83s, compute_store_aot_gfx1013_image_uav_load_hardware 2.19s, compute_store_aot_gfx1013_image_store_layers_hardware 3.04s, form_coverage 10.39s)
  • Windows Python checks: tests/compute_entry_layout_check.py ok (0.1s)
  • sccache: 10/16 hits; wall 86.0s

AI-assisted; commands listed were executed locally.

@tedin7
tedin7 merged commit 44e5458 into R0Y00:main Nov 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants