feat(agc): link calls through the AGC FS table #6160

Merged
fma-rc merged 1 commit from upstream-pr/6160 into main 2026-10-18 17:44:10 +00:00
fma-rc commented 2026-10-14 23:53:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-14T23:53:29Z.


What

1348 Ex Voto (PPSA24249) stops on current main 2559e9623 when a compute shader calls through libSceAgc's FS table:

[videoout] presentation failed: compute shader 0x16800e3000: shader 0x16800e3000 stage 0: ShaderRecompiler::Recompile: computed/data-dependent s_swappc_b64 call target at program counter 0x00000130 is not statically resolvable

The shader builds the constant address 0xF_E0040000 with two s_mov_b32, loads slot 0 there as a V#, reads a call target at +0x20 and skips the s_swappc_b64 when it is zero. Issue #6117 reports the same shape in MXGP 26 and asks what a console keeps at that address.

On the PS5 12.00 modules, libSceAgc's init gets a block from libSceAgcDriver, aborts unless the table lands at 0xF_E0040000, zeroes six 16-byte slots, and makes slot 0 a V# (stride 16, eight records) over a buffer of eight {routine address, 0} records. This PR:

  • maps 2 MiB at 0xF_E0000000 once per process when the driver is created (MAP_FIXED_NOREPLACE on Linux, a commit inside the guest arena on Windows), fills the table that way and registers the block with GuestAllocations;
  • points every record at one routine that only returns (s_setpc_b64 s[14:15]); Sony's routines are not modeled (TechnicalDebt);
  • extends the table-callee path from #4706 to a V# pointer set by two s_mov_b32 of constants, and lets the writer search cross a conditional branch that jumps past the call (the null check).

Refs #6117 (same call; its unaligned atomic stays open).

Tested

Linux, current main 2559e9623 plus this PR:

Run main this PR
Ex Voto, warm shader cache, 300 s limit stops at 57.1 s (frame 30) with the line above no stop, frame 566 at 300 s
Ex Voto, cold shader cache, 300 s limit frame 32 at 300 s no stop, frame 472 at 300 s

Rebased onto main 452494439 (2026-10-16): agc_driver_compute_fs_table_calls passes on RTX 5080 (NVIDIA 615.78.08), Radeon 610M (RADV) and lavapipe. Ex Voto, warm cache, 300 s: main stops at 53.1 s with the same s_swappc_b64 line; with this PR no stop, frame 851 at 300 s, on the title screen.

With the PR and a warm cache, pressing Cross at the title screen reaches the main menu (Play / Options / Credits) with no stop in 390 s.

MXGP 26 (PPSA30839), tested by milescoviello on Linux (RTX 4070 Ti, main d92a8dad3 merged with d1a68c4ae, comment): main stops at 135 s with the issue's s_swappc_b64 line; with this PR 2 of 2 runs reach the 180 s limit without it.

Silent Hill: Townfall (PPSA33286), tested by tv7 on Windows (RTX 3070, main ff23657f3 merged with d1a68c4ae, comment): main stops on the s_swappc_b64 line in 3 of 3 runs after about 2.5 min; with this PR it appears in none of 5 runs and 4 of 5 reach the 900 s limit (the fifth hits a render-thread timeout tv7 has seen before without this PR).

Hot Wheels Infinite Rush (PPSA22408), tested by mrfelek on Linux (RTX 3080 Ti, main 5d9dcc42d merged with d1a68c4ae, comment): main aborts on the same s_swappc_b64 line at PC 0x134 after the boot screens; with this PR none of 3 runs shows it (one reaches the loading screen, one stops on a storage-image write-watch error also seen once without it, one runs out of device memory while storage images grow).

