fix(shader): act on the containing dword for unaligned 32-bit buffer atomics #6094

Merged
n-delic merged 2 commits from upstream-pr/6094 into main 2026-10-18 16:42:03 +00:00
n-delic commented 2026-10-14 21:44:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by n-delic on 2026-10-14T21:44:36Z.


What

A 32-bit buffer atomic whose address is not a multiple of 4 now acts on the dword that holds the address. On main it records an unaligned BDA fault and is dropped. 64-bit buffer atomics are unchanged: off an 8-byte boundary they still fault.

Source: section 8.1.7 ("Alignment") of the RDNA2 ISA:

For Dword or larger reads or writes of non-formatted ops (such as BUFFER_LOAD_DWORD), the two LSBs of the byte-address are ignored, thus forcing Dword alignment.

That is mode DWORD of SH_MEM_CONFIG.alignment_mode. The console's mode is unknown (as the existing "V# bases off a DWORD boundary" entry already notes).

  • MXGP 26 (PPSA30839, Unreal Engine 5) sets bits with buffer_atomic_or (MUBUF 0x3a) at odd byte offsets in a compute shader. In the strict modes, section 3.11 reports a misaligned atomic as a memory violation, so the console is not in one of those.
  • What an atomic does in mode UNALIGNED is not documented. This is the part a hardware-oracle measurement could settle, if someone can run one.
  • For 64-bit atomics, mode DWORD aligns only to 4 bytes ("the smaller of element size or a dword"), which a host 64-bit atomic cannot address, so they keep the fault.

All of this is recorded in docs/dev/debt/shader.md.

Tested

Linux (Pop!_OS, kernel 7.1.5), GCC, Release.

  • New agc_driver_buffer_atomic_unaligned: 32 lanes each run buffer_atomic_add (glc) of 1 at byte offset lane * 4 + k, for k = 0 to 3. The test checks that:

    • each lane gets its dword's previous value;
    • each dword is incremented once;
    • the dword after the last lane is untouched.

    On main it fails at k = 1 (lane 0 returned 3735928559, expected 0).

  • agc_shader_memory: the specialized 32-bit buffer_atomic_inc no longer emits a record_bda_fault call.

  • agc_driver_buffer_atomics, _float, _inc_dec64, _or_swap64: pass.

  • ctest -R 'agc|shader': 563 of 563 pass. agc_driver_preparation_scope_settle failed once and passed on reruns; it also failed intermittently on the rebased #5176 branch, which does not touch it.

  • MXGP 26: with this change (on a branch with other local fixes), the title runs with 0 BDA faults, where it reported reason=7 (unaligned) faults before.

  • tools/check_conventions.py --base upstream/main passes.

