GTA V: the prologue plays (testing branch of the PRs it needs) #426

Closed
MichonGoddijn231849 wants to merge 31 commits from upstream-pr/426 into main
MichonGoddijn231849 commented 2026-10-03 00:00:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-03T00:00:31Z.


What

GTA V (PPSA04264) now plays its North Yankton prologue at about 10 fps, with music, speech, sound effects and the HUD:

GTA V prologue

This builds on @STL1te's #153 (and #144 before it), which boots the game with its own sce_module into the Story Mode load. @oneandonlydean's #276, #277, #303, #408 and #415 are a large part of the speed and correctness here. Thank you both.

This PR is for testing, not for merging. Every change in it is its own PR below, each with its own description and tests. This branch is current main with all of them merged, plus the merge resolutions between them. Once they land, this PR closes.

What it takes

Rendering:

  • #294 color targets with gaps between MRT slots, depth array slices (merged)
  • #293 null sampled descriptors
  • #295 packed pixel ancillary as SampleId/Layer, Z export formats
  • #373 a replaced device's unit shadows (merged)
  • #374 depth fast clears through HTILE
  • #375 fragment SampleId, Layer, FragDepth and SampleMask interfaces
  • #376 depth bounds and depth bias (merged)
  • #377 4 KiB standard color targets and one-slice color views
  • #394 mipmapped 3D textures (merged)
  • #395 image_sample_cd
  • #411 v_writelane_b32 ignores EXEC (merged)
  • #419 multisampled targets with CB resolves (the reflection cube)
  • #423 vertex clip and cull distances (reflections, glass)
  • #425 depth surfaces read as textures and storage images
  • #448 single-sample sample masks as a per-quad-pixel discard
  • #449 rendering into one depth slice of a 3D color target
  • #499 v_mov_b32 SDWA byte destinations (an intermittent abort during boot)
  • @oneandonlydean's #303 (merged): texel offsets the guest computes

Audio:

  • #420 AJM decode jobs fit the 64-byte batch (music and speech) (merged)

Memory:

  • #290 host import windows, least-recent eviction, a budget from RAM, out-of-memory recovery

Performance, from 1.5 to about 10 fps in the prologue:

  • #493 draw cache keyed on the user words each stage reads, and #494 data-only draw hits (split from #291)
  • #401 buffer pool keyed slots (merged)
  • #403 pending-image range index (merged)
  • #404 color swizzle tables built once (merged)
  • #422 memoized draw-stage source failures (merged)
  • #424 draw templates rebind moved buffers (merged)
  • @oneandonlydean's #408 (flat queue registers) and #415 (flat SRT memo)

