Mafia: The Old Country (PPSA14299): a 873,515-word compute pipeline takes 37 s on AMD and Unreal's 120 s render-thread watchdog ends the title #12089

Open
opened 2026-10-27 20:14:30 +00:00 by BunnyFl · 0 comments
BunnyFl commented 2026-10-27 20:14:30 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-10-27T20:14:30Z.


What happens

Mafia: The Old Country stops on a black screen after "press any button" with LowLevelFatalError [File:.\Runtime/RenderCore/Private/RenderingThread.cpp] [Line: 1254] GameThread timed out waiting for RenderThread after 120.00 secs: the queue worker is building the pipeline of compute shader 0x1d80027000, 873,515 SPIR-V words, which takes 37 s on AMD.

Title, test or build step

Mafia: The Old Country (PPSA14299) 01.011.000, Unreal Engine 5

AnyPS5 commit

main 594214f733 with #11575, #11900 and #11580 merged on top, plus a local change: sceHttp2SendRequest and sceHttp2SendRequestAsync return 0x80436063 (the network error they returned before #10167) for an HTTP/1.x request instead of throwing, so the title runs offline. Without the local change it stops 13 s in at sceHttp2SendRequest: HTTP/1.x transport is not implemented (#11611); without #11580 it stops 33 s in at compute shader 0x1d80027000: reads or writes a converted float image with 16-bit data, which is not implemented.

System

Windows 11 Pro 10.0.26200, AMD Radeon RX 9070 XT (driver 32.0.32015.7029), Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7, Release.

Steps to reproduce

Relink with relinker --windows --registry src/eboot.bin app.exe (with --module-dir prx the relinker fails with Duplicate guest module directory). Run with APS5_PROFILE_DRAW=1 APS5_LOG_TIMESTAMPS=1 APS5_TRACE_SUMMARY_EVERY=10 APS5_STALL_WATCHDOG_SECS=20, press through the health warning, terms of service and brightness screens, then any button at the start screen. The black screen follows at once; the title ends about 120 s later.

Log

[dispatch] creating a pipeline for 873515 SPIR-V words (program 0x1d80027000)
[pm4 ring] queue 0x20 order behind queue 0 for event 0xf4fd8 has not progressed for 20 s (APS5_STALL_WATCHDOG_SECS): 2 queue(s), up to 16 submissions each, oldest first
LowLevelFatalError [File:.\Runtime/RenderCore/Private/RenderingThread.cpp] [Line: 1254]
GameThread timed out waiting for RenderThread after 120.00 secs

No created a pipeline line for that program follows.

What was checked

Where the size comes from. The request saved with APS5_DUMP_SHADERS (shader_1d80027000.req) recompiles in agc_shader_replay to 876,506 SPIR-V words from 12,916 code words (68 words per code word; the median over 107 other requests of the same run is 24). The program has 6,691 instructions, among them 100 MIMG (28 writes, 60 reads and 12 samples in the IR), 1,051 DS and 825 VOP3P. A local count of the words emitted per IR opcode (before the SPIR-V optimizer) gives 1.36 M words for the 28 ImageWrites: their images are table images, so EmitImage emits one OpSwitch case per mode of ResourceMaterializer::RuntimeImageModes, and EmitWriteOp ran 1,640 times for the 28 writes (58.6 per write, about 770 words of StoreTexel each). #8716 (merging identical modes) leaves the module at 876,506 words: the modes differ in their format conversion. Moving the mode-independent part of StoreTexel before the switch did not change the optimized module either, so the remaining words are the per-mode conversions.

Compile time. The pipeline captured with APS5_DUMP_COMPUTE_PIPELINES replays in agc_compute_pipeline_replay with a fresh application cache in 36.5 to 37.0 s of pipeline_create for each of its four variants (873,515 words, 3 specialization constants); a repeat of one variant takes 2 ms (driver cache). In the title the build of 0x1d80027000 did not finish within the 120 s once, and took 37,035 ms in a later run, which then reached the main menu.

