Days Gone: Remastered (PPSA28180): boots to gameplay with local patches; CPU-bound at ~9 FPS in the menu and 0.2-2 FPS in game #11376

Open
opened 2026-10-26 09:47:06 +00:00 by HabibUrRehmanBhattii · 0 comments
HabibUrRehmanBhattii commented 2026-10-26 09:47:06 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by HabibUrRehmanBhattii on 2026-10-26T09:47:06Z.


Title

Days Gone: Remastered (PPSA28180): boots to gameplay with local patches; CPU-bound at ~9 FPS in the menu (GPU idle) and 0.2–2 FPS in game

Environment

  • AnyPS5 GUI 1.1.2, libraries/relinker built from PR #10936 head 0d14468cc on main @ 2026-10-25, with the open perf(agc) PRs #9884 #9897 #9899 #9858 #6340 #9287 #8716 #7484 #11368 stacked.
  • RTX 4070 (12 GB), driver 616.368.0, i7-14700F, 32 GB, Windows 11 26200.
  • Game: retail PPSA28180 dump, converted with --windows --to-intel --registry, automatic unwrap (SELF eboot + 5 sce_module PRXs → ELF), caches warm (shader_cache/ ~5.3 GB, pipeline cache 86 MB).
  • Reaches the main menu, reads/writes savedata0/bendsavegame.ps5.sav, and reaches gameplay (in-game dialogue visible).

Stops we had to patch locally to get this far

These are all in our local tree, not from main; listing them so you can tell us which are worth PRs:

  1. sceAmprCommandBufferWriteAddressOnCompletion still returns EBUSY (0x80020010) when the title plans a 64-byte APR buffer: 40-byte ReadFile + 24-byte WriteAddress completion. With #10936 applied the Nop record is right, but Apr::WriteAddressCommand is still 32 bytes (8-byte header + address + value + two u32), so 40+32 > 64. Making the WriteAddress record 24 bytes lets our shader/asset streaming proceed; the other non-Nop records presumably have the same mismatch.
  2. libSceAudioOut AV (0xc0000005, "read of -1") is a stack misalignment, not a bad pointer: movaps %xmm3,0xf0(%rsp) at libSceAudioOut.prx+0xd200 fails because the guest→lib call enters with rsp ≡ 0 (mod 16). Same ABI class as #10945; local workaround builds libSceAudioOut with -mstackrealign.
  3. Compute shader image descriptors: a write-only 2D storage image bound to a Dim3D T# (descriptor format 56) and the mirror case (3D storage image on a 2D T#) have no RuntimeImageModes entry. We add Dim3D/Dim2D write-only storage modes (store slice 0, CoordU32/EmitWriteOp pad or check z == 0), mirroring #11120.
  4. buffer specialization has an unsupported format from a typed V# with FORMAT 0 (#10831 fixes the store path; a remaining load path still rejects).
  5. 4_4_4_4 UNORM target (format 19) with COMP_SWAP 0: #8563 decodes only COMP_SWAP 2. Standard order decodes to R16_UINT, mapping 0xe4, same packer.
  6. sceVideoOutGetEventId throws on a non-VideoOut event; the title probes it and compares the return to VIDEO_OUT_ERROR_INVALID_EVENT (0x8029000D; caller eboot.exe+0x1d38742), so it must return the error code instead of throwing.
  7. Pixel-function LDS: the emitted shader claims one slot per subgroup and never releases it (OpAtomicIAdd on the counter, capacity check, no OpAtomicISub), so any draw with more subgroups than slots exhausts with pixel function LDS subgroup slots exhausted. We emit a release from one elected lane in the fragment epilogue and keep the pool at the device's maxStorageBufferRange (4095 slots, 1 MiB stride).
  8. vertex fetch exceeds descriptor record count with OOB_SELECT 2/3 — fixed by #9915, required for this title as well.

