compute: image_store / image_load_mip to typed UAVs, and buffer/image atomics #1538

Open
opened 2026-11-24 13:48:03 +00:00 by denn0x · 12 comments
denn0x commented 2026-11-24 13:48:03 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-24T13:48:03Z.


Problem

Measured on the 349 gfx1013 compute programs (device slot 67 pipelines) that the executable created in one run past start-up, and on the 627 dispatches of one busy frame after loading. Image stores and atomics have no lowering yet:

  • image_store (166 sites, with dmask, unorm, d16) into 1D/2D/2D array/3D images.
  • image_load_mip (249 sites).
  • buffer_atomic_add (7 of the busy frame's dispatches), buffer_atomic_cmpswap, image_atomic_umax.

Proposal

  • The stored image becomes RWTexture*<float4> (u register); a load from the same descriptor goes through the
    UAV (typed UAV load). A texture both sampled and stored is refused.
  • dmask selects the stored channels, with 0 for the others. d16 data is two halves per VGPR.
  • image_load_mip: the mip is the last address component, Load(int3/int4(..., mip)) on an SRV. On a UAV the
    view's mip slice is used.
  • Buffer atomics map to RWByteAddressBuffer.Interlocked* (with glc returning the old value), image atomics to
    Interlocked* on RWTexture2D<uint>, which needs an R32_UINT view.

Alternatives

None noted.

Verification

A source-built gfx1013 fixture (LLVM 15 llvm-mc, as the existing compute_store_check.py and pixel_aot_check.py
fixtures) that uses the instructions, translated and dispatched on WARP, with the UAV read back and compared with
expected words. Include a negative control (an operand form or modifier the lowering refuses).

Checklist

  • I checked for an existing issue or pull request for this change.
  • I did not include game files, dumps, distribution links or credentials.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6583244923 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1545). Originally posted by [denn0x](https://github.com/denn0x) on 2026-11-24T13:48:03Z. --- ### Problem Measured on the 349 gfx1013 compute programs (device slot 67 pipelines) that the executable created in one run past start-up, and on the 627 dispatches of one busy frame after loading. Image stores and atomics have no lowering yet: - `image_store` (166 sites, with `dmask`, `unorm`, `d16`) into 1D/2D/2D array/3D images. - `image_load_mip` (249 sites). - `buffer_atomic_add` (7 of the busy frame's dispatches), `buffer_atomic_cmpswap`, `image_atomic_umax`. ### Proposal - The stored image becomes `RWTexture*<float4>` (u register); a load from the same descriptor goes through the UAV (typed UAV load). A texture both sampled and stored is refused. - `dmask` selects the stored channels, with 0 for the others. d16 data is two halves per VGPR. - `image_load_mip`: the mip is the last address component, `Load(int3/int4(..., mip))` on an SRV. On a UAV the view's mip slice is used. - Buffer atomics map to `RWByteAddressBuffer.Interlocked*` (with `glc` returning the old value), image atomics to `Interlocked*` on `RWTexture2D<uint>`, which needs an R32_UINT view. ### Alternatives None noted. ### Verification A source-built gfx1013 fixture (LLVM 15 `llvm-mc`, as the existing `compute_store_check.py` and `pixel_aot_check.py` fixtures) that uses the instructions, translated and dispatched on WARP, with the UAV read back and compared with expected words. Include a negative control (an operand form or modifier the lowering refuses). ### Checklist - [x] I checked for an existing issue or pull request for this change. - [x] I did not include game files, dumps, distribution links or credentials. AI-assisted (Claude Code).
Jess-Doit commented 2026-11-24 15:02:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-24T14:44:13Z.


Taking a first slice of this, AI-assisted (Codex, driven with Claude Code), with Windows 10 22H2, a GTX 1060 and WARP.

Slice: gfx1013 image_store into a 2D image, lowered to RWTexture2D<float4> (a u register), with dmask selecting the stored channels. Then image_load_mip on an SRV, as Load(int3(x, y, mip)).

Fixture: a source-built gfx1013 program, dispatched on WARP and hardware, with readback compared against independently computed words. A negative control covers a form the lowering refuses (for example d16, or a texture that is both sampled and stored).

Not in this slice: buffer and image atomics, d16, 1D, arrays and 3D. #1587's gfx1030 float image atomics are separate.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7134863964 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1545#issuecomment-7134863964). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-24T14:44:13Z. --- Taking a first slice of this, AI-assisted (Codex, driven with Claude Code), with Windows 10 22H2, a GTX 1060 and WARP. **Slice:** gfx1013 `image_store` into a 2D image, lowered to `RWTexture2D<float4>` (a u register), with `dmask` selecting the stored channels. Then `image_load_mip` on an SRV, as `Load(int3(x, y, mip))`. **Fixture:** a source-built gfx1013 program, dispatched on WARP and hardware, with readback compared against independently computed words. A negative control covers a form the lowering refuses (for example d16, or a texture that is both sampled and stored). **Not in this slice:** buffer and image atomics, d16, 1D, arrays and 3D. #1587's gfx1030 float image atomics are separate.
R0Y00 commented 2026-11-24 15:02:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T14:52:58Z.


Please go ahead. For the first store, start with full dmask on a typed 2D UAV, unique per-thread destinations, and sentinels outside the written area. Keep sparse masks refused unless the unwritten components and cross-lane behavior are proven. Keep image_load_mip on a separate read-only texture, with different mip contents and a wrong-mip control. These can land independently. Leave same-descriptor reads and writes and atomics outside this slice.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7135103141 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1545#issuecomment-7135103141). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T14:52:58Z. --- Please go ahead. For the first store, start with full dmask on a typed 2D UAV, unique per-thread destinations, and sentinels outside the written area. Keep sparse masks refused unless the unwritten components and cross-lane behavior are proven. Keep image_load_mip on a separate read-only texture, with different mip contents and a wrong-mip control. These can land independently. Leave same-descriptor reads and writes and atomics outside this slice.
Jess-Doit commented 2026-11-24 17:02:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-24T16:20:50Z.


Next slice, AI-assisted (Codex, driven with Claude Code), with Windows 10 22H2, a GTX 1060 and WARP. #1611 and #1649 covered the image stores.

Slice: gfx1013 buffer_atomic_add, buffer_atomic_umax and buffer_atomic_cmpswap on a raw UAV, lowered to RWByteAddressBuffer.Interlocked*:

  • The existing gfx1030 profile only handles one fixed offset shared by every lane (off). This slice adds per-thread addresses through offen and idxen.
  • With glc, the old value is returned to the data VGPR and stored to a separate record.

Fixture: a source-built gfx1013 program on WARP and hardware.

  • Distinct per-thread addresses, plus a shared address that several lanes hit.
  • The final memory words are compared exactly, and every untouched word is checked against a sentinel.
  • For a shared address, the returned old values must be a permutation of the expected sequence, since lane order isn't defined.
  • A cmpswap case with both a matching and a non-matching compare.

Negative controls:

  • forms the lowering refuses: a 64-bit _x2, an atomic on a source SRV, and a missing vmcnt wait before a glc result is used;
  • a draw control that must mismatch.

Not in this slice: image atomics, float atomics, 64-bit atomics, and inc, dec and csub on gfx1013.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7137518007 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1545#issuecomment-7137518007). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-24T16:20:50Z. --- Next slice, AI-assisted (Codex, driven with Claude Code), with Windows 10 22H2, a GTX 1060 and WARP. #1611 and #1649 covered the image stores. **Slice:** gfx1013 `buffer_atomic_add`, `buffer_atomic_umax` and `buffer_atomic_cmpswap` on a raw UAV, lowered to `RWByteAddressBuffer.Interlocked*`: - The existing gfx1030 profile only handles one fixed offset shared by every lane (`off`). This slice adds per-thread addresses through `offen` and `idxen`. - With `glc`, the old value is returned to the data VGPR and stored to a separate record. **Fixture:** a source-built gfx1013 program on WARP and hardware. - Distinct per-thread addresses, plus a shared address that several lanes hit. - The final memory words are compared exactly, and every untouched word is checked against a sentinel. - For a shared address, the returned old values must be a permutation of the expected sequence, since lane order isn't defined. - A cmpswap case with both a matching and a non-matching compare. **Negative controls:** - forms the lowering refuses: a 64-bit `_x2`, an atomic on a source SRV, and a missing `vmcnt` wait before a `glc` result is used; - a draw control that must mismatch. **Not in this slice:** image atomics, float atomics, 64-bit atomics, and `inc`, `dec` and `csub` on gfx1013.
R0Y00 commented 2026-11-24 17:02:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T16:41:32Z.


This bounded raw-buffer atomics slice can proceed independently of the wider image work. For shared-address add, check the final word and the multiset of old values. For umax and compare-and-swap, use independent cases with deterministic addresses or an order-independent oracle, since their intermediate old values depend on ordering. Keep the guard words and missing-wait refusal.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7138059348 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1545#issuecomment-7138059348). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T16:41:32Z. --- This bounded raw-buffer atomics slice can proceed independently of the wider image work. For shared-address add, check the final word and the multiset of old values. For umax and compare-and-swap, use independent cases with deterministic addresses or an order-independent oracle, since their intermediate old values depend on ordering. Keep the guard words and missing-wait refusal.
Jess-Doit commented 2026-11-24 23:03:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-24T22:45:14Z.


Status of our slices of this issue:

Slice PR State
2D image_store (full dmask) and image_load_mip on a separate read-only texture #1611 merged
2D array and 3D image_store (full dmask) #1649 ready to merge from our side: CI green, review findings addressed, head a9fb1792
32-bit buffer_atomic_add, umax and cmpswap on a raw UAV #1684 ready to merge from our side: CI green, review findings addressed, head 5de96be9

#1684 follows your conditions above:

  • Shared-address add: checks the final word and the sorted multiset of old values.
  • umax and cmpswap: each uses deterministic per-thread addresses.
  • Kept: the guard words and the missing-wait refusal.

Still open in this issue, with nothing claimed by us:

  • sparse dmask and d16 stores;
  • 1D images;
  • a typed UAV load from the same descriptor as the store;
  • image_atomic_umax, which needs an R32_UINT view;
  • the other buffer atomics and the 64-bit (_x2) forms, which #1684 refuses on gfx1013.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7146603876 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1545#issuecomment-7146603876). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-24T22:45:14Z. --- Status of our slices of this issue: | Slice | PR | State | |---|---|---| | 2D `image_store` (full dmask) and `image_load_mip` on a separate read-only texture | #1611 | merged | | 2D array and 3D `image_store` (full dmask) | #1649 | ready to merge from our side: CI green, review findings addressed, head `a9fb1792` | | 32-bit `buffer_atomic_add`, `umax` and `cmpswap` on a raw UAV | #1684 | ready to merge from our side: CI green, review findings addressed, head `5de96be9` | #1684 follows your conditions above: - **Shared-address add:** checks the final word and the sorted multiset of old values. - **`umax` and `cmpswap`:** each uses deterministic per-thread addresses. - **Kept:** the guard words and the missing-wait refusal. Still open in this issue, with nothing claimed by us: - sparse `dmask` and `d16` stores; - 1D images; - a typed UAV load from the same descriptor as the store; - `image_atomic_umax`, which needs an `R32_UINT` view; - the other buffer atomics and the 64-bit (`_x2`) forms, which #1684 refuses on gfx1013.
Jess-Doit commented 2026-11-24 23:03:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-24T22:51:35Z.


Taking the next slice: gfx1013 image atomics. AI-assisted (Claude Code), tested on Windows 10 22H2 with a GTX 1060 and WARP. Now in #2013.

Slice: gfx1013 image_atomic_add, image_atomic_umax and image_atomic_cmpswap on a 2D R32_UINT UAV, lowered to InterlockedAdd, InterlockedMax and InterlockedCompareStore on RWTexture2D<uint>.

  • Shared lowering: the gfx1030 profile already lowers these, and the gfx1013 profile now uses that lowering, which emits identical HLSL.
  • No returned values (edited: my first version of this comment said glc would return the old value). The shared lowering refuses glc, so these forms return nothing; the returning forms stay open. As a result, the fixtures check the final words, not a multiset of old values.
  • Refused on gfx1013:
    • other ops, signed and float formats;
    • a nonzero mip, array and 3D views;
    • a second atomic, and a store to the same image.
  • Fixtures:
    • unique-texel add, umax and cmpswap, plus a contended add with two lanes per texel;
    • all 336 words of a three-mip texture are compared, including untouched texels;
    • one mutant per case must mismatch.

Overlap: none of the open PRs touching tools/compute_store_aot.py (#1683, #1684 and the ALU slices) lowers image atomics. #1684 also touches the gfx1013 rules on different lines; I'll rebase onto whichever lands first.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7146727879 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1545#issuecomment-7146727879). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-24T22:51:35Z. --- Taking the next slice: gfx1013 image atomics. AI-assisted (Claude Code), tested on Windows 10 22H2 with a GTX 1060 and WARP. **Now in #2013.** **Slice:** gfx1013 `image_atomic_add`, `image_atomic_umax` and `image_atomic_cmpswap` on a 2D `R32_UINT` UAV, lowered to `InterlockedAdd`, `InterlockedMax` and `InterlockedCompareStore` on `RWTexture2D<uint>`. - **Shared lowering:** the gfx1030 profile already lowers these, and the gfx1013 profile now uses that lowering, which emits identical HLSL. - **No returned values** (edited: my first version of this comment said `glc` would return the old value). The shared lowering refuses `glc`, so these forms return nothing; the returning forms stay open. As a result, the fixtures check the final words, not a multiset of old values. - **Refused on gfx1013:** - other ops, signed and float formats; - a nonzero mip, array and 3D views; - a second atomic, and a store to the same image. - **Fixtures:** - unique-texel add, `umax` and `cmpswap`, plus a contended add with two lanes per texel; - all 336 words of a three-mip texture are compared, including untouched texels; - one mutant per case must mismatch. Overlap: none of the open PRs touching `tools/compute_store_aot.py` (#1683, #1684 and the ALU slices) lowers image atomics. #1684 also touches the gfx1013 rules on different lines; I'll rebase onto whichever lands first.
Jess-Doit commented 2026-11-25 01:01:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-24T23:18:37Z.


Next slice: gfx1013 1D images. AI-assisted (Codex, driven with Claude Code), tested on Windows 10 22H2 with a GTX 1060 and WARP.

Slice:

  • Store: a full-dmask image_store ... dim:SQ_RSRC_IMG_1D into an RGBA32_FLOAT RWTexture1D<float4>.
  • Load: image_load_mip ... dim:SQ_RSRC_IMG_1D from a separate read-only Texture1D<float4>. The mip is the second address word.

It follows the rules of #1611 and #1649:

  • one address word (x) for the store and two (x, mip) for the load;
  • unique per-thread destinations, and sentinels outside the written texels and in the other mips;
  • a wrong-mip control and a swapped-coordinate control.

Sparse dmask, d16, a16, 1D arrays, same-descriptor reads and atomics stay refused.

Dependency: this builds on #1649's image-dimension option (--image-uav-dimension), so it will be stacked on that branch. I'll open it after #1649 merges, or as a stacked PR that names #1649.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7147252964 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1545#issuecomment-7147252964). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-24T23:18:37Z. --- Next slice: gfx1013 1D images. AI-assisted (Codex, driven with Claude Code), tested on Windows 10 22H2 with a GTX 1060 and WARP. **Slice:** - **Store:** a full-`dmask` `image_store ... dim:SQ_RSRC_IMG_1D` into an `RGBA32_FLOAT` `RWTexture1D<float4>`. - **Load:** `image_load_mip ... dim:SQ_RSRC_IMG_1D` from a separate read-only `Texture1D<float4>`. The mip is the second address word. It follows the rules of #1611 and #1649: - one address word (x) for the store and two (x, mip) for the load; - unique per-thread destinations, and sentinels outside the written texels and in the other mips; - a wrong-mip control and a swapped-coordinate control. Sparse `dmask`, `d16`, `a16`, 1D arrays, same-descriptor reads and atomics stay refused. **Dependency:** this builds on #1649's image-dimension option (`--image-uav-dimension`), so it will be stacked on that branch. I'll open it after #1649 merges, or as a stacked PR that names #1649.
Jess-Doit commented 2026-11-25 01:01:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-24T23:44:45Z.


Next slice: gfx1013 d16 image stores. AI-assisted (Codex, driven with Claude Code), tested on Windows 10 22H2 with a GTX 1060 and WARP.

Slice:

  • A full-dmask image_store ... dmask:0xf dim:SQ_RSRC_IMG_2D d16 into a 2D R16G16B16A16_FLOAT UAV.
  • The data is two halves per VGPR, as the proposal above says:
    • v[n] holds x in its low half and y in its high half;
    • v[n+1] holds z and w the same way.
  • The HLSL widens each half with f16tof32, and the typed UAV narrows it back. The fixtures use finite binary16 values (normal, subnormal and signed zero) so that round trip is exact; NaN payloads are not claimed.

Same rules as #1611: unique per-thread destinations, and sentinels outside the written texels and in the other mips. One control swaps the two halves of a VGPR and must mismatch. Sparse dmask stays refused, per your earlier condition, and so do d16 loads, a16, other formats, non-2D views and atomics.

New branch from main. It touches the same gfx1013 image rules in tools/compute_store_aot.py as #1649, #2013 and #2056, so I'll rebase onto whichever lands first.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7147747044 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1545#issuecomment-7147747044). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-24T23:44:45Z. --- Next slice: gfx1013 `d16` image stores. AI-assisted (Codex, driven with Claude Code), tested on Windows 10 22H2 with a GTX 1060 and WARP. **Slice:** - A full-`dmask` `image_store ... dmask:0xf dim:SQ_RSRC_IMG_2D d16` into a 2D `R16G16B16A16_FLOAT` UAV. - The data is two halves per VGPR, as the proposal above says: - `v[n]` holds x in its low half and y in its high half; - `v[n+1]` holds z and w the same way. - The HLSL widens each half with `f16tof32`, and the typed UAV narrows it back. The fixtures use finite binary16 values (normal, subnormal and signed zero) so that round trip is exact; NaN payloads are not claimed. Same rules as #1611: unique per-thread destinations, and sentinels outside the written texels and in the other mips. One control swaps the two halves of a VGPR and must mismatch. Sparse `dmask` stays refused, per your earlier condition, and so do `d16` loads, `a16`, other formats, non-2D views and atomics. New branch from main. It touches the same gfx1013 image rules in `tools/compute_store_aot.py` as #1649, #2013 and #2056, so I'll rebase onto whichever lands first.
Jess-Doit commented 2026-11-25 01:02:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-25T00:27:29Z.


Next slice: gfx1013 same-descriptor image loads through the UAV, the "a load from the same descriptor goes through the UAV (typed UAV load)" item of the proposal. AI-assisted (Codex, driven with Claude Code), tested on Windows 10 22H2 with a GTX 1060 and WARP.

Slice: on a 2D R32G32B32A32_FLOAT UAV, a full-dmask image_load (mip zero) from the store's own descriptor becomes outputData[uint2(x, y)], a typed UAV load.

Bounds, to keep it within what one lane can prove:

  • each lane loads only the texel it later stores to, from the same coordinate VGPRs;
  • per-thread destinations are unique, so no lane reads a texel another lane writes;
  • a load after the lane's own store, or from any other texel, is refused;
  • the test skips with 77 where the adapter lacks typed UAV loads for this format (TypedUAVLoadAdditionalFormats).

Fixture: each lane reads its texel, changes it and writes it back. Sentinels outside the written texels and in other mips must stay unchanged. One control reads a neighbouring texel and must be refused; another drops the read and must mismatch.

Sparse masks, d16 loads, mips other than zero, arrays and 3D stay refused.

New branch from main. It touches the same gfx1013 image rules as #1649, #2056 and #2106, and I'll rebase onto whichever lands first.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7148529987 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1545#issuecomment-7148529987). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-25T00:27:29Z. --- Next slice: gfx1013 same-descriptor image loads through the UAV, the "a load from the same descriptor goes through the UAV (typed UAV load)" item of the proposal. AI-assisted (Codex, driven with Claude Code), tested on Windows 10 22H2 with a GTX 1060 and WARP. **Slice:** on a 2D `R32G32B32A32_FLOAT` UAV, a full-`dmask` `image_load` (mip zero) from the store's own descriptor becomes `outputData[uint2(x, y)]`, a typed UAV load. **Bounds, to keep it within what one lane can prove:** - each lane loads only the texel it later stores to, from the same coordinate VGPRs; - per-thread destinations are unique, so no lane reads a texel another lane writes; - a load after the lane's own store, or from any other texel, is refused; - the test skips with 77 where the adapter lacks typed UAV loads for this format (`TypedUAVLoadAdditionalFormats`). **Fixture:** each lane reads its texel, changes it and writes it back. Sentinels outside the written texels and in other mips must stay unchanged. One control reads a neighbouring texel and must be refused; another drops the read and must mismatch. Sparse masks, `d16` loads, mips other than zero, arrays and 3D stay refused. New branch from main. It touches the same gfx1013 image rules as #1649, #2056 and #2106, and I'll rebase onto whichever lands first.
R0Y00 commented 2026-11-25 01:02:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-25T00:56:43Z.


The full-mask 2D D16 store slice is on main via #2106 (84ce2942). I rebuilt the exact PR head and ran the Release fixture on WARP and RTX 4060 Laptop: 2/2, including the packed-half and untouched-mip controls. The typed-store coverage is for finite half inputs; the separate same-descriptor typed-load work can continue here.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7149049651 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1545#issuecomment-7149049651). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-25T00:56:43Z. --- The full-mask 2D D16 store slice is on main via #2106 (84ce2942). I rebuilt the exact PR head and ran the Release fixture on WARP and RTX 4060 Laptop: 2/2, including the packed-half and untouched-mip controls. The typed-store coverage is for finite half inputs; the separate same-descriptor typed-load work can continue here.
R0Y00 commented 2026-11-26 07:00:27 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T06:14:29Z.


The source-built gfx1030 replay in #2756 is on main (c458bba9). It adds fixed-address finite-normal buffer compare-swap and the 64-bit compare-swap and min/max forms. WARP and RTX 4060 Laptop both matched the readbacks and detected all four mutations. It uses constant operands and a raw UAV. The independent typed-UAV load and production binding work in this tracker remain open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7184231652 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1545#issuecomment-7184231652). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T06:14:29Z. --- The source-built gfx1030 replay in #2756 is on main (c458bba9). It adds fixed-address finite-normal buffer compare-swap and the 64-bit compare-swap and min/max forms. WARP and RTX 4060 Laptop both matched the readbacks and detected all four mutations. It uses constant operands and a raw UAV. The independent typed-UAV load and production binding work in this tracker remain open.
Leyukaka commented 2026-11-28 00:28:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T00:28:21Z.


Taking the next slice for direct C++ compute (target main): non-D16 image_store with a prefix dmask (0x1, 0x3 or 0x7) when the bound UAV format has exactly that many channels.

Why. In the 882 untranslated requests ranked in #3224, 48 of the 54 programs that stop first at "direct image opcode or descriptor modifiers" do so on a non-D16 prefix-mask image_store. The shapes are dmask:0x7 (2D, 3D and 2D array), 0x3 and 0x1 (2D), all with unorm.

Plan. This follows your note above: sparse masks stay refused unless the unwritten components and the cross-lane behaviour are proven.

  • Lower the store as an exact-width typed UAV store: float, float2 or float3 with every component written, as the D16 path already does for masks 1 and 3.
  • At dispatch, the runtime refuses the binding unless the texture format has exactly that many channels. Examples are R*, RG* and R11G11B10_FLOAT. That way there is no unwritten channel and no read-modify-write, so there is no race between invocations.
  • An RGBA texture bound to a 0x7 store keeps a named refusal.
  • Non-prefix masks (0x2, 0x9, 0xd) stay refused.
  • Tests: source-built hardware readbacks on 1-, 2- and 3-channel formats with sentinels around the written texels, plus negative controls for an RGBA format with 0x7, and for a non-prefix mask.

I do not know yet which formats the title binds to these stores, so the effect on the run is unknown until it is measured at run time.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7230938201 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1545#issuecomment-7230938201). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-28T00:28:21Z. --- Taking the next slice for direct C++ compute (target `main`): non-D16 `image_store` with a prefix `dmask` (`0x1`, `0x3` or `0x7`) when the bound UAV format has exactly that many channels. **Why.** In the 882 untranslated requests ranked in #3224, 48 of the 54 programs that stop first at "direct image opcode or descriptor modifiers" do so on a non-D16 prefix-mask `image_store`. The shapes are `dmask:0x7` (2D, 3D and 2D array), `0x3` and `0x1` (2D), all with `unorm`. **Plan.** This follows your note above: sparse masks stay refused unless the unwritten components and the cross-lane behaviour are proven. - Lower the store as an exact-width typed UAV store: `float`, `float2` or `float3` with every component written, as the D16 path already does for masks 1 and 3. - At dispatch, the runtime refuses the binding unless the texture format has exactly that many channels. Examples are `R*`, `RG*` and `R11G11B10_FLOAT`. That way there is no unwritten channel and no read-modify-write, so there is no race between invocations. - An RGBA texture bound to a `0x7` store keeps a named refusal. - Non-prefix masks (`0x2`, `0x9`, `0xd`) stay refused. - Tests: source-built hardware readbacks on 1-, 2- and 3-channel formats with sentinels around the written texels, plus negative controls for an RGBA format with `0x7`, and for a non-prefix mask. I do not know yet which formats the title binds to these stores, so the effect on the run is unknown until it is measured at run time. AI-assisted.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#1538
No description provided.