Not tested: AMD hardware, the hardware oracle, Windows.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: PPSA30839 (MXGP 26), no bring-up discussion yet
  • GPUs tested: NVIDIA RTX 3060, driver 595.104.02, Linux
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4864970596 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6094). Originally posted by [n-delic](https://github.com/n-delic) on 2026-10-14T21:44:36Z. --- ### What A 32-bit buffer atomic whose address is not a multiple of 4 now acts on the dword that holds the address. On `main` it records an unaligned BDA fault and is dropped. 64-bit buffer atomics are unchanged: off an 8-byte boundary they still fault. Source: section 8.1.7 ("Alignment") of the [RDNA2 ISA](https://gpuopen.com/download/rdna2-shader-instruction-set-architecture.pdf): > For Dword or larger reads or writes of non-formatted ops (such as BUFFER_LOAD_DWORD), the two LSBs of the byte-address are ignored, thus forcing Dword alignment. That is mode DWORD of `SH_MEM_CONFIG.alignment_mode`. The console's mode is unknown (as the existing "V# bases off a DWORD boundary" entry already notes). - MXGP 26 (PPSA30839, Unreal Engine 5) sets bits with `buffer_atomic_or` (MUBUF 0x3a) at odd byte offsets in a compute shader. In the strict modes, section 3.11 reports a misaligned atomic as a memory violation, so the console is not in one of those. - What an atomic does in mode UNALIGNED is not documented. This is the part a hardware-oracle measurement could settle, if someone can run one. - For 64-bit atomics, mode DWORD aligns only to 4 bytes ("the smaller of element size or a dword"), which a host 64-bit atomic cannot address, so they keep the fault. All of this is recorded in `docs/dev/debt/shader.md`. ### Tested Linux (Pop!_OS, kernel 7.1.5), GCC, Release. - **New `agc_driver_buffer_atomic_unaligned`:** 32 lanes each run `buffer_atomic_add` (glc) of 1 at byte offset `lane * 4 + k`, for k = 0 to 3. The test checks that: - each lane gets its dword's previous value; - each dword is incremented once; - the dword after the last lane is untouched. On `main` it fails at k = 1 (`lane 0 returned 3735928559, expected 0`). - **`agc_shader_memory`:** the specialized 32-bit `buffer_atomic_inc` no longer emits a `record_bda_fault` call. - **`agc_driver_buffer_atomics`, `_float`, `_inc_dec64`, `_or_swap64`:** pass. - **`ctest -R 'agc|shader'`:** 563 of 563 pass. `agc_driver_preparation_scope_settle` failed once and passed on reruns; it also failed intermittently on the rebased #5176 branch, which does not touch it. - **MXGP 26:** with this change (on a branch with other local fixes), the title runs with 0 BDA faults, where it reported `reason=7` (unaligned) faults before. - `tools/check_conventions.py --base upstream/main` passes. Not tested: AMD hardware, the hardware oracle, Windows. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: PPSA30839 (MXGP 26), no bring-up discussion yet - [x] GPUs tested: NVIDIA RTX 3060, driver 595.104.02, Linux - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fma-rc commented 2026-10-15 00:12:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-15T00:12:09Z.


I ran the unaligned case on real RDNA2 with tools/hw-oracle: gfx1036 (Ryzen 7 7800X3D iGPU), Linux 7.2 KFD, wave32, raw buffer V# (word3 0x31016fac), ieee 0, dx10_clamp 1, denorm32 0, denorm16 3, round 0, coarse memory. KFD programs SH_MEM_CONFIG.alignment_mode as UNALIGNED for gfx10 (kfd_device_queue_manager_v10.c).

buffer_atomic_or / buffer_atomic_add (with and without glc) at byte offsets 1, 2 and 3 abort the dispatch: the queue dies and the oracle exits with no result. Offsets 0, 4 and 8 act on that dword (or 0xff at 4 turns 0x55667788 into 0x556677ff, returns the old dword). As a control on the same queue, buffer_load_dword at offsets 1/2/3/5 reads byte-shifted (0x88112233, 0x77881122, 0x66778811, 0xcc556677), so the queue really is in UNALIGNED mode.

So on gfx1036 a misaligned atomic faults in UNALIGNED mode too, not only in the strict modes. If gfx1013 behaves the same, DWORD mode is the only one where MXGP's atomics would run, which is what this PR models. With this PR on main ab9a47684, agc_shader_memory and agc_driver_buffer_atomic_unaligned pass on NVIDIA RTX 5080, RADV and lavapipe.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6181324000 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6094#issuecomment-6181324000). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-15T00:12:09Z. --- I ran the unaligned case on real RDNA2 with `tools/hw-oracle`: gfx1036 (Ryzen 7 7800X3D iGPU), Linux 7.2 KFD, wave32, raw buffer V# (word3 `0x31016fac`), ieee 0, dx10_clamp 1, denorm32 0, denorm16 3, round 0, coarse memory. KFD programs `SH_MEM_CONFIG.alignment_mode` as UNALIGNED for gfx10 (`kfd_device_queue_manager_v10.c`). `buffer_atomic_or` / `buffer_atomic_add` (with and without `glc`) at byte offsets 1, 2 and 3 abort the dispatch: the queue dies and the oracle exits with no result. Offsets 0, 4 and 8 act on that dword (`or 0xff` at 4 turns `0x55667788` into `0x556677ff`, returns the old dword). As a control on the same queue, `buffer_load_dword` at offsets 1/2/3/5 reads byte-shifted (`0x88112233`, `0x77881122`, `0x66778811`, `0xcc556677`), so the queue really is in UNALIGNED mode. So on gfx1036 a misaligned atomic faults in UNALIGNED mode too, not only in the strict modes. If gfx1013 behaves the same, DWORD mode is the only one where MXGP's atomics would run, which is what this PR models. With this PR on `main` ab9a47684, `agc_shader_memory` and `agc_driver_buffer_atomic_unaligned` pass on NVIDIA RTX 5080, RADV and lavapipe.
milescoviello commented 2026-10-15 06:57:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-15T06:57:48Z.


MXGP 26 (PPSA30839), the title in the description, on Linux: Ubuntu 24.04, GCC 13.3, Release, RTX 4070 Ti (NVIDIA 595.99), main d92a8dad3 with #6160 merged (it needs that to get past its s_swappc_b64 stop at 135 s), relinked with --to-intel, 180 s runs with pad input.

  • Without this PR: BDA access failed: ... instruction=0xa08 bytes=4 stage=4 reason=7 36 and 70 times in two runs.
  • With this head 6c188638a added (clean merge): 2 of 2 runs reach the 180 s limit with none of those lines. A run with screenshots reaches the title screen and the "Welcome to MXGP26" account prompt.

Not checked on Windows, and nothing here says what the console does with the misaligned atomic.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6186387933 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6094#issuecomment-6186387933). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-15T06:57:48Z. --- MXGP 26 (PPSA30839), the title in the description, on Linux: Ubuntu 24.04, GCC 13.3, Release, RTX 4070 Ti (NVIDIA 595.99), `main` d92a8dad3 with #6160 merged (it needs that to get past its `s_swappc_b64` stop at 135 s), relinked with `--to-intel`, 180 s runs with pad input. - Without this PR: `BDA access failed: ... instruction=0xa08 bytes=4 stage=4 reason=7` 36 and 70 times in two runs. - With this head `6c188638a` added (clean merge): 2 of 2 runs reach the 180 s limit with none of those lines. A run with screenshots reaches the title screen and the "Welcome to MXGP26" account prompt. Not checked on Windows, and nothing here says what the console does with the misaligned atomic. AI-assisted: yes
zaryabzip commented 2026-10-15 09:19:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by zaryabzip on 2026-10-15T09:19:19Z.


Windows run, for the "Not tested: ... Windows" line. Windows 11 (26200), RTX 3060 Laptop GPU (NVIDIA 617.42), WinLibs GCC 15.2.0 r7 (UCRT), Release, BUILD_TESTING=ON. Head 6c188638a merged onto main c0be1f69b (clean); ANYPS5_GPU=3060, and the test log shows the RTX 3060 selected.

  • agc_driver_buffer_atomic_unaligned, agc_shader_memory, agc_driver_buffer_atomics, _float, _inc_dec64, _or_swap64: pass.
  • With SpirvRuntimeBuffer.cpp from main and the PR's tests (2 of 2 runs):
    • agc_driver_buffer_atomic_unaligned fails: buffer_atomic_add at byte offset 1: lane 0 returned 3735928559, expected 0.
    • agc_shader_memory fails: specialized buffer atomic: a 32-bit atomic records an unaligned fault instead of acting on its dword.
  • ctest -R "agc|shader|guest_playgo" -j4: 580/580 pass with the PR. main: 578/579. Both skip the same 3 tests (agc_host_import_sparse, agc_driver_sparse_dma_buf_import, agc_driver_stencil_ref_export).
  • The one main failure was agc_driver_resource_cache_storage_admission (numerical exception, once under -j4). It passed 2 of 2 when run alone.

Not run: MXGP 26, the hardware oracle.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6188747818 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6094#issuecomment-6188747818). Originally posted by [zaryabzip](https://github.com/zaryabzip) on 2026-10-15T09:19:19Z. --- Windows run, for the "Not tested: ... Windows" line. Windows 11 (26200), RTX 3060 Laptop GPU (NVIDIA 617.42), WinLibs GCC 15.2.0 r7 (UCRT), Release, `BUILD_TESTING=ON`. Head `6c188638a` merged onto `main` `c0be1f69b` (clean); `ANYPS5_GPU=3060`, and the test log shows the RTX 3060 selected. - `agc_driver_buffer_atomic_unaligned`, `agc_shader_memory`, `agc_driver_buffer_atomics`, `_float`, `_inc_dec64`, `_or_swap64`: pass. - With `SpirvRuntimeBuffer.cpp` from `main` and the PR's tests (2 of 2 runs): - `agc_driver_buffer_atomic_unaligned` fails: `buffer_atomic_add at byte offset 1: lane 0 returned 3735928559, expected 0`. - `agc_shader_memory` fails: `specialized buffer atomic: a 32-bit atomic records an unaligned fault instead of acting on its dword`. - `ctest -R "agc|shader|guest_playgo" -j4`: 580/580 pass with the PR. `main`: 578/579. Both skip the same 3 tests (`agc_host_import_sparse`, `agc_driver_sparse_dma_buf_import`, `agc_driver_stencil_ref_export`). - The one `main` failure was `agc_driver_resource_cache_storage_admission` (numerical exception, once under `-j4`). It passed 2 of 2 when run alone. Not run: MXGP 26, the hardware oracle. AI-assisted: yes (Claude Code)
github-actions[bot] commented 2026-10-15 12:14:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:14:39Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1341 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 5021 docs/dev/debt/shader.md
PR 5371 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 5426 docs/dev/debt/shader.md
PR 5500 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 5941 docs/dev/debt/shader.md
PR 5958 docs/dev/debt/shader.md
PR 6009 docs/dev/debt/shader.md
PR 6177 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp
PR 6222 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 6232 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 6412 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp
docs/dev/debt/shader.md
PR 6488 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
docs/dev/debt/shader.md
PR 6503 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6645 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6767 docs/dev/debt/shader.md
PR 6977 core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp
docs/dev/debt/shader.md
PR 7223 docs/dev/debt/shader.md
PR 7426 docs/dev/debt/shader.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6191794657 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6094#issuecomment-6191794657). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T12:14:39Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 1341](https://www.github.com/boykopovar/AnyPS5/pull/1341) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `docs/dev/debt/shader.md` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` | | [PR 5426](https://www.github.com/boykopovar/AnyPS5/pull/5426) | `docs/dev/debt/shader.md` | | [PR 5500](https://www.github.com/boykopovar/AnyPS5/pull/5500) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` | | [PR 5941](https://www.github.com/boykopovar/AnyPS5/pull/5941) | `docs/dev/debt/shader.md` | | [PR 5958](https://www.github.com/boykopovar/AnyPS5/pull/5958) | `docs/dev/debt/shader.md` | | [PR 6009](https://www.github.com/boykopovar/AnyPS5/pull/6009) | `docs/dev/debt/shader.md` | | [PR 6177](https://www.github.com/boykopovar/AnyPS5/pull/6177) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp` | | [PR 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` | | [PR 6232](https://www.github.com/boykopovar/AnyPS5/pull/6232) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp`<br>`docs/dev/debt/shader.md` | | [PR 6488](https://www.github.com/boykopovar/AnyPS5/pull/6488) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`docs/dev/debt/shader.md` | | [PR 6503](https://www.github.com/boykopovar/AnyPS5/pull/6503) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6645](https://www.github.com/boykopovar/AnyPS5/pull/6645) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6767](https://www.github.com/boykopovar/AnyPS5/pull/6767) | `docs/dev/debt/shader.md` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/shader/recompiler/SpirvBackend/src/SpirvRuntimeBuffer.cpp`<br>`docs/dev/debt/shader.md` | | [PR 7223](https://www.github.com/boykopovar/AnyPS5/pull/7223) | `docs/dev/debt/shader.md` | | [PR 7426](https://www.github.com/boykopovar/AnyPS5/pull/7426) | `docs/dev/debt/shader.md` |
erm14254 commented 2026-10-15 13:11:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by erm14254 on 2026-10-15T13:11:53Z.


Code Violet (PPSA26528, Unreal Engine 5.5) on Windows: Windows 11 (10.0.22631), RTX PRO 6000 Blackwell Workstation Edition (NVIDIA 597.16), WinLibs GCC 15.2.0 r7, Release. main d92a8dad3 with #6258 and the three other fixes listed in #6256 (the title needs them to reach its title screen), then this PR's head 6c188638a cherry-picked on top (clean).

  • Without this PR: deferred write-back failed: BDA access failed: ... instruction=0x7bc bytes=4 stage=4 reason=7, once per present at the title screen (a compute shader).
  • With it: no such line in a cold run and a warm run to the title screen. agc_driver_buffer_atomic_unaligned, agc_shader_memory and agc_driver_gds_append_consume pass on that build.
  • The picture is unchanged, so the dropped atomic is not behind the title's missing geometry (tracked in #6256).

Nothing here says what the console does with the misaligned atomic either.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6192888164 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6094#issuecomment-6192888164). Originally posted by [erm14254](https://github.com/erm14254) on 2026-10-15T13:11:53Z. --- Code Violet (PPSA26528, Unreal Engine 5.5) on Windows: Windows 11 (10.0.22631), RTX PRO 6000 Blackwell Workstation Edition (NVIDIA 597.16), WinLibs GCC 15.2.0 r7, Release. `main` d92a8dad3 with #6258 and the three other fixes listed in #6256 (the title needs them to reach its title screen), then this PR's head 6c188638a cherry-picked on top (clean). - Without this PR: `deferred write-back failed: BDA access failed: ... instruction=0x7bc bytes=4 stage=4 reason=7`, once per present at the title screen (a compute shader). - With it: no such line in a cold run and a warm run to the title screen. `agc_driver_buffer_atomic_unaligned`, `agc_shader_memory` and `agc_driver_gds_append_consume` pass on that build. - The picture is unchanged, so the dropped atomic is not behind the title's missing geometry (tracked in #6256). Nothing here says what the console does with the misaligned atomic either. AI-assisted: yes
adriadam10 commented 2026-10-17 00:01:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-17T00:01:01Z.


Checked the change against the RDNA2 ISA §8.1.7 (DWORD alignment mode), built and ran agc_shader_memory, agc_driver_buffer_atomic_unaligned and the agc_driver_buffer_atomics* tests on RADV, and confirmed the two new tests fail without the SpirvRuntimeBuffer.cpp change. Windows, NVIDIA and title runs from fma-rc, zaryabzip, milescoviello and erm14254 agree; merging.

Minor, not blocking: the docs/dev/debt/shader.md line says the UNALIGNED-mode behaviour is not measured, but fma-rc measured above that misaligned atomics abort the dispatch there. Worth updating in a follow-up.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6227003851 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6094#issuecomment-6227003851). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-17T00:01:01Z. --- Checked the change against the RDNA2 ISA §8.1.7 (DWORD alignment mode), built and ran `agc_shader_memory`, `agc_driver_buffer_atomic_unaligned` and the `agc_driver_buffer_atomics*` tests on RADV, and confirmed the two new tests fail without the `SpirvRuntimeBuffer.cpp` change. Windows, NVIDIA and title runs from fma-rc, zaryabzip, milescoviello and erm14254 agree; merging. Minor, not blocking: the `docs/dev/debt/shader.md` line says the UNALIGNED-mode behaviour is not measured, but fma-rc measured above that misaligned atomics abort the dispatch there. Worth updating in a follow-up.
keravyn-ops commented 2026-10-17 08:33:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by keravyn-ops on 2026-10-17T08:33:21Z.


AMD / Windows run of this PR at 6c188638a: Radeon 780M (RDNA 3, 0x15bf), AMD driver 25.10.20.01 (32.0.21020.1007), Windows 11 Home 10.0.26100, WinLibs GCC 15.2.0 r7, Release.

  • agc_driver_buffer_atomic_unaligned: pass (buffer atomic unaligned tests passed, 0.69 s)
  • agc_shader_memory: pass (0.50 s)

AI-assisted: yes (runs made on the device above).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231789278 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6094#issuecomment-6231789278). Originally posted by [keravyn-ops](https://github.com/keravyn-ops) on 2026-10-17T08:33:21Z. --- AMD / Windows run of this PR at 6c188638a: Radeon 780M (RDNA 3, 0x15bf), AMD driver 25.10.20.01 (32.0.21020.1007), Windows 11 Home 10.0.26100, WinLibs GCC 15.2.0 r7, Release. - `agc_driver_buffer_atomic_unaligned`: pass (`buffer atomic unaligned tests passed`, 0.69 s) - `agc_shader_memory`: pass (0.50 s) AI-assisted: yes (runs made on the device above).
Sign in to join this conversation.
No reviewers
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
boykopovar/AnyPS5!6094
No description provided.