Marvel's Spider-Man Remastered (PPSA01467): a compute shader's waterfall call through a 16-byte table record is not statically resolvable #14168

Closed
opened 2026-10-31 21:53:06 +00:00 by ycbuzi · 0 comments
ycbuzi commented 2026-10-31 21:53:06 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by ycbuzi on 2026-10-31T21:53:06Z.


What happens

Marvel's Spider-Man Remastered (PPSA01467, 01.008.001) stops on main shortly after its first frames:

compute shader 0x11529a5900: shader 0x11529a5900 stage 0: ShaderRecompiler::Recompile: computed/data-dependent s_swappc_b64 call target at program counter 0x0000136c is not statically resolvable

Setup

main 5f1851e810, Windows 11, Ryzen 9 7900, RTX 4070 SUPER (NVIDIA 616.92), WinLibs GCC 15.2.0, Release, APS5_PLAYGO_UNLISTED_CHUNKS=installed. It's the same stop on 93d727afc5 (main with #11580). The program address changes between runs (0x11527c6100, 0x11529aa800, 0x11529a5900, 0x11529a2700), and the counter is 0x136c each time. It stops 30 to 182 s in, after 0 to 198 frames, sooner with a warm cache. Nobody played these runs, and nothing was pressed in the last one.

The call

The program is 0x277c bytes, and this is its only s_swappc_b64. From APS5_DUMP_SHADERS=1 (shader_11529a2700_failed.req). The right-hand side is my reading of the words by hand, not a disassembler's output:

0x1330 7e100548          v_readfirstlane_b32 s8, v72
0x1338 7d849008          v_cmp_eq_u32 vcc, s8, v72
0x133c bed2246a          s_and_saveexec_b64 s82, vcc
0x1340 bf88000b          s_cbranch_execz +11
0x1348 8f6a8408          s_lshl_b32 vcc_lo, s8, 4
0x1350 f4280224 d4000000 s_buffer_load_dwordx4 s8, s[72:75], vcc_lo
0x135c be8e0308          s_mov_b32 s14, s8
0x1360 be8f0309          s_mov_b32 s15, s9
0x1364 be90030a          s_mov_b32 s16, s10
0x1368 be91030b          s_mov_b32 s17, s11
0x136c be8e210e          s_swappc_b64 s[14:15], s[14:15]
0x1370 befe0452          s_or_b64 exec, exec, s82 (restores the mask, as I read it)
0x1374 bf82ffec          s_branch -20

So this looks like a waterfall loop over a per-thread function index in v72. Each pass takes one index, loads a 16-byte record at index * 16 from the buffer in s[72:75], and calls the record's first two dwords as the target. The table index comes from the shader's data, not from user data or a constant.

What I checked

  • Other PRs and issues: closed #2207, #3271, #3274 and #6117 have the same message. Open #8140 handles a different refusal (a table callee that reads its program counter) and conflicts with main, so I couldn't try it.
  • Not checked: why FindTableCalls doesn't take this call, what's in the table, or how many entries it has. I haven't confirmed that dumping the table would give a closed set of targets.

The build uses a backport's fake-signed eboot.bin with the game's own data, version-matched. I still have the full request file and logs, so tell me if a specific part helps.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6140176705 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/14168). Originally posted by [ycbuzi](https://github.com/ycbuzi) on 2026-10-31T21:53:06Z. --- ### What happens Marvel's Spider-Man Remastered (PPSA01467, 01.008.001) stops on `main` shortly after its first frames: ``` compute shader 0x11529a5900: shader 0x11529a5900 stage 0: ShaderRecompiler::Recompile: computed/data-dependent s_swappc_b64 call target at program counter 0x0000136c is not statically resolvable ``` ### Setup `main` `5f1851e810`, Windows 11, Ryzen 9 7900, RTX 4070 SUPER (NVIDIA 616.92), WinLibs GCC 15.2.0, Release, `APS5_PLAYGO_UNLISTED_CHUNKS=installed`. It's the same stop on `93d727afc5` (`main` with #11580). The program address changes between runs (`0x11527c6100`, `0x11529aa800`, `0x11529a5900`, `0x11529a2700`), and the counter is 0x136c each time. It stops 30 to 182 s in, after 0 to 198 frames, sooner with a warm cache. Nobody played these runs, and nothing was pressed in the last one. ### The call The program is 0x277c bytes, and this is its only `s_swappc_b64`. From `APS5_DUMP_SHADERS=1` (`shader_11529a2700_failed.req`). The right-hand side is my reading of the words by hand, not a disassembler's output: ``` 0x1330 7e100548 v_readfirstlane_b32 s8, v72 0x1338 7d849008 v_cmp_eq_u32 vcc, s8, v72 0x133c bed2246a s_and_saveexec_b64 s82, vcc 0x1340 bf88000b s_cbranch_execz +11 0x1348 8f6a8408 s_lshl_b32 vcc_lo, s8, 4 0x1350 f4280224 d4000000 s_buffer_load_dwordx4 s8, s[72:75], vcc_lo 0x135c be8e0308 s_mov_b32 s14, s8 0x1360 be8f0309 s_mov_b32 s15, s9 0x1364 be90030a s_mov_b32 s16, s10 0x1368 be91030b s_mov_b32 s17, s11 0x136c be8e210e s_swappc_b64 s[14:15], s[14:15] 0x1370 befe0452 s_or_b64 exec, exec, s82 (restores the mask, as I read it) 0x1374 bf82ffec s_branch -20 ``` So this looks like a waterfall loop over a per-thread function index in `v72`. Each pass takes one index, loads a 16-byte record at `index * 16` from the buffer in `s[72:75]`, and calls the record's first two dwords as the target. The table index comes from the shader's data, not from user data or a constant. ### What I checked - **Other PRs and issues:** closed #2207, #3271, #3274 and #6117 have the same message. Open #8140 handles a different refusal (a table callee that reads its program counter) and conflicts with `main`, so I couldn't try it. - **Not checked:** why `FindTableCalls` doesn't take this call, what's in the table, or how many entries it has. I haven't confirmed that dumping the table would give a closed set of targets. The build uses a backport's fake-signed `eboot.bin` with the game's own data, version-matched. I still have the full request file and logs, so tell me if a specific part helps. AI-assisted: yes (Claude Code)
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#14168
No description provided.