AGC: AMD device-backed LDS lock-budget case returns half of expected sum #7344

Closed
opened 2026-10-18 01:18:10 +00:00 by Amoenus · 2 comments
Amoenus commented 2026-10-18 01:18:10 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-18T01:18:10Z.


What

The existing agc_driver_lds_lock_budget case fails3/3 on unchanged main f663e565fe, on the AMD iGPU below. It returns a value rather than hanging. In the first, device-backed LDS case, lane0 reads exactly half the expected final sum:

lds lock budget: robustBufferAccess2=1; maxWorkgroupSharedMemoryBytes=32768
lds lock budget: limit declarations verified; guest=32768; workgroup=0; device=8193
AGC graphics: lds mixed width atomics limit run 0: lane 0 read 0x00000ffffffff800, expected 0x00001ffffffff000 after 4096 ds_add_u64 and 4096 ds_add_u32 on one slot

All three runs return the same actual/expected pair. The fixture stops at the first lane's assertion, so this is not a claim about every lane. Its second, limit-4 case is not reached on AMD. The existing test was added with #4048; I have not established which commit introduced the behavior.

Environment

Windows11 Enterprise26200, Ryzen9 9950X3D, AMD Radeon(TM) Graphics1002:13c0, driver32.0.21036.18, Vulkan subgroup64; WinLibs GCC15.2.0 r7, Release. The actual selected device is confirmed in each log. Khronos validation1.4.363 is confirmed loaded; no observed VUID or validation errors. SPIRV-Tools build option OFF. Shader cache and pipeline journal disabled; driver caches uncontrolled.

Reproduce

Build current main, with Vulkan execution tests enabled, then:

cmake --build build --target agc_driver_lds_mixed_width_atomics_tests
$env:ANYPS5_GPU = 'AMD Radeon(TM) Graphics'
$env:ANYPS5_REQUIRE_VULKAN = '1'
$env:ANYPS5_NO_SHADER_CACHE = '1'
$env:APS5_NO_PIPELINE_JOURNAL = '1'
ctest --test-dir build -V -j1 --timeout 30 -R '^agc_driver_lds_lock_budget$'

The existing fixture already checks generated memory declarations before dispatch and exact readback from the256-lane program; no new reproducer code is required.

Controls and scope

The failure was found while refreshing Sonic's broader bring-up integration, then reproduced3/3 from a separate checkout/build of unchanged main. On the composed integration38faf6a75 (mainf663 plus open bring-up fixes), the same lock-budget test passes3/3 on RTX5080/610.62 and on llvmpipe LLVM20.1.2/Mesa25.2.8 under Ubuntu24.04 WSL2. Those are composition controls, not unchanged-main controls on those devices. The full selected integration suite is not claimed to pass on AMD.

Related #6666/#5271 describe an AMD LDS lock hang/unwritten output in the ordinary mixed-width test, with #6976/#6670 proposing corrections. This report records the distinct device-backed shared-memory-limit case, the exact returned value and current-main reproduction. I have not established whether the cause is shared or whether either pending correction fixes it. No game has yet been shown to hit this particular case; this was discovered during host-side validation, not from a Sonic failure. No performance or console-equivalence claim.

AI-assisted investigation and reporting: Codex; author responsible.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5904922627 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/7344). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-18T01:18:10Z. --- ### What The existing `agc_driver_lds_lock_budget` case fails3/3 on **unchanged main f663e565fec8a55d4bbddaf6d04877ce56eec642**, on the AMD iGPU below. It returns a value rather than hanging. In the first, device-backed LDS case, lane0 reads exactly half the expected final sum: ```text lds lock budget: robustBufferAccess2=1; maxWorkgroupSharedMemoryBytes=32768 lds lock budget: limit declarations verified; guest=32768; workgroup=0; device=8193 AGC graphics: lds mixed width atomics limit run 0: lane 0 read 0x00000ffffffff800, expected 0x00001ffffffff000 after 4096 ds_add_u64 and 4096 ds_add_u32 on one slot ``` All three runs return the same actual/expected pair. The fixture stops at the first lane's assertion, so this is not a claim about every lane. Its second, `limit-4` case is not reached on AMD. The existing test was added with #4048; I have not established which commit introduced the behavior. ### Environment Windows11 Enterprise26200, Ryzen9 9950X3D, **AMD Radeon(TM) Graphics1002:13c0**, driver32.0.21036.18, Vulkan subgroup64; WinLibs GCC15.2.0 r7, Release. The actual selected device is confirmed in each log. Khronos validation1.4.363 is confirmed loaded; no observed VUID or validation errors. SPIRV-Tools build option OFF. Shader cache and pipeline journal disabled; driver caches uncontrolled. ### Reproduce Build current main, with Vulkan execution tests enabled, then: ```powershell cmake --build build --target agc_driver_lds_mixed_width_atomics_tests $env:ANYPS5_GPU = 'AMD Radeon(TM) Graphics' $env:ANYPS5_REQUIRE_VULKAN = '1' $env:ANYPS5_NO_SHADER_CACHE = '1' $env:APS5_NO_PIPELINE_JOURNAL = '1' ctest --test-dir build -V -j1 --timeout 30 -R '^agc_driver_lds_lock_budget$' ``` The [existing fixture](https://github.com/boykopovar/AnyPS5/blob/f663e565fec8a55d4bbddaf6d04877ce56eec642/core/libs/prx/libSceAgcDriver/tests/execution/LdsMixedWidthAtomics.cpp) already checks generated memory declarations before dispatch and exact readback from the256-lane program; no new reproducer code is required. ### Controls and scope The failure was found while refreshing Sonic's broader bring-up integration, then reproduced3/3 from a separate checkout/build of unchanged main. On the composed integration38faf6a75 (mainf663 plus open bring-up fixes), the same lock-budget test passes3/3 on RTX5080/610.62 and on llvmpipe LLVM20.1.2/Mesa25.2.8 under Ubuntu24.04 WSL2. Those are **composition controls**, not unchanged-main controls on those devices. The full selected integration suite is not claimed to pass on AMD. Related #6666/#5271 describe an AMD LDS lock hang/unwritten output in the ordinary mixed-width test, with #6976/#6670 proposing corrections. This report records the distinct **device-backed shared-memory-limit case**, the exact returned value and current-main reproduction. I have not established whether the cause is shared or whether either pending correction fixes it. No game has yet been shown to hit this particular case; this was discovered during host-side validation, not from a Sonic failure. No performance or console-equivalence claim. AI-assisted investigation and reporting: Codex; author responsible. <!-- codex-lds-device-boundary-mainf663-v1 -->
MarcZX10 commented 2026-10-18 01:56:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T01:56:06Z.