Story Mode is an add-on entitlement. Listing GTAVSTORYMODE001 in anyps5-entitlements.ini (the #153 mechanism) enables "Resume Story".

Not done yet

  • About 10 fps. Most of each frame is the CPU recording draws (~60 µs per draw packet), not the GPU.
  • The first run after a recompiler change rebuilds the shader cache and hangs for a while before rendering.

Tested

Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB DDR5-5600, MinGW-w64 GCC 15.2.0.

  • GTA V PPSA04264 (01.005), relinked with its own sce_module. On this exact branch: Main menu → Resume Story → the prologue plays at about 10 fps. Rendering, reflections, music, speech and sound effects are correct. No draws are refused.
  • ctest: all tests pass.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR (this is the combined testing branch; each topic is its own PR above)
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (the screenshot is hosted outside it)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: every PR listed above
  • AI-assisted: yes. Written with Claude (Anthropic) under my direction; I reviewed and tested it.

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4722717272 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/426). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-03T00:00:31Z. --- ### What GTA V (PPSA04264) now plays its North Yankton prologue at about 10 fps, with music, speech, sound effects and the HUD: ![GTA V prologue](https://raw.githubusercontent.com/MichonGoddijn231849/AnyPS5-fork/pr-assets/gta-prologue-playable.png) This builds on @STL1te's #153 (and #144 before it), which boots the game with its own `sce_module` into the Story Mode load. @oneandonlydean's #276, #277, #303, #408 and #415 are a large part of the speed and correctness here. Thank you both. **This PR is for testing, not for merging.** Every change in it is its own PR below, each with its own description and tests. This branch is current `main` with all of them merged, plus the merge resolutions between them. Once they land, this PR closes. #### What it takes Rendering: - #294 color targets with gaps between MRT slots, depth array slices (merged) - #293 null sampled descriptors - #295 packed pixel ancillary as SampleId/Layer, Z export formats - #373 a replaced device's unit shadows (merged) - #374 depth fast clears through HTILE - #375 fragment SampleId, Layer, FragDepth and SampleMask interfaces - #376 depth bounds and depth bias (merged) - #377 4 KiB standard color targets and one-slice color views - #394 mipmapped 3D textures (merged) - #395 `image_sample_cd` - #411 `v_writelane_b32` ignores EXEC (merged) - #419 multisampled targets with CB resolves (the reflection cube) - #423 vertex clip and cull distances (reflections, glass) - #425 depth surfaces read as textures and storage images - #448 single-sample sample masks as a per-quad-pixel discard - #449 rendering into one depth slice of a 3D color target - #499 `v_mov_b32` SDWA byte destinations (an intermittent abort during boot) - @oneandonlydean's #303 (merged): texel offsets the guest computes Audio: - #420 AJM decode jobs fit the 64-byte batch (music and speech) (merged) Memory: - #290 host import windows, least-recent eviction, a budget from RAM, out-of-memory recovery Performance, from 1.5 to about 10 fps in the prologue: - #493 draw cache keyed on the user words each stage reads, and #494 data-only draw hits (split from #291) - #401 buffer pool keyed slots (merged) - #403 pending-image range index (merged) - #404 color swizzle tables built once (merged) - #422 memoized draw-stage source failures (merged) - #424 draw templates rebind moved buffers (merged) - @oneandonlydean's #408 (flat queue registers) and #415 (flat SRT memo) Story Mode is an add-on entitlement. Listing `GTAVSTORYMODE001` in `anyps5-entitlements.ini` (the #153 mechanism) enables "Resume Story". #### Not done yet - About 10 fps. Most of each frame is the CPU recording draws (~60 µs per draw packet), not the GPU. - The first run after a recompiler change rebuilds the shader cache and hangs for a while before rendering. ### Tested Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB DDR5-5600, MinGW-w64 GCC 15.2.0. - GTA V PPSA04264 (01.005), relinked with its own `sce_module`. On this exact branch: Main menu → Resume Story → the prologue plays at about 10 fps. Rendering, reflections, music, speech and sound effects are correct. No draws are refused. - `ctest`: all tests pass. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [ ] One topic per PR; follow-ups go in a new PR (this is the combined testing branch; each topic is its own PR above) - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository (the screenshot is hosted outside it) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: every PR listed above - [x] AI-assisted: yes. Written with Claude (Anthropic) under my direction; I reviewed and tested it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
oneandonlydean commented 2026-10-03 00:34:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-03T00:34:36Z.


Nice work! I have more performance fixes coming real soon!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5963674810 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/426#issuecomment-5963674810). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-03T00:34:36Z. --- Nice work! I have more performance fixes coming real soon!
github-actions[bot] commented 2026-10-03 05:20:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-03T05:20:14Z.


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
#375 core/libs/tests/PixelAncillary.cpp
#419 core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp
#423 core/libs/tests/PixelAncillary.cpp
#448 core/libs/prx/libSceAgcDriver/tests/execution/QuadPixelMask.cpp
core/libs/tests/PixelAncillary.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5965896725 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/426#issuecomment-5965896725). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-03T05:20:14Z. --- <!-- 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 | |---|---|---|---| | #375 | | | `core/libs/tests/PixelAncillary.cpp` | | #419 | | | `core/libs/prx/libSceAgcDriver/Graphics/include/MultisampleTarget.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/MultisampleTarget.cpp` | | #423 | | | `core/libs/tests/PixelAncillary.cpp` | | #448 | | | `core/libs/prx/libSceAgcDriver/tests/execution/QuadPixelMask.cpp`<br>`core/libs/tests/PixelAncillary.cpp` |
RomainROCH commented 2026-10-04 03:39:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by RomainROCH on 2026-10-04T03:39:26Z.


Hi! I’m preparing to reproduce your GTA V prologue results with PPSA04264 v01.005. Could you share the exact app/content version and a reference manifest with file paths, sizes and SHA-256 hashes, particularly for eboot.bin, sce_sys/param.json and the bundled sce_module files?
It would also help to know which integration commit you tested and whether any game files or modules were modified. I’m only asking for metadata and hashes, not game files, so I can check that my input matches your test setup. Thanks!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5976229452 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/426#issuecomment-5976229452). Originally posted by [RomainROCH](https://github.com/RomainROCH) on 2026-10-04T03:39:26Z. --- Hi! I’m preparing to reproduce your GTA V prologue results with PPSA04264 v01.005. Could you share the exact app/content version and a reference manifest with file paths, sizes and SHA-256 hashes, particularly for eboot.bin, sce_sys/param.json and the bundled sce_module files? It would also help to know which integration commit you tested and whether any game files or modules were modified. I’m only asking for metadata and hashes, not game files, so I can check that my input matches your test setup. Thanks!
MichonGoddijn231849 commented 2026-10-04 08:13:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-04T08:13:07Z.