agc_driver_compute_fs_table_calls (the Ex Voto shape: the marker store runs only after the call returns) and scalar_call fail with GraphBuilder.cpp and Lifecycle.cpp from main (FS table at 0xfe0040000 is not mapped, scalar call regression; NVIDIA) and pass with the PR on NVIDIA RTX 5080 (615.78.08), RADV (Ryzen 7 7800X3D iGPU) and lavapipe. Windows (WinLibs GCC 15.2, VM): the full suite passes except guest_kernel_stack_protect and guest_kqueue, which fail the same way on main there.

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: PPSA24249 (1348 Ex Voto), PPSA30839 (MXGP 26, with #6094 for its atomics), PPSA33286 (Silent Hill: Townfall), PPSA22408 (Hot Wheels Infinite Rush)
  • GPUs tested: NVIDIA RTX 5080 (615.78.08, Arch Linux), AMD Ryzen 7 7800X3D iGPU (RADV, Arch Linux), lavapipe
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4866126535 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6160). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-14T23:53:29Z. --- ### What 1348 Ex Voto (PPSA24249) stops on current `main` 2559e9623 when a compute shader calls through libSceAgc's FS table: ``` [videoout] presentation failed: compute shader 0x16800e3000: shader 0x16800e3000 stage 0: ShaderRecompiler::Recompile: computed/data-dependent s_swappc_b64 call target at program counter 0x00000130 is not statically resolvable ``` The shader builds the constant address `0xF_E0040000` with two `s_mov_b32`, loads slot 0 there as a V#, reads a call target at +0x20 and skips the `s_swappc_b64` when it is zero. Issue #6117 reports the same shape in MXGP 26 and asks what a console keeps at that address. On the PS5 12.00 modules, libSceAgc's init gets a block from libSceAgcDriver, aborts unless the table lands at `0xF_E0040000`, zeroes six 16-byte slots, and makes slot 0 a V# (stride 16, eight records) over a buffer of eight {routine address, 0} records. This PR: - maps 2 MiB at `0xF_E0000000` once per process when the driver is created (`MAP_FIXED_NOREPLACE` on Linux, a commit inside the guest arena on Windows), fills the table that way and registers the block with `GuestAllocations`; - points every record at one routine that only returns (`s_setpc_b64 s[14:15]`); Sony's routines are not modeled (TechnicalDebt); - extends the table-callee path from #4706 to a V# pointer set by two `s_mov_b32` of constants, and lets the writer search cross a conditional branch that jumps past the call (the null check). Refs #6117 (same call; its unaligned atomic stays open). ### Tested Linux, current `main` 2559e9623 plus this PR: | Run | `main` | this PR | |---|---|---| | Ex Voto, warm shader cache, 300 s limit | stops at 57.1 s (frame 30) with the line above | no stop, frame 566 at 300 s | | Ex Voto, cold shader cache, 300 s limit | frame 32 at 300 s | no stop, frame 472 at 300 s | Rebased onto `main` 452494439 (2026-10-16): `agc_driver_compute_fs_table_calls` passes on RTX 5080 (NVIDIA 615.78.08), Radeon 610M (RADV) and lavapipe. Ex Voto, warm cache, 300 s: `main` stops at 53.1 s with the same `s_swappc_b64` line; with this PR no stop, frame 851 at 300 s, on the title screen. With the PR and a warm cache, pressing Cross at the title screen reaches the main menu (Play / Options / Credits) with no stop in 390 s. MXGP 26 (PPSA30839), tested by milescoviello on Linux (RTX 4070 Ti, `main` d92a8dad3 merged with d1a68c4ae, [comment](https://github.com/boykopovar/AnyPS5/pull/6160#issuecomment-6186387718)): `main` stops at 135 s with the issue's `s_swappc_b64` line; with this PR 2 of 2 runs reach the 180 s limit without it. Silent Hill: Townfall (PPSA33286), tested by tv7 on Windows (RTX 3070, `main` ff23657f3 merged with d1a68c4ae, [comment](https://github.com/boykopovar/AnyPS5/pull/6160#issuecomment-6197084004)): `main` stops on the `s_swappc_b64` line in 3 of 3 runs after about 2.5 min; with this PR it appears in none of 5 runs and 4 of 5 reach the 900 s limit (the fifth hits a render-thread timeout tv7 has seen before without this PR). Hot Wheels Infinite Rush (PPSA22408), tested by mrfelek on Linux (RTX 3080 Ti, `main` 5d9dcc42d merged with d1a68c4ae, [comment](https://github.com/boykopovar/AnyPS5/pull/6160#issuecomment-6217458136)): `main` aborts on the same `s_swappc_b64` line at PC 0x134 after the boot screens; with this PR none of 3 runs shows it (one reaches the loading screen, one stops on a storage-image write-watch error also seen once without it, one runs out of device memory while storage images grow). `agc_driver_compute_fs_table_calls` (the Ex Voto shape: the marker store runs only after the call returns) and `scalar_call` fail with `GraphBuilder.cpp` and `Lifecycle.cpp` from `main` (`FS table at 0xfe0040000 is not mapped`, `scalar call regression`; NVIDIA) and pass with the PR on NVIDIA RTX 5080 (615.78.08), RADV (Ryzen 7 7800X3D iGPU) and lavapipe. Windows (WinLibs GCC 15.2, VM): the full suite passes except `guest_kernel_stack_protect` and `guest_kqueue`, which fail the same way on `main` there. ### 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](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: PPSA24249 (1348 Ex Voto), PPSA30839 (MXGP 26, with #6094 for its atomics), PPSA33286 (Silent Hill: Townfall), PPSA22408 (Hot Wheels Infinite Rush) - [x] GPUs tested: NVIDIA RTX 5080 (615.78.08, Arch Linux), AMD Ryzen 7 7800X3D iGPU (RADV, Arch Linux), lavapipe - [x] AI-assisted: yes
milescoviello commented 2026-10-15 06:57:47 +00:00 (Migrated from github.com)

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


