shader: lower typed R32_UINT 2D image atomics in direct Compute DXIL #3156

Closed
opened 2026-11-27 19:03:23 +00:00 by RonLogic · 0 comments
RonLogic commented 2026-11-27 19:03:23 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-27T19:03:23Z.


Refs #2935, #1545 and #3074. I’ll take the direct Compute slice for 32-bit image_atomic_add, image_atomic_umax and image_atomic_cmpswap on a bound 2D R32_UINT view. At 88cddb09, source-built containers stop with direct image opcode or descriptor modifiers at +0x28 for ADD/UMAX and at +0x30 for compare-and-swap. The earlier Python/AOT implementation is separate.

The lowering should keep EXEC masking, honor GLC as a return of the pre-operation word, and use only the supported 2D, 32-bit operand forms. Carry the typed binding through any runtime route that will publish it, with a refusal for an incompatible format.

Verify source-built shaders through DXIL validation and D3D12 readback. Include unsigned values around the sign boundary, compare success/failure, contended ADD, inactive lanes and unchanged texels. The AMD RDNA 2 ISA and DXIL AtomicBinOp/AtomicCompareExchange document the operation contracts.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6652882645 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3156). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-27T19:03:23Z. --- Refs #2935, #1545 and #3074. I’ll take the direct Compute slice for 32-bit `image_atomic_add`, `image_atomic_umax` and `image_atomic_cmpswap` on a bound 2D `R32_UINT` view. At `88cddb09`, source-built containers stop with `direct image opcode or descriptor modifiers` at `+0x28` for ADD/UMAX and at `+0x30` for compare-and-swap. The earlier Python/AOT implementation is separate. The lowering should keep EXEC masking, honor GLC as a return of the pre-operation word, and use only the supported 2D, 32-bit operand forms. Carry the typed binding through any runtime route that will publish it, with a refusal for an incompatible format. Verify source-built shaders through DXIL validation and D3D12 readback. Include unsigned values around the sign boundary, compare success/failure, contended ADD, inactive lanes and unchanged texels. The AMD RDNA 2 ISA and DXIL AtomicBinOp/AtomicCompareExchange document the operation contracts.
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#3156
No description provided.