Performance profile (the open problem — same class as #10441/#6257)

  • Boot/logo: 50–58 FPS. Main menu: ~9 FPS steady. In-game: 0.2–2 FPS.
  • APS5_PROFILE_DRAW=1, menu, 10 s window: 85 presents; GPU busy 76.6 ms per 10 s; graphics queue worker busy ~83 %.
  • [packets] queue 0x0 10 s: DRAW_INDEX_2 ×61 238 = 5.7 s, DISPATCH_DIRECT ×10 616 = 0.7 s, DRAW_INDEX_INDIRECT ×5 950 = 0.66 s, WAIT_REG_MEM ×636 = 0.59 s.
  • [draw] driver phases: 81 446 draw packets at 86 µs each (Graphics::Draw 48 µs, capture 8.9 µs, recompile 9.2 µs, lock wait 8.8 µs).
  • [buffers]: ~60 k GPU copies / 18.9 GB per 10 s out of imports and back (~180 MB per presented frame); [resources] ~52 k builds per 10 s, stage B 8.9 s.
  • Stacking the nine open perf PRs halved copies/packets in a comparable window (15.2 GB → 6.0 GB per 10 s) but menu FPS stayed ≈9. APS5_DRAW_PIPELINE=1 moves Graphics::Draw to 6 µs/packet but the committer becomes the limit (≈8.8 FPS); APS5_DRAW_INPUTS_IN_PLACE=1, larger texture/GPU-copy/DRAM-cache budgets and batch/draw-cache knobs are neutral or worse.

So the ceiling here is the CPU draw-recording path, not GPU work. #9508 (APS5_GPU_HEAP) and #7642 (APS5_GPU_PATH) are the branches we would try next, but they do not apply onto our tree without rebasing onto newer main.

Happy to turn any of items 1–8 into PRs if you want them.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6037212508 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/11376). Originally posted by [HabibUrRehmanBhattii](https://github.com/HabibUrRehmanBhattii) on 2026-10-26T09:47:06Z. --- ## Title Days Gone: Remastered (PPSA28180): boots to gameplay with local patches; CPU-bound at ~9 FPS in the menu (GPU idle) and 0.2–2 FPS in game ## Environment - AnyPS5 GUI 1.1.2, libraries/relinker built from PR #10936 head `0d14468cc` on main @ 2026-10-25, with the open `perf(agc)` PRs #9884 #9897 #9899 #9858 #6340 #9287 #8716 #7484 #11368 stacked. - RTX 4070 (12 GB), driver 616.368.0, i7-14700F, 32 GB, Windows 11 26200. - Game: retail PPSA28180 dump, converted with `--windows --to-intel --registry`, automatic unwrap (SELF eboot + 5 `sce_module` PRXs → ELF), caches warm (`shader_cache/` ~5.3 GB, pipeline cache 86 MB). - Reaches the main menu, reads/writes `savedata0/bendsavegame.ps5.sav`, and reaches gameplay (in-game dialogue visible). ## Stops we had to patch locally to get this far These are all in our local tree, not from main; listing them so you can tell us which are worth PRs: 1. `sceAmprCommandBufferWriteAddressOnCompletion` still returns EBUSY (`0x80020010`) when the title plans a 64-byte APR buffer: 40-byte ReadFile + **24-byte** WriteAddress completion. With #10936 applied the Nop record is right, but `Apr::WriteAddressCommand` is still 32 bytes (8-byte header + address + value + two u32), so 40+32 > 64. Making the WriteAddress record 24 bytes lets our shader/asset streaming proceed; the other non-Nop records presumably have the same mismatch. 2. `libSceAudioOut` AV (`0xc0000005`, "read of -1") is a stack misalignment, not a bad pointer: `movaps %xmm3,0xf0(%rsp)` at `libSceAudioOut.prx+0xd200` fails because the guest→lib call enters with `rsp ≡ 0 (mod 16)`. Same ABI class as #10945; local workaround builds `libSceAudioOut` with `-mstackrealign`. 3. Compute shader image descriptors: a write-only **2D storage image bound to a Dim3D T#** (descriptor format 56) and the mirror case (**3D storage image on a 2D T#**) have no `RuntimeImageModes` entry. We add `Dim3D`/`Dim2D` write-only storage modes (store slice 0, `CoordU32`/`EmitWriteOp` pad or check `z == 0`), mirroring #11120. 4. `buffer specialization has an unsupported format` from a typed V# with FORMAT 0 (#10831 fixes the store path; a remaining load path still rejects). 5. 4_4_4_4 UNORM target (format 19) with `COMP_SWAP 0`: #8563 decodes only `COMP_SWAP 2`. Standard order decodes to `R16_UINT`, mapping `0xe4`, same packer. 6. `sceVideoOutGetEventId` throws on a non-VideoOut event; the title **probes** it and compares the return to `VIDEO_OUT_ERROR_INVALID_EVENT` (`0x8029000D`; caller `eboot.exe+0x1d38742`), so it must return the error code instead of throwing. 7. Pixel-function LDS: the emitted shader claims one slot per subgroup and never releases it (`OpAtomicIAdd` on the counter, capacity check, no `OpAtomicISub`), so any draw with more subgroups than slots exhausts with `pixel function LDS subgroup slots exhausted`. We emit a release from one elected lane in the fragment epilogue and keep the pool at the device's `maxStorageBufferRange` (4095 slots, 1 MiB stride). 8. `vertex fetch exceeds descriptor record count` with OOB_SELECT 2/3 — fixed by #9915, required for this title as well. ## Performance profile (the open problem — same class as #10441/#6257) - Boot/logo: 50–58 FPS. Main menu: **~9 FPS** steady. In-game: **0.2–2 FPS**. - `APS5_PROFILE_DRAW=1`, menu, 10 s window: 85 presents; GPU busy **76.6 ms per 10 s**; graphics queue worker busy ~83 %. - `[packets] queue 0x0` 10 s: `DRAW_INDEX_2 ×61 238` = 5.7 s, `DISPATCH_DIRECT ×10 616` = 0.7 s, `DRAW_INDEX_INDIRECT ×5 950` = 0.66 s, `WAIT_REG_MEM ×636` = 0.59 s. - `[draw] driver phases`: 81 446 draw packets at 86 µs each (`Graphics::Draw` 48 µs, capture 8.9 µs, recompile 9.2 µs, lock wait 8.8 µs). - `[buffers]`: ~60 k GPU copies / 18.9 GB per 10 s out of imports and back (~180 MB per presented frame); `[resources]` ~52 k builds per 10 s, stage B 8.9 s. - Stacking the nine open perf PRs halved copies/packets in a comparable window (15.2 GB → 6.0 GB per 10 s) but menu FPS stayed ≈9. `APS5_DRAW_PIPELINE=1` moves `Graphics::Draw` to 6 µs/packet but the committer becomes the limit (≈8.8 FPS); `APS5_DRAW_INPUTS_IN_PLACE=1`, larger texture/GPU-copy/DRAM-cache budgets and batch/draw-cache knobs are neutral or worse. So the ceiling here is the CPU draw-recording path, not GPU work. `#9508` (`APS5_GPU_HEAP`) and `#7642` (`APS5_GPU_PATH`) are the branches we would try next, but they do not apply onto our tree without rebasing onto newer `main`. Happy to turn any of items 1–8 into PRs if you want them.
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#11376
No description provided.