MXGP 26 (PPSA30839), the title in #6117, with this PR on Linux.

Setup: Ubuntu 24.04, GCC 13.3, Release, RTX 4070 Ti (NVIDIA 595.99), main d92a8dad3 merged with this head d1a68c4ae (clean merge), relinked with --to-intel, 180 s runs with pad input (a button every 1.5 s from 8 s).

  • main alone: stops at 135 s with computed/data-dependent s_swappc_b64 call target at program counter 0x00000134 is not statically resolvable, the #6117 shader.
  • With this PR: 2 of 2 runs reach the 180 s limit and that line does not appear. The unaligned buffer_atomic_or faults (BDA access failed: ... bytes=4 stage=4 reason=7) remain, 36 and 70 per run; #6094 is for those.
  • With this PR and #6094 (6c188638a): 2 of 2 runs reach the limit with no BDA fault. A third run with screenshots goes through the publisher splash and the title screen to the "Welcome to MXGP26" account prompt; the FPS counter reads 0.2–0.5 there.

Not checked on Windows.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6186387718 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6160#issuecomment-6186387718). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-15T06:57:47Z. --- MXGP 26 (PPSA30839), the title in #6117, with this PR on Linux. Setup: Ubuntu 24.04, GCC 13.3, Release, RTX 4070 Ti (NVIDIA 595.99), `main` d92a8dad3 merged with this head `d1a68c4ae` (clean merge), relinked with `--to-intel`, 180 s runs with pad input (a button every 1.5 s from 8 s). - `main` alone: stops at 135 s with `computed/data-dependent s_swappc_b64 call target at program counter 0x00000134 is not statically resolvable`, the #6117 shader. - With this PR: 2 of 2 runs reach the 180 s limit and that line does not appear. The unaligned `buffer_atomic_or` faults (`BDA access failed: ... bytes=4 stage=4 reason=7`) remain, 36 and 70 per run; #6094 is for those. - With this PR and #6094 (`6c188638a`): 2 of 2 runs reach the limit with no BDA fault. A third run with screenshots goes through the publisher splash and the title screen to the "Welcome to MXGP26" account prompt; the FPS counter reads 0.2–0.5 there. Not checked on Windows. AI-assisted: yes
github-actions[bot] commented 2026-10-15 12:15:45 +00:00 (Migrated from github.com)

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


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
PR 7413 core/shader/recompiler/ControlFlow/src/GraphBuilder.cpp L1454
docs/dev/debt/libSceAgcDriver.md L170
PR 7474 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp L139

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 2434 docs/dev/debt/libSceAgcDriver.md
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 4650 docs/dev/debt/libSceAgcDriver.md
PR 5021 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5115 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 5499 docs/dev/debt/libSceAgcDriver.md
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6044 core/libs/tests/ScalarCall.cpp
PR 6134 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6222 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6472 docs/dev/debt/libSceAgcDriver.md
PR 6481 docs/dev/debt/libSceAgcDriver.md
PR 6529 docs/dev/debt/libSceAgcDriver.md
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6549 docs/dev/debt/libSceAgcDriver.md
PR 6563 docs/dev/debt/libSceAgcDriver.md
PR 6741 docs/dev/debt/libSceAgcDriver.md
PR 6786 docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 6867 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6868 docs/dev/debt/libSceAgcDriver.md
PR 6977 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
core/shader/recompiler/ControlFlow/src/GraphBuilder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7002 docs/dev/debt/libSceAgcDriver.md
PR 7085 docs/dev/debt/libSceAgcDriver.md
PR 7201 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp
PR 7332 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7390 docs/dev/debt/libSceAgcDriver.md
PR 7426 docs/dev/debt/libSceAgcDriver.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6191815357 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6160#issuecomment-6191815357). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T12:15:45Z. --- <!-- 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 | |---|---|---|---| | [PR 7413](https://www.github.com/boykopovar/AnyPS5/pull/7413) | `core/shader/recompiler/ControlFlow/src/GraphBuilder.cpp` [L1454](https://github.com/boykopovar/AnyPS5/blob/19bb30cee8eb33057a9c0e59c9a04181018f26e6/core/shader/recompiler/ControlFlow/src/GraphBuilder.cpp#L1454)<br>`docs/dev/debt/libSceAgcDriver.md` [L170](https://github.com/boykopovar/AnyPS5/blob/19bb30cee8eb33057a9c0e59c9a04181018f26e6/docs/dev/debt/libSceAgcDriver.md#L170) | | | | [PR 7474](https://www.github.com/boykopovar/AnyPS5/pull/7474) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp` [L139](https://github.com/boykopovar/AnyPS5/blob/19bb30cee8eb33057a9c0e59c9a04181018f26e6/core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp#L139) | | | 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 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 4650](https://www.github.com/boykopovar/AnyPS5/pull/4650) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp` | | [PR 5058](https://www.github.com/boykopovar/AnyPS5/pull/5058) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5115](https://www.github.com/boykopovar/AnyPS5/pull/5115) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/ScalarCall.cpp` | | [PR 6134](https://www.github.com/boykopovar/AnyPS5/pull/6134) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6223](https://www.github.com/boykopovar/AnyPS5/pull/6223) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6273](https://www.github.com/boykopovar/AnyPS5/pull/6273) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6472](https://www.github.com/boykopovar/AnyPS5/pull/6472) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6529](https://www.github.com/boykopovar/AnyPS5/pull/6529) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6549](https://www.github.com/boykopovar/AnyPS5/pull/6549) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6563](https://www.github.com/boykopovar/AnyPS5/pull/6563) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6741](https://www.github.com/boykopovar/AnyPS5/pull/6741) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6786](https://www.github.com/boykopovar/AnyPS5/pull/6786) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6867](https://www.github.com/boykopovar/AnyPS5/pull/6867) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp`<br>`core/shader/recompiler/ControlFlow/src/GraphBuilder.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7002](https://www.github.com/boykopovar/AnyPS5/pull/7002) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7085](https://www.github.com/boykopovar/AnyPS5/pull/7085) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7390](https://www.github.com/boykopovar/AnyPS5/pull/7390) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7426](https://www.github.com/boykopovar/AnyPS5/pull/7426) | `docs/dev/debt/libSceAgcDriver.md` |
tv7 commented 2026-10-15 16:31:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tv7 on 2026-10-15T16:31:50Z.


