shader: support IMAGE_ATOMIC_SWAP #456

Manually merged
github merged 1 commit from gh-pr/456/head into gh-pr/456/base 2026-11-26 09:21:48 +00:00
Owner

@⁠brandostrong on GitHub · 2026-09-02 21:49 UTC · original
brandostrong:fix/image-atomic-swap → main · +44 −1 · 8 files · 1 commits · merged 2026-09-03 01:37 UTC

Problem. Astro Bot's first in-game compute shader contains raw=[0xf03c2108 0x00000900], MIMG opcode 0x0f. The decoder had every other 32-bit image atomic but not this one, so pipeline creation aborted the process with an unsupported-opcode error.

Change. Add the decoder entry (IMAGE_ATOMIC_SWAP, RDNA2 ISA MIMG opcode table), an ImageAtomicSwap32 IR op, and emit OpAtomicExchange on the same storage-uint image path the other atomics use. Rebased onto the current image-binding simplification.

Effect. Astro Bot's first scene compiles its compute shaders instead of exiting.

Verification. New compute case ImageAtomicSwapReturnsPreviousTexel; shader_cfg, resource_tracking and scalar_provenance suites pass.

References

  • AMD RDNA 2 Instruction Set Architecture Reference Guide, §15.16 "MIMG Instructions": opcode 0x0f IMAGE_ATOMIC_SWAP; §8.2.3 "Image Opcodes with No Sampler" for atomic return semantics.
  • Captured instruction words: 0xf03c2108 0x00000900.
**@⁠brandostrong** on GitHub · 2026-09-02 21:49 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/456) `brandostrong:fix/image-atomic-swap` → `main` · +44 −1 · 8 files · 1 commits · merged 2026-09-03 01:37 UTC **Problem.** Astro Bot's first in-game compute shader contains `raw=[0xf03c2108 0x00000900]`, MIMG opcode 0x0f. The decoder had every other 32-bit image atomic but not this one, so pipeline creation aborted the process with an unsupported-opcode error. **Change.** Add the decoder entry (`IMAGE_ATOMIC_SWAP`, RDNA2 ISA MIMG opcode table), an `ImageAtomicSwap32` IR op, and emit `OpAtomicExchange` on the same storage-uint image path the other atomics use. Rebased onto the current image-binding simplification. **Effect.** Astro Bot's first scene compiles its compute shaders instead of exiting. **Verification.** New compute case `ImageAtomicSwapReturnsPreviousTexel`; shader_cfg, resource_tracking and scalar_provenance suites pass. **References** - AMD RDNA 2 Instruction Set Architecture Reference Guide, §15.16 "MIMG Instructions": opcode 0x0f `IMAGE_ATOMIC_SWAP`; §8.2.3 "Image Opcodes with No Sampler" for atomic return semantics. - Captured instruction words: `0xf03c2108 0x00000900`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:21:46 +00:00
github manually merged commit 26ba2d2ae3 into gh-pr/456/base 2026-11-26 09:21:48 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.