Sure. This is the dump I tested with: PPSA04264, contentId UP1004-PPSA04264_00-GTAVFULLGAMEDISC, contentVersion 01.005.000, masterVersion 01.00.

SHA-256 Size File
60d394626ac62acd1b20d205599b104bb51756d468d3878ad14c230bfe305c11 66008859 eboot.bin
630cb5995d8665b0b970d45d6ed651806b0d1b47cefa6f2f9315c0b7ef1ac4fc 4382 sce_sys/param.json
be3b3847848b9f65a4ba880aea3dfdb0ab3b068036d187f4b63aa965000b8323 1285266 sce_module/libc.prx
d1e448d45fe3b36127430e642d85a2e0d6528b554123c913a2655d014668b1a0 1334234 sce_module/libc.prx.esbak
09a3c5f4d3f7a50eda117891ebd12973e57df38c24a896a339a691c7177f5f5f 71654 sce_module/libSceJobManager.prx
59d52fbef8ade025ef2531159d69124239e9299e7bcf51eab1294ccf43d00206 113334 sce_module/libSceJobManager.prx.esbak
12e445a98b441989626489412e6adb0ba21e8b00cbbc94b117a92267f4a16ebf 7834919 sce_module/libSceNpCppWebApi.prx
8e05d2c11c2c3519d8e0b6f2f4195878baf9c6897c91da3b5e51cf8e1df16f49 7864967 sce_module/libSceNpCppWebApi.prx.esbak

The .prx files are the dump's decrypted ELFs, and the .esbak files are the originals that came with it. Nothing in the dump is modified. The run directory's app0 is a folder of junctions and hard links into the dump, and the relinker writes its outputs (eboot.exe, sce_module/*.guest.prx) into the run directory only.

The prologue result was on this branch's head at the time, b14c340f. I'm rebasing it today after yesterday's merges and will post the new head here. The branch is a testing integration of the PRs listed in the description on top of main, without other local changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5978004667 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/426#issuecomment-5978004667). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-04T08:13:07Z. --- Sure. This is the dump I tested with: PPSA04264, `contentId` `UP1004-PPSA04264_00-GTAVFULLGAMEDISC`, `contentVersion` 01.005.000, `masterVersion` 01.00. | SHA-256 | Size | File | |---|---|---| | `60d394626ac62acd1b20d205599b104bb51756d468d3878ad14c230bfe305c11` | 66008859 | `eboot.bin` | | `630cb5995d8665b0b970d45d6ed651806b0d1b47cefa6f2f9315c0b7ef1ac4fc` | 4382 | `sce_sys/param.json` | | `be3b3847848b9f65a4ba880aea3dfdb0ab3b068036d187f4b63aa965000b8323` | 1285266 | `sce_module/libc.prx` | | `d1e448d45fe3b36127430e642d85a2e0d6528b554123c913a2655d014668b1a0` | 1334234 | `sce_module/libc.prx.esbak` | | `09a3c5f4d3f7a50eda117891ebd12973e57df38c24a896a339a691c7177f5f5f` | 71654 | `sce_module/libSceJobManager.prx` | | `59d52fbef8ade025ef2531159d69124239e9299e7bcf51eab1294ccf43d00206` | 113334 | `sce_module/libSceJobManager.prx.esbak` | | `12e445a98b441989626489412e6adb0ba21e8b00cbbc94b117a92267f4a16ebf` | 7834919 | `sce_module/libSceNpCppWebApi.prx` | | `8e05d2c11c2c3519d8e0b6f2f4195878baf9c6897c91da3b5e51cf8e1df16f49` | 7864967 | `sce_module/libSceNpCppWebApi.prx.esbak` | The `.prx` files are the dump's decrypted ELFs, and the `.esbak` files are the originals that came with it. Nothing in the dump is modified. The run directory's `app0` is a folder of junctions and hard links into the dump, and the relinker writes its outputs (`eboot.exe`, `sce_module/*.guest.prx`) into the run directory only. The prologue result was on this branch's head at the time, b14c340f. I'm rebasing it today after yesterday's merges and will post the new head here. The branch is a testing integration of the PRs listed in the description on top of `main`, without other local changes.
MichonGoddijn231849 commented 2026-10-04 09:21:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-04T09:21:52Z.


Rebuilt this branch from current main: the new head is 5a36dc70. It merges the current versions of every open PR in the list, now with #493/#494 in place of #291, and drops the six that merged yesterday since main has them. Build and ctest are clean apart from the failures main has locally. I haven't re-run GTA V's prologue on this exact head yet, only on b14c340f. I'll post here once I have. @RomainROCH, b14c340f is the head my earlier result is from, if you'd rather compare against that first.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5978474711 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/426#issuecomment-5978474711). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-04T09:21:52Z. --- Rebuilt this branch from current `main`: the new head is 5a36dc70. It merges the current versions of every open PR in the list, now with #493/#494 in place of #291, and drops the six that merged yesterday since `main` has them. Build and ctest are clean apart from the failures `main` has locally. I haven't re-run GTA V's prologue on this exact head yet, only on b14c340f. I'll post here once I have. @RomainROCH, b14c340f is the head my earlier result is from, if you'd rather compare against that first.
oneandonlydean commented 2026-10-04 10:39:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T10:39:03Z.


@MichonGoddijn231849 since this is a testing branch rather than a change to merge, would a Discussions thread work better for it (like #357 does for PPSA21564), with a link to the branch and the PR list? It would keep the PR list and the overlap checks to changes meant for review, and testers like @RomainROCH could follow it there. Marking it as a draft would also help in the meantime. @boykopovar your call on whether testing branches like this should live in Discussions.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5979098907 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/426#issuecomment-5979098907). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-04T10:39:03Z. --- @MichonGoddijn231849 since this is a testing branch rather than a change to merge, would a Discussions thread work better for it (like #357 does for PPSA21564), with a link to the branch and the PR list? It would keep the PR list and the overlap checks to changes meant for review, and testers like @RomainROCH could follow it there. Marking it as a draft would also help in the meantime. @boykopovar your call on whether testing branches like this should live in Discussions.
MichonGoddijn231849 commented 2026-10-04 10:39:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-04T10:39:41Z.


Update on the rebuilt head (now 21ffa4f8, after today's second round of merges). It builds and passes ctest apart from the failures main has locally, but I couldn't confirm the prologue on it today: GTA V's boot sometimes dispatches an eboot compute shader that this branch can't run. I fixed the first two gaps it hit: #499 (v_mov_b32 SDWA byte destinations), and ds_write_b8_d16_hi, which main gained in the meantime. The third is COMPUTE_PGM_RSRC2.SCRATCH_EN (scratch memory), which the driver doesn't support at all. On boots where that shader isn't dispatched, the game gets further. One other boot hit the known intermittent [RAGE] Main Thread access violation. @RomainROCH, until I've got past this, b14c340f is still the head the prologue result is from.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5979103078 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/426#issuecomment-5979103078). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-04T10:39:41Z. --- Update on the rebuilt head (now 21ffa4f8, after today's second round of merges). It builds and passes ctest apart from the failures `main` has locally, but I couldn't confirm the prologue on it today: GTA V's boot sometimes dispatches an eboot compute shader that this branch can't run. I fixed the first two gaps it hit: #499 (`v_mov_b32` SDWA byte destinations), and `ds_write_b8_d16_hi`, which `main` gained in the meantime. The third is `COMPUTE_PGM_RSRC2.SCRATCH_EN` (scratch memory), which the driver doesn't support at all. On boots where that shader isn't dispatched, the game gets further. One other boot hit the known intermittent `[RAGE] Main Thread` access violation. @RomainROCH, until I've got past this, b14c340f is still the head the prologue result is from.
MichonGoddijn231849 commented 2026-10-04 11:10:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-04T11:10:33Z.


@oneandonlydean Makes sense, it's a draft now. Once @boykopovar decides, I'll move it to a Discussions thread with the branch link and the PR list, or keep it here as a draft.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5979328663 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/426#issuecomment-5979328663). Originally posted by [MichonGoddijn231849](https://github.com/MichonGoddijn231849) on 2026-10-04T11:10:33Z. --- @oneandonlydean Makes sense, it's a draft now. Once @boykopovar decides, I'll move it to a Discussions thread with the branch link and the PR list, or keep it here as a draft.

Pull request closed

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!426
No description provided.