Thanks for running the exact agc_driver_lds_lock_budget case. This confirms #6976 does not cover #7344: on an AMD RDNA 2 iGPU, unchanged main and main plus #6976 both fail with the same lane-0 value (0x00000ffffffff800 vs 0x00001ffffffff000); the RTX 4070 SUPER control passes 20/20. The two mixed-width lock tests do pass on #6976, so this remains a separate device-backed LDS failure. I see your note that you plan to take this issue next, so I’ll leave implementation with you.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244471801 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/7344#issuecomment-6244471801). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-18T01:56:06Z. --- Thanks for running the exact `agc_driver_lds_lock_budget` case. This confirms #6976 does not cover #7344: on an AMD RDNA 2 iGPU, unchanged `main` and `main` plus #6976 both fail with the same lane-0 value (`0x00000ffffffff800` vs `0x00001ffffffff000`); the RTX 4070 SUPER control passes 20/20. The two mixed-width lock tests do pass on #6976, so this remains a separate device-backed LDS failure. I see your note that you plan to take this issue next, so I’ll leave implementation with you.
LeandroLP23 commented 2026-10-18 09:52:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T09:52:31Z.


RDNA 3.5 does not reproduce this, with robustBufferAccess2 on or off.

Radeon 860M (RDNA 3.5, 1002:1114, APU), AMD driver 32.0.13058.8001 (Vulkan driver info 24.30.58.08, LLPC), Windows 11 Home 26300, WinLibs GCC 15.2.0, Release. Build: main 1c523bdb4 + #6308 + #7264 (neither touches these paths).

  • main as is: lds lock budget: robustBufferAccess2=0 since #7351 turned the feature off on AMD's proprietary driver. Both cases, limit and limit-4, verify their GPU readback across 256 lanes, 3/3.
  • RobustBufferAccess2Usable forced to true: robustBufferAccess2=1, same result, 3/3.

Your log has robustBufferAccess2=1 on f663e565f, before #7351 merged. It may be worth rerunning the case on current main on the RDNA 2 iGPU: if it passes there, this is probably another symptom of #7376.

AI-assisted

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6248450445 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/7344#issuecomment-6248450445). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-18T09:52:31Z. --- RDNA 3.5 does not reproduce this, with `robustBufferAccess2` on or off. Radeon 860M (RDNA 3.5, `1002:1114`, APU), AMD driver 32.0.13058.8001 (Vulkan driver info 24.30.58.08, LLPC), Windows 11 Home 26300, WinLibs GCC 15.2.0, Release. Build: `main` `1c523bdb4` + #6308 + #7264 (neither touches these paths). - `main` as is: `lds lock budget: robustBufferAccess2=0` since #7351 turned the feature off on AMD's proprietary driver. Both cases, `limit` and `limit-4`, verify their GPU readback across 256 lanes, 3/3. - `RobustBufferAccess2Usable` forced to `true`: `robustBufferAccess2=1`, same result, 3/3. Your log has `robustBufferAccess2=1` on `f663e565f`, before #7351 merged. It may be worth rerunning the case on current `main` on the RDNA 2 iGPU: if it passes there, this is probably another symptom of #7376. AI-assisted
Sign in to join this conversation.
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#7344
No description provided.