fix(shader): LDS 32-bit atomics take the workgroup lock of the program's 64-bit LDS atomics #2675

Merged
husseinkad merged 6 commits from upstream-pr/2675 into main 2026-10-10 23:15:44 +00:00
husseinkad commented 2026-10-10 10:41:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by husseinkad on 2026-10-10T10:41:36Z.


What

LDS has no native 64-bit atomics, so ds_*_u64 read-modify-writes the two dwords under a workgroup lock. That lock only ordered 64-bit atomics against each other: a 32-bit LDS atomic on one of the same dwords could land between the two halves of a 64-bit update and be lost. #2297 measured the hardware (gfx1036): 128 lanes of ds_add_u32 plus 128 lanes of ds_add_u64 on one slot sum exactly, so the two widths are serialised.

In a program that contains a 64-bit LDS atomic (requirements.ldsLock), every 32-bit LDS atomic now goes through the same lock (EmitLdsAtomic32; LockedLdsUpdate takes the result type and zero value). A program without a 64-bit LDS atomic emits the same SPIR-V as before.

Tests:

  • agc_spirv_lds_atomic_lock (new, no GPU needed, 0.3 s): recompiles compute programs and counts the lock opcodes. ds_add_u64 alone has one lock; with a ds_add_u32 (or ds_inc_u32) there are two, and the native 32-bit OpAtomicIAdd sits between a lock acquire and release; a program with only 32-bit LDS atomics has no lock. Deterministic, so it also guards CI's lavapipe, where the race itself cannot occur.
  • agc_driver_lds_mixed_width_atomics (new execution test): 256 threads x 16 iterations of ds_add_u64 + ds_add_u32 on one slot must sum exactly, plus a divergent case (64-bit add under exec 0x55555555, 32-bit add under 0xaaaaaaaa) that checks the lock loop terminates with inactive lanes.

Fixes #2297

Tested

