Skip to content

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

Closed
MichonGoddijn231849 wants to merge 33 commits into
boykopovar:mainfrom
MichonGoddijn231849:gta-v/prologue
Closed

MichonGoddijn231849 wants to merge 33 commits into
boykopovar:mainfrom
MichonGoddijn231849:gta-v/prologue

Conversation

@MichonGoddijn231849

@MichonGoddijn231849 MichonGoddijn231849 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

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:

Audio:

Memory:

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

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

image_sample_cd takes its derivatives in the image_sample_d address
layout; only the hardware LOD selection differs (one LOD per quad instead
of per pixel). The decoder refused it. It now samples with the given
gradients per lane, which matches whenever the lanes of a quad pass equal
derivatives.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@oneandonlydean

Copy link
Copy Markdown
Collaborator

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

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

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

@RomainROCH

Copy link
Copy Markdown
Contributor

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

MichonGoddijn231849 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor Author

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, b14c340. 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 and others added 10 commits October 4, 2026 12:24
…slice

Color targets with the SW_4KB_S swizzle (CB_COLOR_ATTRIB3 tile mode 5) are laid out in 4 KiB
blocks with the standard element order the texture detiler uses, and are resident through the
same storage images as 64 KiB targets. A CB_COLOR_VIEW selecting one slice (SLICE_START equal to
SLICE_MAX) renders into that slice: the target starts one slice size per slice after the surface,
the slice size being the surface's mip chain as a texture of the same tile mode lays it out. Views
of several slices are still rejected.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
#	core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@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

Copy link
Copy Markdown
Contributor Author

Update on the rebuilt head (now 21ffa4f, 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, b14c340 is still the head the prologue result is from.

@MichonGoddijn231849
MichonGoddijn231849 marked this pull request as draft October 4, 2026 11:10
@MichonGoddijn231849

Copy link
Copy Markdown
Contributor Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build needs rebase Conflicts with main, rebase needed prx shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants