Repository navigation
Uncharted: Legacy of Thieves Collection (PPSA05684) on Linux / NVIDIA #4001
XairRrR
started this conversation in
Game bring-up
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Status: boots, plays the studio intro video with sound, reaches the main menu (collection choice, then Story / Extras / Options, navigable) and starts Uncharted 4 chapter 1 (boat intro, Henry Avery text, sound). Not on plain
main: the title needs the open image-table PRs #757/#758 and the depth PRs #425/#2076, plus local changes listed below. The 3D menu runs at about 7 fps and its lighting is magenta.Setup
EP9000-PPSA05684_00-UNCHARTED4R00000), version 01.002.000, master 01.00.main197ffac + feat(agc): implement image tables loaded through 64-bit pointers #758 (includes feat(agc): implement image and sampler tables indexed at runtime offsets #757) + feat(agc): depth planes sampled as 2D arrays, cubes and integer views #425 + feat(libSceAgcDriver): take a one-layer 2D array view of a depth surface plane as the plane #2076 + about 40 local commits. Release, GCC.eboot.binandsce_module/libc.prxunwrapped from SELF to ELF.APS5_HOST_IMPORT_MIB=16384 APS5_NO_SNAPSHOT_CHECK=1 APS5_IMAGE_TABLE_KEY_SCAN=262144,ulimit -n 65536,ulimit -c 0(a full core dump of the ~20 GB process exhausts RAM). About 20 GB of free host RAM is needed.Milestones
Progress, in order
1. Boot to first flip (2026-10-08/09). The video out path needed VRR peg/unpeg (#2918), the voice port mute flag (#2919), command-buffer flip buffers resolved when the GPU reaches the flip (#2204),
sceGameLiveStreamingGetCurrentStatus2(#2205), and marker pops without a pushed marker (#2202). Recompiler fixes found on the way: SDWA destination selects onv_not_b32(#2200), small return blocks shared by early exits (#2201), extract folding intoOpVectorShuffleonly between vectors (#2915; NVIDIA crashed in the driver otherwise).2. Intro video.
libSceVdecswimplemented on top oflibSceVideodec2(#2203). The movie never ended at first: the game waits foris_last_frameon the last picture, which is now held untilFinalize. Layouts follow shadPS4'svdecsw.h. The Sony studio intro plays with sound.3. Memory after the intro. Anonymous memory grew from 6 to 10.8 GB in ~100 s. A jemalloc heap profile showed 3.3 GB of SPIR-V decoded from the shader disk cache and kept forever. Local commits reload disk-cached SPIR-V on use and release freshly compiled SPIR-V once the cache holds it: menu RSS 7.9 GB -> 3.9 GB. #3247 (closed) had the same idea. The 1.6 GiB direct range also needs a larger host-import budget (
APS5_HOST_IMPORT_MIB=16384), otherwise it goes to heap mirrors and the process runs out of memory.4. Main menu (2026-10-09). Needed: depth/stencil clear draws through
DB_RENDER_CONTROL(#2219), rect-list fault buffer binding in the tessellation control group (#2198), 8_SNORM sampling (#2199), zero-scale viewports (#2197), UINT16 color exports, COLOR_8_8 SWAP_ALT targets (#2916) and blending into them (#3194), shader variants registration did not predict (#2917). Diagnostics merged for the failures seen: #2920, #2921, #2922.5. Chapter 1. Shadow cascades sample a 2048x2048 D16 depth surface as a 4-layer 2D array T#; that needed depth surfaces read as textures and storage images (#425) and the stencil plane as a storage image (#2076). #425 dropped the first-layer 2D view of a depth plane array, which put a blur over the menu; restored locally. The boat level renders and plays, at about 1 fps at the time.
6. Image tables instead of local hacks. Several compute shaders read T#s from bindless tables with runtime offsets, one with 2809 distinct keys, and the global texture table has 65536 entries. Before, these ran only with a local hack that read oversized or undecodable tables as null (textures missing). The branch now merges #758 (via #757), with its heap sizes aligned to the merged #2347, #2141 and #2282. It needs
APS5_NO_SNAPSHOT_CHECK=1: the CPU updates the 65536-entry table while it is captured, which fails the "guest snapshot differs from registered memory" check. That is worth a look on #757.7. Menu performance (2026-10-10/11), measured on the menu with
APS5_PROFILE_DRAW=1and A/B runs of 240 s:Shader.Register169 s -> 15.5 s per run)ShaderMemory::readWordsbulk copy, single-pass key narrowing without divisions, one read per address-mode record, last-page reuseGuestMemory::describePages(onePROCMAP_QUERYioctl per check before)Menu measurements. Each run boots the title and reaches the menu with scripted Cross presses, 240 s in total. Frame rate and frame times are taken over the last 120 s from
frame-timing.log. "1 s frames" counts frames 990-1030 ms after the previous one (the stalls listed under open problems). RAM is the peak anonymous memory of the process.8 of the 38 menu runs that day had 20 or more 1 s frames, with and without each change; the worst dropped to 2.6-3.6 fps over the window. Those runs are left out of the table except where noted.
Result: 4.7 -> 6.4-6.7 fps in the menu, median frame 198 ms -> 134 ms. GPU time is only ~28 ms per frame (
APS5_PROFILE_GPU=1); the CPU queue thread is the limit. Per 10 s on that thread: draw capture walk ~2 s,Graphics::Draw~2.4 s, image tables ~1.1 s,WAIT_REG_MEM~1.5 s.Tried with no measurable gain: layer aliases of 2D arrays and GPU copies between layer images and the array (the 4-layer R8 array round trips moved to a later buffer copy that reads the same memory), and larger result memos (snapshots never repeat).
Fixes from this bring-up that are open upstream
SI_PS_INPUT_CNTL_UNUSED), fixes Pixel shader reading a parameter the vertex shader never exports: rect-list draws zero-fill it, ordinary draws fail validation #2975.Open problems
mainseen during this work: creating a storage image of a multi-layer 2D array while a 2D image over one of its layers has pending results loses those results (flush withPublishScope::None, the CPU upload reads stale bytes). No PR yet.agc_driver_emulated_color_comparefails on plainmain(a11c8f7).Not proposed upstream
The branch also carries local test commits that are not meant for upstream: hacks that read undecodable descriptors as null, skipping draws whose stage interfaces disagree, the #758 adaptation, larger image capacities (32 slots per bindless table, 128 images, 4096 cached pipelines), and auto-input / debug traces used for these runs.
Help welcome on the magenta lighting and the 1 fps stalls. If someone has Legacy of Thieves on AMD, a comparison of the menu colors would tell whether the lighting is NVIDIA-specific.
AI-assisted: yes.
All reactions