direct compute: accept non-indexed buffer atomics through a byte-window raw UAV #3170

Closed
opened 2026-11-27 20:02:59 +00:00 by github-bot · 0 comments
Owner

@⁠Leyukaka on GitHub · 2026-11-27 19:58 UTC · original

Part of #2935 (instruction coverage). Target branch main. I am taking it.

Gap. Direct compute accepts a raw UAV descriptor rewritten into a byte window only for buffer_store_raw. That is the six-op stride, count and OOB rewrite tracked by byte_descriptor_field. A non-indexed buffer_atomic_* through the same rewritten descriptor is refused with "non-contiguous resource descriptor", although the atomic lowering already uses the same raw UAV.

Measured on a local capture of 2,689 compute requests (counts and instruction shape only), with compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests on main 6057071b:

  • 11 requests stop first there: 7 buffer_atomic_add, 3 buffer_atomic_umin, 1 buffer_atomic_cmpswap.
  • With the change, 8 of them compile: 403 to 411 in the capture, and 416 to 424 in the requests of one start-up run.

Plan:

  • Extend the byte-window check to non-indexed buffer atomics.
  • Indexed atomics keep their own path and stay refused.

Tests: a hardware readback of add (with and without GLC), unsigned min and compare-and-swap through the rewritten descriptor, plus controls for an indexed and a 64-bit atomic.

AI-assisted.

**@⁠Leyukaka** on GitHub · 2026-11-27 19:58 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3168) Part of #2935 (instruction coverage). Target branch `main`. I am taking it. **Gap.** Direct compute accepts a raw UAV descriptor rewritten into a byte window only for `buffer_store_raw`. That is the six-op stride, count and OOB rewrite tracked by `byte_descriptor_field`. A non-indexed `buffer_atomic_*` through the same rewritten descriptor is refused with "non-contiguous resource descriptor", although the atomic lowering already uses the same raw UAV. **Measured** on a local capture of 2,689 compute requests (counts and instruction shape only), with `compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests` on `main` `6057071b`: - 11 requests stop first there: 7 `buffer_atomic_add`, 3 `buffer_atomic_umin`, 1 `buffer_atomic_cmpswap`. - With the change, 8 of them compile: 403 to 411 in the capture, and 416 to 424 in the requests of one start-up run. **Plan:** - Extend the byte-window check to non-indexed buffer atomics. - Indexed atomics keep their own path and stay refused. **Tests:** a hardware readback of add (with and without GLC), unsigned min and compare-and-swap through the rewritten descriptor, plus controls for an indexed and a 64-bit atomic. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 20:02:59 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#3170
No description provided.