Windows 11, WinLibs GCC 15.2.0 r7, Release, NVIDIA RTX 4050 (Vulkan):

  • ctest -R "lds_|ds_|lds": 24 of 24 pass (72 s total, each test a few seconds).
  • With only the source change reverted: agc_spirv_lds_atomic_lock fails ("elect 1, lock acquire 1, lock release 1, expected 2 each") and the execution test fails on this GPU (3 of 3 runs for the first version of the test; lane 0 read 0x00001d9ffffff000, expected 0x00001ffffffff000).
  • tools/check_conventions.py --base origin/main and tools/pr_overlap.py --branch pass; tools/check_test_registration.py reports no unregistered executable.
  • Not run: Linux, RADV, Intel. Only ds_add_u32 against ds_add_u64 was measured on hardware; the other 32-bit LDS atomics taking the lock is extrapolated and recorded in TechnicalDebt together with the unmeasured throughput cost, the non-atomic halves of ds_condxchg32_rtn_b64, and the plain LDS reads and writes that stay outside the lock.

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 in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4810591488 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2675). Originally posted by [husseinkad](https://github.com/husseinkad) on 2026-10-10T10:41:36Z. --- ### What LDS has no native 64-bit atomics, so `ds_*_u64` read-modify-writes the two dwords under a workgroup lock. That lock only ordered 64-bit atomics against each other: a 32-bit LDS atomic on one of the same dwords could land between the two halves of a 64-bit update and be lost. #2297 measured the hardware (gfx1036): 128 lanes of `ds_add_u32` plus 128 lanes of `ds_add_u64` on one slot sum exactly, so the two widths are serialised. In a program that contains a 64-bit LDS atomic (`requirements.ldsLock`), every 32-bit LDS atomic now goes through the same lock (`EmitLdsAtomic32`; `LockedLdsUpdate` takes the result type and zero value). A program without a 64-bit LDS atomic emits the same SPIR-V as before. Tests: - `agc_spirv_lds_atomic_lock` (new, no GPU needed, 0.3 s): recompiles compute programs and counts the lock opcodes. `ds_add_u64` alone has one lock; with a `ds_add_u32` (or `ds_inc_u32`) there are two, and the native 32-bit `OpAtomicIAdd` sits between a lock acquire and release; a program with only 32-bit LDS atomics has no lock. Deterministic, so it also guards CI's lavapipe, where the race itself cannot occur. - `agc_driver_lds_mixed_width_atomics` (new execution test): 256 threads x 16 iterations of `ds_add_u64` + `ds_add_u32` on one slot must sum exactly, plus a divergent case (64-bit add under exec `0x55555555`, 32-bit add under `0xaaaaaaaa`) that checks the lock loop terminates with inactive lanes. Fixes #2297 ### Tested Windows 11, WinLibs GCC 15.2.0 r7, Release, NVIDIA RTX 4050 (Vulkan): - `ctest -R "lds_|ds_|lds"`: 24 of 24 pass (72 s total, each test a few seconds). - With only the source change reverted: `agc_spirv_lds_atomic_lock` fails ("elect 1, lock acquire 1, lock release 1, expected 2 each") and the execution test fails on this GPU (3 of 3 runs for the first version of the test; lane 0 read `0x00001d9ffffff000`, expected `0x00001ffffffff000`). - `tools/check_conventions.py --base origin/main` and `tools/pr_overlap.py --branch` pass; `tools/check_test_registration.py` reports no unregistered executable. - Not run: Linux, RADV, Intel. Only `ds_add_u32` against `ds_add_u64` was measured on hardware; the other 32-bit LDS atomics taking the lock is extrapolated and recorded in TechnicalDebt together with the unmeasured throughput cost, the non-atomic halves of `ds_condxchg32_rtn_b64`, and the plain LDS reads and writes that stay outside the lock. ### Checklist - [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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-10 10:41:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T10:41:55Z.


Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096665661 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2675#issuecomment-6096665661). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T10:41:55Z. --- Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
husseinkad commented 2026-10-10 19:48:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by husseinkad on 2026-10-10T19:48:31Z.


Thank you @oneandonlydean for reopening this. The description above predates the last two commits, so here is where the branch stands (head 7775d6c7, four commits on main):

  • Fix, unchanged since the first commit: in a compute shader that has a 64-bit LDS atomic, every 32-bit LDS atomic takes the same workgroup lock; programs without one emit the same SPIR-V as before.
  • Hardware confirmation from the issue reporter (#2297, @SleglJan, Linux, ANYPS5_ENABLE_SPIRV_TOOLS=ON): with the change, the issue's kernel loses 0 of 128 increments in 20 of 20 runs on RADV (Ryzen 7950X3D iGPU, wave32 and wave64) and on an RTX 3080; on main it lost 16 to 96 in every run.
  • Test kernel fix (2e0fd5db): the first version of the execution test used a loop that failed SPIR-V validation with ANYPS5_ENABLE_SPIRV_TOOLS=ON (the CI Linux setting), because SPIRV-Tools' BlockMergePass turns a valid module with a nested loop into an invalid one. That is independent of this change; the kernel is unrolled now and passes with validation on.
  • Extra case (7775d6c7): a single-pass kernel in the issue's shape (even lanes ds_add_u64, odd lanes ds_add_u32 at +4).
  • Known limit of the tests: with the lock change reverted, the execution test fails on NVIDIA (20 of 20 runs) but still passes on RADV, because the race only shows there when operands arrive through per-lane buffer loads, which @SleglJan measured (details on #2297). The deterministic structural test agc_spirv_lds_atomic_lock fails on every host when the change is reverted, so CI's lavapipe covers it. A per-lane-load variant of the execution case is the open follow-up.
  • Windows 11, RTX 4050: ctest -R "lds_|ds_|agc_spirv_lds" passes 23 of 23 in the default build and lds_mixed|agc_spirv_lds passes with SPIRV-Tools on.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6101515745 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2675#issuecomment-6101515745). Originally posted by [husseinkad](https://github.com/husseinkad) on 2026-10-10T19:48:31Z. --- Thank you @oneandonlydean for reopening this. The description above predates the last two commits, so here is where the branch stands (head `7775d6c7`, four commits on `main`): - **Fix, unchanged since the first commit:** in a compute shader that has a 64-bit LDS atomic, every 32-bit LDS atomic takes the same workgroup lock; programs without one emit the same SPIR-V as before. - **Hardware confirmation from the issue reporter** (#2297, @SleglJan, Linux, `ANYPS5_ENABLE_SPIRV_TOOLS=ON`): with the change, the issue's kernel loses 0 of 128 increments in 20 of 20 runs on RADV (Ryzen 7950X3D iGPU, wave32 and wave64) and on an RTX 3080; on `main` it lost 16 to 96 in every run. - **Test kernel fix (`2e0fd5db`):** the first version of the execution test used a loop that failed SPIR-V validation with `ANYPS5_ENABLE_SPIRV_TOOLS=ON` (the CI Linux setting), because SPIRV-Tools' `BlockMergePass` turns a valid module with a nested loop into an invalid one. That is independent of this change; the kernel is unrolled now and passes with validation on. - **Extra case (`7775d6c7`):** a single-pass kernel in the issue's shape (even lanes `ds_add_u64`, odd lanes `ds_add_u32` at +4). - **Known limit of the tests:** with the lock change reverted, the execution test fails on NVIDIA (20 of 20 runs) but still passes on RADV, because the race only shows there when operands arrive through per-lane buffer loads, which @SleglJan measured (details on #2297). The deterministic structural test `agc_spirv_lds_atomic_lock` fails on every host when the change is reverted, so CI's lavapipe covers it. A per-lane-load variant of the execution case is the open follow-up. - Windows 11, RTX 4050: `ctest -R "lds_|ds_|agc_spirv_lds"` passes 23 of 23 in the default build and `lds_mixed|agc_spirv_lds` passes with SPIRV-Tools on. AI-assisted: yes.
SleglJan commented 2026-10-10 20:05:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-10T20:05:46Z.


@husseinkad The per-lane-load variant of the execution case is in husseinkad/AnyPS5#1 (ab238a4b, on 7775d6c7), from my #2297 measurements, if you want to take it into this branch.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6101661830 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2675#issuecomment-6101661830). Originally posted by [SleglJan](https://github.com/SleglJan) on 2026-10-10T20:05:46Z. --- @husseinkad The per-lane-load variant of the execution case is in husseinkad/AnyPS5#1 (ab238a4b, on 7775d6c7), from my #2297 measurements, if you want to take it into this branch. AI-assisted: yes (Claude Code)
husseinkad commented 2026-10-10 20:09:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by husseinkad on 2026-10-10T20:09:29Z.


Thank you @SleglJan: I read the diff, ran it here (RTX 4050, Windows: lds_mixed|agc_spirv_lds pass with SPIRV-Tools on) and merged your per-lane-operand case into the branch with its authorship intact; the head is now 2f71d997 (five commits). With your measurements the execution test now fails on a revert on both RADV and the RTX 3080, so the earlier note about RADV no longer applies; the deterministic structural test remains the check that works on every host, including lavapipe in CI.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6101694127 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2675#issuecomment-6101694127). Originally posted by [husseinkad](https://github.com/husseinkad) on 2026-10-10T20:09:29Z. --- Thank you @SleglJan: I read the diff, ran it here (RTX 4050, Windows: `lds_mixed|agc_spirv_lds` pass with SPIRV-Tools on) and merged your per-lane-operand case into the branch with its authorship intact; the head is now `2f71d997` (five commits). With your measurements the execution test now fails on a revert on both RADV and the RTX 3080, so the earlier note about RADV no longer applies; the deterministic structural test remains the check that works on every host, including lavapipe in CI. AI-assisted: yes.
github-actions[bot] commented 2026-10-10 21:26:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T21:26:32Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#3015 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp L1232-1233
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6102349018 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2675#issuecomment-6102349018). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T21:26:32Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #3015 | `core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp` [L1232-1233](https://github.com/boykopovar/AnyPS5/blob/a75c0c57591e8088c873e82e835c5f0022e2090f/core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp#L1232-L1233) | | |
adriadam10 commented 2026-10-10 22:37:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T22:37:11Z.

Review: CHANGES_REQUESTED


Thanks, the fix is right on the hardware. I measured it on gfx1035 with 256 lanes (8 waves) × 16 iterations on one LDS slot: ds_add_u64 against ds_add/sub/inc/dec_u32 on the high dword, ds_add_u32 on the low dword, and ds_xor_b64 against ds_xor_b32 on both dwords all come out exact in every run. So extending the lock from ds_add_u32 to the other 32-bit atomics holds.

It needs a rebase before it can land:

  • It doesn't build on current main. 6a1301f32 (FLAT addresses in the shared aperture reach LDS) added ApertureAtomic64. That function forward-declares and calls the two-argument LockedLdsUpdate(state, update) (SpirvMemoryInstructions.cpp, the declaration before ApertureAtomic64 and its return kind == ResourceKind::Lds ? LockedLdsUpdate(state, update) : update();). With this PR merged, GCC stops with "LockedLdsUpdate(...) is used but never defined". Pass the type and zero as in SharedAtomic64, and drop the stale declaration.
  • The same race through FLAT. ApertureAtomic32 handles 32-bit flat_atomic_* whose address lands in the LDS aperture, and its kind == ResourceKind::Lds branch still updates without the lock. So a flat_atomic_add racing a ds_add_u64 (or a 64-bit FLAT atomic, which does take the lock) on the same dwords can still lose updates. Wrap that branch like EmitLdsAtomic32 does when state.requirements.ldsLock is set. Then add a case to agc_spirv_lds_atomic_lock, and mention the FLAT path in the TechnicalDebt line.
  • #3015 changes LockedLdsUpdate too, and the two branches conflict. Whichever lands first, the other rebases on it.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5481057975 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2675#pullrequestreview-5481057975). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-10T22:37:11Z. **Review:** CHANGES_REQUESTED --- Thanks, the fix is right on the hardware. I measured it on gfx1035 with 256 lanes (8 waves) × 16 iterations on one LDS slot: `ds_add_u64` against `ds_add/sub/inc/dec_u32` on the high dword, `ds_add_u32` on the low dword, and `ds_xor_b64` against `ds_xor_b32` on both dwords all come out exact in every run. So extending the lock from `ds_add_u32` to the other 32-bit atomics holds. It needs a rebase before it can land: - **It doesn't build on current `main`.** 6a1301f32 (FLAT addresses in the shared aperture reach LDS) added `ApertureAtomic64`. That function forward-declares and calls the two-argument `LockedLdsUpdate(state, update)` (`SpirvMemoryInstructions.cpp`, the declaration before `ApertureAtomic64` and its `return kind == ResourceKind::Lds ? LockedLdsUpdate(state, update) : update();`). With this PR merged, GCC stops with "`LockedLdsUpdate(...)` is used but never defined". Pass the type and zero as in `SharedAtomic64`, and drop the stale declaration. - **The same race through FLAT.** `ApertureAtomic32` handles 32-bit `flat_atomic_*` whose address lands in the LDS aperture, and its `kind == ResourceKind::Lds` branch still updates without the lock. So a `flat_atomic_add` racing a `ds_add_u64` (or a 64-bit FLAT atomic, which does take the lock) on the same dwords can still lose updates. Wrap that branch like `EmitLdsAtomic32` does when `state.requirements.ldsLock` is set. Then add a case to `agc_spirv_lds_atomic_lock`, and mention the FLAT path in the TechnicalDebt line. - #3015 changes `LockedLdsUpdate` too, and the two branches conflict. Whichever lands first, the other rebases on it.
husseinkad commented 2026-10-10 22:39:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by husseinkad on 2026-10-10T22:39:33Z.


Thank you @adriadam10 for measuring this on gfx1035 and for the three points. I'm working on them now: rebasing onto current main, updating ApertureAtomic64's call to LockedLdsUpdate to take the type and zero like SharedAtomic64 and dropping the stale forward declaration, locking the LDS branch of ApertureAtomic32 when ldsLock is set (with a new case in agc_spirv_lds_atomic_lock and a mention of the FLAT path in the TechnicalDebt entry), and keeping the diff against LockedLdsUpdate small so that #3015 and this PR rebase on each other easily. I'll post here when the rebased branch is pushed, with the build and test results.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6102944081 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2675#issuecomment-6102944081). Originally posted by [husseinkad](https://github.com/husseinkad) on 2026-10-10T22:39:33Z. --- Thank you @adriadam10 for measuring this on gfx1035 and for the three points. I'm working on them now: rebasing onto current `main`, updating `ApertureAtomic64`'s call to `LockedLdsUpdate` to take the type and zero like `SharedAtomic64` and dropping the stale forward declaration, locking the LDS branch of `ApertureAtomic32` when `ldsLock` is set (with a new case in `agc_spirv_lds_atomic_lock` and a mention of the FLAT path in the TechnicalDebt entry), and keeping the diff against `LockedLdsUpdate` small so that #3015 and this PR rebase on each other easily. I'll post here when the rebased branch is pushed, with the build and test results. AI-assisted: yes.
husseinkad commented 2026-10-10 23:00:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by husseinkad on 2026-10-10T23:00:38Z.


@adriadam10 all three points are addressed; the branch is rebased onto main 91b134131 (force-pushed with a lease, six commits, now c9e1fa0ce; it still merges cleanly with the later main):

  • Build break: ApertureAtomic64 now calls LockedLdsUpdate(state, TypeU64(state), ConstantU64(state, 0u), update) as SharedAtomic64 does, and the stale forward declaration is gone. I folded this into the first fix commit so every commit builds; before it, the rebased branch failed with LockedLdsUpdate(...) is used but never defined.
  • FLAT path: the LDS branch of ApertureAtomic32 takes the lock when state.requirements.ldsLock is set; programs without a 64-bit LDS atomic emit the same SPIR-V as before. agc_spirv_lds_atomic_lock gains a program with ds_add_u64 plus a 32-bit flat_atomic_add (expects two elects) and a flat-only program (expects none); it fails with only that lock reverted (elect 1, expected 2). The TechnicalDebt entry names the 32-bit FLAT forms and says they were not measured against a 64-bit atomic.
  • #3015: both branches change the servedResult phi in LockedLdsUpdate; git merge-tree reports one conflict. I kept my part to the signature (type and zero instead of TypeU64/ConstantU64 in three places), so whichever lands second only has to use type in the phis (and in #3015's attemptedResult phi if it lands second). I did not touch #3015's branch.

Windows 11, WinLibs GCC 15.2.0 r7: ctest -R "lds_|ds_|agc_spirv_lds|flat_aper" passes 24 of 24 (including agc_driver_flat_apertures), and with ANYPS5_ENABLE_SPIRV_TOOLS=ON lds_mixed|agc_spirv_lds|flat_aper passes 3 of 3; conventions pass. Nothing new was measured on hardware.

One request, and please just say no if it doesn't fit your process: I have a number of other small, tested fixes on my fork that the intake check closed automatically (each links its branch from an issue, #2988 and later). If you would like to look at any of them, reopening is welcome, and I understand the intake limit exists for a reason.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103105803 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2675#issuecomment-6103105803). Originally posted by [husseinkad](https://github.com/husseinkad) on 2026-10-10T23:00:38Z. --- @adriadam10 all three points are addressed; the branch is rebased onto `main` `91b134131` (force-pushed with a lease, six commits, now `c9e1fa0ce`; it still merges cleanly with the later `main`): - **Build break:** `ApertureAtomic64` now calls `LockedLdsUpdate(state, TypeU64(state), ConstantU64(state, 0u), update)` as `SharedAtomic64` does, and the stale forward declaration is gone. I folded this into the first fix commit so every commit builds; before it, the rebased branch failed with `LockedLdsUpdate(...) is used but never defined`. - **FLAT path:** the LDS branch of `ApertureAtomic32` takes the lock when `state.requirements.ldsLock` is set; programs without a 64-bit LDS atomic emit the same SPIR-V as before. `agc_spirv_lds_atomic_lock` gains a program with `ds_add_u64` plus a 32-bit `flat_atomic_add` (expects two elects) and a flat-only program (expects none); it fails with only that lock reverted (`elect 1, expected 2`). The TechnicalDebt entry names the 32-bit FLAT forms and says they were not measured against a 64-bit atomic. - **#3015:** both branches change the `servedResult` phi in `LockedLdsUpdate`; `git merge-tree` reports one conflict. I kept my part to the signature (`type` and `zero` instead of `TypeU64`/`ConstantU64` in three places), so whichever lands second only has to use `type` in the phis (and in #3015's `attemptedResult` phi if it lands second). I did not touch #3015's branch. Windows 11, WinLibs GCC 15.2.0 r7: `ctest -R "lds_|ds_|agc_spirv_lds|flat_aper"` passes 24 of 24 (including `agc_driver_flat_apertures`), and with `ANYPS5_ENABLE_SPIRV_TOOLS=ON` `lds_mixed|agc_spirv_lds|flat_aper` passes 3 of 3; conventions pass. Nothing new was measured on hardware. One request, and please just say no if it doesn't fit your process: I have a number of other small, tested fixes on my fork that the intake check closed automatically (each links its branch from an issue, #2988 and later). If you would like to look at any of them, reopening is welcome, and I understand the intake limit exists for a reason. AI-assisted: yes.
adriadam10 commented 2026-10-10 23:15:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T23:15:41Z.

Review: APPROVED


Checked the rebased head: builds on current main, agc_spirv_lds_atomic_lock and agc_driver_lds_mixed_width_atomics pass, and both fail with the source change reverted. The 32-bit flat-aperture LDS path now takes the lock as well, and the TechnicalDebt entry matches. Confirmed on hardware by @SleglJan (RADV and RTX 3080). Merging once the full Build for this head is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5481154099 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2675#pullrequestreview-5481154099). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-10T23:15:41Z. **Review:** APPROVED --- Checked the rebased head: builds on current `main`, `agc_spirv_lds_atomic_lock` and `agc_driver_lds_mixed_width_atomics` pass, and both fail with the source change reverted. The 32-bit flat-aperture LDS path now takes the lock as well, and the TechnicalDebt entry matches. Confirmed on hardware by @SleglJan (RADV and RTX 3080). Merging once the full Build for this head is green.
husseinkad commented 2026-10-10 23:18:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by husseinkad on 2026-10-10T23:18:45Z.


Thank you @adriadam10 for the careful review, for measuring it on gfx1035, and for the merge, and thanks to @SleglJan for the RADV and RTX 3080 runs and the per-lane test case, and to @oneandonlydean for reopening it.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103244840 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2675#issuecomment-6103244840). Originally posted by [husseinkad](https://github.com/husseinkad) on 2026-10-10T23:18:45Z. --- Thank you @adriadam10 for the careful review, for measuring it on gfx1035, and for the merge, and thanks to @SleglJan for the RADV and RTX 3080 runs and the per-lane test case, and to @oneandonlydean for reopening it. AI-assisted: yes.
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!2675
No description provided.