Silent Hill: Townfall (PPSA33286) on Windows, real hardware, before and after this PR, as promised on #4706.

Setup: Windows 11, WinLibs GCC 15.2, Release, RTX 3070 8 GB (NVIDIA), i7-11700KF. Before = main ff23657f3. After = the same main merged with this head d1a68c4ae (clean merge). Same build directory, ANYPS5_NO_SHADER_CACHE=1, 900 s limit, no input.

main ff23657f3 main + this PR
Runs 3 5
Stops on the FS-table call 3 of 3, after about 2.5 min 0 of 5
Reach the 900 s limit 0 of 3 4 of 5
Other stop none 1 run: render-thread timeout (below)

Before, every run ends with:

[videoout] presentation failed: compute shader 0x16402c0500: ... computed/data-dependent s_swappc_b64 call target at program counter 0x00000134 is not statically resolvable

followed by terminate / SIGABRT. The shader address changes between runs (0x16402c0500, 0x16402c0000, 0x16402d0000), always program counter 0x134. With the PR, not statically resolvable does not appear in any of the 5 runs.

The one failing run with the PR: after about 4.5 min a WAIT_REG_MEM_64 on queue 0x20 times out, then GameThread timed out waiting for RenderThread after 120.00 secs (frame 462), then an access violation in libc while the title writes that error. I have seen the same render-thread timeout on this title before, on an older stack with #5176, and it did not come back in the other 4 runs, so I don't think it comes from this PR.

