buffer_atomic_sub is refused (no DXIL atomic subtraction; 3 compute shaders) #366

Closed
opened 2026-11-27 14:16:40 +00:00 by github-bot · 3 comments
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-27 14:12 UTC · original

A small shape from #4: buffer_atomic_sub is refused by name ("GFX10 code at …: buffer_atomic_sub is not supported"). There are 3 unique compute shaders in a 12,020-shader corpus (Series S, boot to the menus, main 905e7aa): 49b8b58b93edb335, b1454a15c3e09497 and dfc4a2c9e8be67ba.

DXIL's AtomicBinOp has no subtraction. Plan: lower it as an add of 0 - data. Modulo 2^32 that leaves the same dword and returns the same old value. The PR will include a GPU test and a by-output corpus sweep.

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-27 14:12 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/363) A small shape from #4: `buffer_atomic_sub` is refused by name ("GFX10 code at …: buffer_atomic_sub is not supported"). There are 3 unique compute shaders in a 12,020-shader corpus (Series S, boot to the menus, main `905e7aa`): `49b8b58b93edb335`, `b1454a15c3e09497` and `dfc4a2c9e8be67ba`. DXIL's `AtomicBinOp` has no subtraction. Plan: lower it as an add of `0 - data`. Modulo 2^32 that leaves the same dword and returns the same old value. The PR will include a GPU test and a by-output corpus sweep.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 14:16:40 +00:00
Author
Owner

@⁠tiagonogueiraa-bit on GitHub · 2026-11-27 14:12 UTC · original

/claim

**@⁠tiagonogueiraa-bit** on GitHub · 2026-11-27 14:12 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/363#issuecomment-7220494360) /claim
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-27 14:12 UTC · original

Claimed by @⁠tiagonogueiraa-bit. Open a draft pull request with Refs #363 in its description within 24 hours, or the claim expires.

**@⁠github-actions[bot]** on GitHub · 2026-11-27 14:12 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/363#issuecomment-7220498185) Claimed by @⁠tiagonogueiraa-bit. Open a draft pull request with `Refs #363` in its description within 24 hours, or the claim expires.
github-bot referenced this issue from a commit 2026-11-27 16:13:14 +00:00
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-28 00:35 UTC · original

Thank you. buffer_atomic_sub now lowers as an add of the negated data, in #367 on main. The sweep showed 3 compute shaders gained, no regressions, with a GPU test. I have not tested it in the game. Closing. Please reopen if one of the 3 hashes is still refused on a6a58361.

**@⁠LakshanSivakumar** on GitHub · 2026-11-28 00:35 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/363#issuecomment-7231034310) Thank you. buffer_atomic_sub now lowers as an add of the negated data, in #367 on main. The sweep showed 3 compute shaders gained, no regressions, with a GPU test. I have not tested it in the game. Closing. Please reopen if one of the 3 hashes is still refused on a6a58361.
This discussion has been locked. Commenting is limited to contributors.
No description provided.