After New Game that later run built 61 more compute pipelines of 100,000 to 250,000 words (mean 159,566) in 123.3 s, about 2 s each and at most 3.9 s, while queue 0 ran 5 to 28 DISPATCH_INDIRECT per 10 s; no frame was presented in those 150 s. Three of them replayed from saved requests: 0x1c0019d000 (wave64, 6,528 code words) recompiles to 260,187 words, 0x1bc01e6000 (wave64, 5,544) to 233,237, 0x1b8155e000 (wave32, 4,324) to 167,659, about 40 words per code word. Their size is spread over memory accesses, not table images: in 0x1c0019d000 (446,403 words before the optimizer) 12 ImageReads emit 85,424 words, 40 LoadBufferU32x4 70,000, 19 LoadBufferU32x3 25,536, 40 LoadBufferU32 21,124 and 7,238 SelectU32 43,428. In the next run the 873,515-word variants were built in 10 to 32 ms (driver cache) and the title reached the menu at about 50 s instead of 110 s; after New Game it still built compute pipelines (157 in the run, 79.3 s in total), and the longest stalls were graphics pipelines: the [draws] line's pipeline phase took 14,349 ms for 146 draws in one 10 s window, one draw 8,677 ms.

Coral Island (PPSA17226 01.003.004, Unreal Engine 4), same machine and main 594214f733, ends the same way, LowLevelFatalError [File:Unknown] [Line: 1209] with GameThread timed out waiting for RenderThread after 120.00 secs, about 230 s after start by Unreal's own log time. There the time goes to graphics pipeline creation on queue 0: the [draws] line's pipeline phase took 7.1 to 12.4 s in 18 of its 22 10 s windows, the longest single draw 3.0 s, and in the last six windows queue 0 ran only 6 to 15 DRAW_INDEX_OFFSET_2 per 10 s. The 46 requests APS5_DUMP_SHADERS saved in a 120 s run are all compute shaders (at most 44,540 words), so the size of its graphics modules is not measured here.

The same consequence of large compute pipelines on AMD is in #6118 (FSR4 showcase) and #6742 (ProsperoAI); #4977 was a size from f32 denormal emulation on Intel.