The runs that reach 900 s log about 500-650 deferred write-back failed: BDA access failed ... instruction=0x7bc ... reason=7 at unaligned addresses. These look like the unaligned atomic faults from #6117 and are outside this PR.

ctest on the merge: all pass except agc_driver_store_over_untracked and guest_kqueue, which fail the same way on plain main ff23657f3 on this machine. agc_driver_compute_fs_table_calls and scalar_call pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6197084004 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6160#issuecomment-6197084004). Originally posted by [tv7](https://github.com/tv7) on 2026-10-15T16:31:50Z. --- Silent Hill: Townfall (PPSA33286) on Windows, real hardware, before and after this PR, as promised on #4706. Setup: Windows 11, WinLibs GCC 15.2, Release, RTX 3070 8 GB (NVIDIA), i7-11700KF. Before = `main` ff23657f3. After = the same `main` merged with this head d1a68c4ae (clean merge). Same build directory, `ANYPS5_NO_SHADER_CACHE=1`, 900 s limit, no input. | | `main` ff23657f3 | `main` + this PR | |---|---|---| | Runs | 3 | 5 | | Stops on the FS-table call | 3 of 3, after about 2.5 min | 0 of 5 | | Reach the 900 s limit | 0 of 3 | 4 of 5 | | Other stop | none | 1 run: render-thread timeout (below) | Before, every run ends with: ``` [videoout] presentation failed: compute shader 0x16402c0500: ... computed/data-dependent s_swappc_b64 call target at program counter 0x00000134 is not statically resolvable ``` followed by `terminate` / SIGABRT. The shader address changes between runs (0x16402c0500, 0x16402c0000, 0x16402d0000), always program counter 0x134. With the PR, `not statically resolvable` does not appear in any of the 5 runs. The one failing run with the PR: after about 4.5 min a `WAIT_REG_MEM_64` on queue 0x20 times out, then `GameThread timed out waiting for RenderThread after 120.00 secs` (frame 462), then an access violation in libc while the title writes that error. I have seen the same render-thread timeout on this title before, on an older stack with #5176, and it did not come back in the other 4 runs, so I don't think it comes from this PR. The runs that reach 900 s log about 500-650 `deferred write-back failed: BDA access failed ... instruction=0x7bc ... reason=7` at unaligned addresses. These look like the unaligned atomic faults from #6117 and are outside this PR. ctest on the merge: all pass except `agc_driver_store_over_untracked` and `guest_kqueue`, which fail the same way on plain `main` ff23657f3 on this machine. `agc_driver_compute_fs_table_calls` and `scalar_call` pass.
mrfelek commented 2026-10-16 14:16:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrfelek on 2026-10-16T14:16:47Z.


Hot Wheels Infinite Rush (PPSA22408), another Milestone title: same abort as #6117, gone with this PR

Setup

  • Linux (Ubuntu), GCC 15.3, Release, Ryzen 9 5950X, RTX 3080 Ti, NVIDIA 615.71.09
  • Before: main 5d9dcc42d. After: the same main merged with this head d1a68c4ae (clean merge)
  • Relinked with the title's own prx/ modules (eossdk-ps5-shipping.prx and the kitt modules). X pressed every 2 s from start-up.

Before (without this PR)

  • Under gdb the title aborts at the same PC as MXGP 26 in #6117:
    ShaderRecompiler::Recompile: computed/data-dependent s_swappc_b64 call target at program counter 0x00000134 is not statically resolvable
    
  • A run without gdb stopped at the same point (after the boot screens) with exit 139 and no message.

After (with this PR)

Run Result s_swappc_b64 abort
1 Reached the loading screen, stopped by our 7-minute cap no
2 Aborted early: storing storage image results pending over memory outside the write watch ... is not implemented (also seen once on main without this PR) no
3 (APS5_STORE_AT_FLIP=1) Loaded slowly for about 9 minutes, then ran out of device memory (vkAllocateMemory device buffer ... Vulkan result -2) while storage images kept growing no

The two failures after the PR are storage-image memory problems, not related to this change. The s_swappc_b64 abort did not appear in any run with this PR.

AI-assisted: this comment was drafted with the help of Claude Code and checked against the logs by us.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6217458136 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6160#issuecomment-6217458136). Originally posted by [mrfelek](https://github.com/mrfelek) on 2026-10-16T14:16:47Z. --- ## Hot Wheels Infinite Rush (PPSA22408), another Milestone title: same abort as #6117, gone with this PR **Setup** - Linux (Ubuntu), GCC 15.3, Release, Ryzen 9 5950X, RTX 3080 Ti, NVIDIA 615.71.09 - Before: `main` `5d9dcc42d`. After: the same `main` merged with this head `d1a68c4ae` (clean merge) - Relinked with the title's own `prx/` modules (`eossdk-ps5-shipping.prx` and the `kitt` modules). X pressed every 2 s from start-up. **Before (without this PR)** - Under gdb the title aborts at the same PC as MXGP 26 in #6117: ``` ShaderRecompiler::Recompile: computed/data-dependent s_swappc_b64 call target at program counter 0x00000134 is not statically resolvable ``` - A run without gdb stopped at the same point (after the boot screens) with exit 139 and no message. **After (with this PR)** | Run | Result | `s_swappc_b64` abort | |---|---|---| | 1 | Reached the loading screen, stopped by our 7-minute cap | no | | 2 | Aborted early: `storing storage image results pending over memory outside the write watch ... is not implemented` (also seen once on `main` without this PR) | no | | 3 (`APS5_STORE_AT_FLIP=1`) | Loaded slowly for about 9 minutes, then ran out of device memory (`vkAllocateMemory device buffer ... Vulkan result -2`) while storage images kept growing | no | The two failures after the PR are storage-image memory problems, not related to this change. The `s_swappc_b64` abort did not appear in any run with this PR. AI-assisted: this comment was drafted with the help of Claude Code and checked against the logs by us.
ps54all commented 2026-10-18 05:34:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ps54all on 2026-10-18T05:34:55Z.


Tested on God of War Ragnarök (PPSA08330, 06.006.000): the computed s_swappc_b64 stop is gone.

  • Setup: Windows 11, RTX 3080 10 GB (NVIDIA 610.74), i9-10850K, WinLibs GCC 15.2, Release. Our test branch (main 82f0c9aec + #6946 + #6958 + #7238 + #7223 + #6277 + #6417 + #7300 and a few open picks), with and without this PR; cold shader cache in both.
  • Without: dies ~400 s, computed/data-dependent s_swappc_b64 call target at program counter 0x00004044 is not statically resolvable (compute shader 0x10527b8200).
  • With: that line is gone; the same shader then stops at 438 s on ds_ordered_count at pc 16504: ordered swap is not modeled, a separate gap (we have a local change for it and will open a PR). With both, alive for the full 720 s run. Four other shaders still log could not be prepared at registration (its s_swappc_b64 at program counter 0x74 calls a computed target); preparing it when it is used, and none of them stops the run.
  • The window stays black at ~0.1 FPS, so this is only about the stop. One run per build.

Tested and written with Claude Code (AI assistant) on a contributor's machine.


Generated by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6246150074 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6160#issuecomment-6246150074). Originally posted by [ps54all](https://github.com/ps54all) on 2026-10-18T05:34:55Z. --- Tested on God of War Ragnarök (PPSA08330, 06.006.000): the computed `s_swappc_b64` stop is gone. - **Setup:** Windows 11, RTX 3080 10 GB (NVIDIA 610.74), i9-10850K, WinLibs GCC 15.2, Release. Our test branch (main `82f0c9aec` + #6946 + #6958 + #7238 + #7223 + #6277 + #6417 + #7300 and a few open picks), with and without this PR; cold shader cache in both. - **Without:** dies ~400 s, `computed/data-dependent s_swappc_b64 call target at program counter 0x00004044 is not statically resolvable` (compute shader `0x10527b8200`). - **With:** that line is gone; the same shader then stops at 438 s on `ds_ordered_count at pc 16504: ordered swap is not modeled`, a separate gap (we have a local change for it and will open a PR). With both, alive for the full 720 s run. Four other shaders still log `could not be prepared at registration (its s_swappc_b64 at program counter 0x74 calls a computed target); preparing it when it is used`, and none of them stops the run. - The window stays black at ~0.1 FPS, so this is only about the stop. One run per build. *Tested and written with Claude Code (AI assistant) on a contributor's machine.* --- _Generated by [Claude Code](https://claude.ai/code)_
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!6160
No description provided.