Question: would you rather shrink the code emitted per image and buffer access (for table images, for example one SPIR-V function per runtime image mode called from each access, or a mode set narrowed to the descriptors a title registers), or keep large builds off the paths a title's render thread waits for?

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6066927309 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/12089). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-10-27T20:14:30Z. --- ### What happens Mafia: The Old Country stops on a black screen after "press any button" with `LowLevelFatalError [File:.\Runtime/RenderCore/Private/RenderingThread.cpp] [Line: 1254] GameThread timed out waiting for RenderThread after 120.00 secs`: the queue worker is building the pipeline of compute shader `0x1d80027000`, 873,515 SPIR-V words, which takes 37 s on AMD. ### Title, test or build step Mafia: The Old Country (PPSA14299) 01.011.000, Unreal Engine 5 ### AnyPS5 commit `main` `594214f733` with #11575, #11900 and #11580 merged on top, plus a local change: `sceHttp2SendRequest` and `sceHttp2SendRequestAsync` return `0x80436063` (the network error they returned before #10167) for an HTTP/1.x request instead of throwing, so the title runs offline. Without the local change it stops 13 s in at `sceHttp2SendRequest: HTTP/1.x transport is not implemented` (#11611); without #11580 it stops 33 s in at `compute shader 0x1d80027000: reads or writes a converted float image with 16-bit data, which is not implemented`. ### System Windows 11 Pro 10.0.26200, AMD Radeon RX 9070 XT (driver 32.0.32015.7029), Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7, Release. ### Steps to reproduce Relink with `relinker --windows --registry src/eboot.bin app.exe` (with `--module-dir prx` the relinker fails with `Duplicate guest module directory`). Run with `APS5_PROFILE_DRAW=1 APS5_LOG_TIMESTAMPS=1 APS5_TRACE_SUMMARY_EVERY=10 APS5_STALL_WATCHDOG_SECS=20`, press through the health warning, terms of service and brightness screens, then any button at the start screen. The black screen follows at once; the title ends about 120 s later. ### Log ``` [dispatch] creating a pipeline for 873515 SPIR-V words (program 0x1d80027000) [pm4 ring] queue 0x20 order behind queue 0 for event 0xf4fd8 has not progressed for 20 s (APS5_STALL_WATCHDOG_SECS): 2 queue(s), up to 16 submissions each, oldest first LowLevelFatalError [File:.\Runtime/RenderCore/Private/RenderingThread.cpp] [Line: 1254] GameThread timed out waiting for RenderThread after 120.00 secs ``` No `created a pipeline` line for that program follows. ### What was checked **Where the size comes from.** The request saved with `APS5_DUMP_SHADERS` (`shader_1d80027000.req`) recompiles in `agc_shader_replay` to 876,506 SPIR-V words from 12,916 code words (68 words per code word; the median over 107 other requests of the same run is 24). The program has 6,691 instructions, among them 100 MIMG (28 writes, 60 reads and 12 samples in the IR), 1,051 DS and 825 VOP3P. A local count of the words emitted per IR opcode (before the SPIR-V optimizer) gives 1.36 M words for the 28 `ImageWrite`s: their images are table images, so `EmitImage` emits one `OpSwitch` case per mode of `ResourceMaterializer::RuntimeImageModes`, and `EmitWriteOp` ran 1,640 times for the 28 writes (58.6 per write, about 770 words of `StoreTexel` each). #8716 (merging identical modes) leaves the module at 876,506 words: the modes differ in their format conversion. Moving the mode-independent part of `StoreTexel` before the switch did not change the optimized module either, so the remaining words are the per-mode conversions. **Compile time.** The pipeline captured with `APS5_DUMP_COMPUTE_PIPELINES` replays in `agc_compute_pipeline_replay` with a fresh application cache in 36.5 to 37.0 s of `pipeline_create` for each of its four variants (873,515 words, 3 specialization constants); a repeat of one variant takes 2 ms (driver cache). In the title the build of `0x1d80027000` did not finish within the 120 s once, and took 37,035 ms in a later run, which then reached the main menu. **After New Game** that later run built 61 more compute pipelines of 100,000 to 250,000 words (mean 159,566) in 123.3 s, about 2 s each and at most 3.9 s, while queue 0 ran 5 to 28 `DISPATCH_INDIRECT` per 10 s; no frame was presented in those 150 s. Three of them replayed from saved requests: `0x1c0019d000` (wave64, 6,528 code words) recompiles to 260,187 words, `0x1bc01e6000` (wave64, 5,544) to 233,237, `0x1b8155e000` (wave32, 4,324) to 167,659, about 40 words per code word. Their size is spread over memory accesses, not table images: in `0x1c0019d000` (446,403 words before the optimizer) 12 `ImageRead`s emit 85,424 words, 40 `LoadBufferU32x4` 70,000, 19 `LoadBufferU32x3` 25,536, 40 `LoadBufferU32` 21,124 and 7,238 `SelectU32` 43,428. In the next run the 873,515-word variants were built in 10 to 32 ms (driver cache) and the title reached the menu at about 50 s instead of 110 s; after New Game it still built compute pipelines (157 in the run, 79.3 s in total), and the longest stalls were graphics pipelines: the `[draws]` line's pipeline phase took 14,349 ms for 146 draws in one 10 s window, one draw 8,677 ms. **Coral Island** (PPSA17226 01.003.004, Unreal Engine 4), same machine and `main` `594214f733`, ends the same way, `LowLevelFatalError [File:Unknown] [Line: 1209]` with `GameThread timed out waiting for RenderThread after 120.00 secs`, about 230 s after start by Unreal's own log time. There the time goes to graphics pipeline creation on queue 0: the `[draws]` line's pipeline phase took 7.1 to 12.4 s in 18 of its 22 10 s windows, the longest single draw 3.0 s, and in the last six windows queue 0 ran only 6 to 15 `DRAW_INDEX_OFFSET_2` per 10 s. The 46 requests `APS5_DUMP_SHADERS` saved in a 120 s run are all compute shaders (at most 44,540 words), so the size of its graphics modules is not measured here. The same consequence of large compute pipelines on AMD is in #6118 (FSR4 showcase) and #6742 (ProsperoAI); #4977 was a size from f32 denormal emulation on Intel. **Question:** would you rather shrink the code emitted per image and buffer access (for table images, for example one SPIR-V function per runtime image mode called from each access, or a mode set narrowed to the descriptors a title registers), or keep large builds off the paths a title's render thread waits for? AI-assisted: yes
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#12089
No description provided.