Commit Graph
7963 Commits
Author SHA1 Message Date
Yunus Shaikh abf42b2214 Merge main into perf/agc-host-import-blocks
Main's sameRange for a failed import now takes this branch's import budget, as the HostImport overload does, so a recorded failure is compared against the run the budget would import again.
2026-10-18 19:36:25 -07:00
Dean Galvin 41764f27ac Merge main into pr-4650
# Conflicts:
#	core/shader/recompiler/ShaderDiskCache.cpp
2026-10-19 15:36:07 +13:00
Adrià 25648aa121 Merge pull request #6494 from Ondra97/codex/fix-net-accept-inherited-mode
fix(libSceNet): inherit nonblocking mode on accepted sockets
2026-10-19 04:30:22 +02:00
milescovielloandClaude Opus 5.5 42f4382bcf fix(libScePlayGo): list chunks 0 to 999 when only a scenario file is present
A dump with sce_sys/playgo-scenario.json and no chunk table already answers
every chunk id as installed, but scePlayGoGetChunkId listed only chunk 0.
Ghost of Tsushima (PPSA02225) builds its set of installed chunks from that
list and never reads its English audio, two of its music archives or its
opening movie. scePlayGoGetChunkId now lists ids 0 to 999, the room that
title passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 02:27:00 +00:00
JJenkx f4630b2144 docs(ssl): record PS5 reader call evidence and remaining limits 2026-10-18 22:17:37 -04:00
Adrià Franch c567384e83 docs(debt): record sceAgcDcbContextStateOp deviations 2026-10-19 04:13:20 +02:00
AhirandClaude Opus 5.5 f970620d95 fix(agc): keep half the host heap out of the host import budget
Imports, type-3 mirrors and the buffers and textures placed in host memory share the driver's system memory heap. On Windows that heap is half the physical memory, so on a 16 GiB machine the old budget (the heap less 2 GiB) let imports hold about 6 of its 8 GiB, and host buffer allocations then overflowed into the 256 MiB device-local host-visible heap and failed. The budget now reserves the larger of 2 GiB and half the largest host heap.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 04:11:15 +02:00
Adrià 40393b0f95 Merge pull request #6487 from klosixgaming-arch/fix/pthread-detach-joiner
fix(libkernel): refuse to detach or rejoin a thread that is being joined
2026-10-19 04:03:57 +02:00
Adrià b4d517ed10 Merge pull request #6334 from hypermoist/feat/libc-dinkumware-atomics
feat(libc): implement the remaining Dinkumware _Atomic helpers
2026-10-19 04:03:52 +02:00
XairRrR 132e69d595 fix(agc): drop the depth plane images of older surfaces a new plane overlaps
Each depth surface stores its plane through a storage image of its own,
kept for the surface's life. A title that switches output resolution
binds new depth targets over memory where the previous targets' planes
were, and the old images stayed live there. Storage images over the same
memory lend each other pending results, so a later store of the new
plane did not reach guest memory and buffer reads kept seeing the old
depth. A bind now drops the images and the pending store of older
surfaces whose planes overlap its plane over another range. A
same-range surface (another stencil or HTILE address) keeps its image.
The scan runs only when a surface or plane image was created since the
surface's last scan.

AI-assisted: yes
2026-10-19 03:49:59 +02:00
XairRrR 84e3b73f16 fix(agc): keep depth planes coherent with buffer reads and writes of their memory
A depth surface lives in its Vulkan image, so a buffer read of its depth
plane saw guest memory the surface never wrote, and a buffer write into the
plane never reached the surface: binding the target again kept the old
depth.

- A single-sample 32-bit depth surface with the 64 KiB Z swizzle
  (DB_Z_INFO SW_MODE 24) keeps a storage image in that swizzle over its
  plane. A bind that writes or fast clears depth marks the plane stale;
  FlushDepthPlanes copies the depth into the storage image and stores it
  into guest memory. It runs from StorageTexture::FlushPending, when a
  buffer upload finishes (over its regions and address space), and before
  a dispatch for each GuestBuffers V# it binds (a cached dispatch reads
  them without an upload). A reused build flushes its in-place buffer
  regions, and an image lookup flushes the range it reads, as do the
  write-stamp proofs that let a cached image or a reused build skip that
  lookup: a stale plane's memory looks unchanged to them.
- Stale planes are kept as ranges under their own lock with an atomic
  hull; a flush that overlaps none returns without the GPU and surface
  locks.
- Every bind of such a surface, and every flush of its stale plane,
  collects the plane's writes. Written by someone else since the surface's
  previous bind, store or reload, the plane is reloaded from memory
  instead of stored, so a guest write after a depth draw is not
  overwritten by that draw's late store. A pending HTILE fast clear wins
  over the reload.
- A color target flushes the stale planes under it before it retires their
  surfaces, so a target that loads or blends reads the stored depth. A
  retired surface's plane is no longer stale: a later flush never stores
  its old depth over what the new owner of the memory wrote.
- The depth surfaces lock is recursive: a store reached from a flush under
  DepthSurfaceTexture re-enters it.
- Draws pass whether they write depth, so read-only binds do not mark the
  plane stale.

PPSA05684 copies its main depth plane into two ping-pong planes with a
buffer compute, draws the cage's depth into them and fogs its menu from the
result; without this the copy carried nothing and the fog covered the
cliff and the cage.

agc_driver_depth_plane_buffer_memory draws depth 0.5 into such a plane,
fetches vertices from it (the plane must hold 0.5), writes 0.75 into the
memory and draws at 0.5 under LESS (must pass), then checks the depth
written after the reload reaches memory again. On a new plane it writes
memory after a depth draw and before any store: a buffer read must keep
the guest bytes and the next bind must reload them; a guest write before a
depth draw must then lose to that draw. A linear texture at an offset into
a plane must read what memory holds after a flush, also when it is viewed
through its cached storage image after another depth draw. On a plane with
HTILE, an HTILE fast clear after a guest write must win. A color target
that blends ZERO/ONE over a plane just drawn at 0.5 must write back the 0.5
it loaded.

AI-assisted: yes
2026-10-19 03:49:59 +02:00
xXPBSXxandClaude Sonnet 5.5 55b197d31c docs(debt): describe the vertex fetch overhang case without the title
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 03:47:33 +02:00
xXPBSXxandClaude Sonnet 5.5 d01548e81b fix(libSceAgcDriver): zero the overhanging record of a vertex fetch
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 03:47:33 +02:00
PhialsBasementandClaude Opus 5.5 54314ff8a4 test(libSceAgc): find MRT0 through the compact versioned register defaults
The versioned tables hand out compact 12-byte type entries since #7681,
and the MRT0 checks on them were dropped with the pairs. The walk now
takes the entry size: MRT0 is block 78 of the legacy pairs and of the
compact version 13 table, block 73 of version 10, and every versioned
table from 4 holds it. The debt entry names the layout of each entry
point.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:39:25 +11:00
Adrià 23629c2847 Merge pull request #6454 from EagleBearerYS/perf/shader-image-table-reuse-v3-pr
perf(agc): share one image table per heap and write epoch through capture, compare, resolution and descriptors
2026-10-19 03:39:03 +02:00
Dean Galvin 4d4ae6e5eb Merge main into pr-4650
# Conflicts:
#	core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
#	core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
#	core/shader/recompiler/tests/RequestSerializerTests.cpp
2026-10-19 14:32:36 +13:00
klosixgaming-arch 30cbb2fd66 fix(libkernel): refuse to detach or rejoin a thread that is being joined
PPSA34015 (EA SPORTS FC 27) stopped with "Joining guest thread: Access is
denied": scePthreadJoin waited on a thread that another call released
under it, and then waited on its closed handle. As FreeBSD 11.4's
thr_join.c and thr_detach.c do with the joiner field, scePthreadDetach
now returns EINVAL while a thread waits to join the target, a second
concurrent scePthreadJoin returns EOPNOTSUPP, a cancelled join backs out,
and a completed join leaves the thread detached.
2026-10-19 03:30:58 +02:00
Yunus Shaikh 745f199d5a Merge main into fix/agc-sample-location-grid-exact
Combines this branch's sample order with #6470's once-per-pixel and once-per-sample inputs. The pixel request keeps both sides' fields: #6470's iteration, position location and sample locations are serialized at version 34, and the sample order after them at version 35. The serialization tests move the sample-order bytes after the iteration fields and drop both from older versions. The pixel info collector adds sample order to the SampleLocationsVary inputs, and the draw keys compare and hash both. EmitSampleOffset's iterated index already goes through GuestSampleIndex, since the SampleId builtin does. The shader cache stays at FormatVersion 40, and the sample-location debt entry takes #6470's sentence on the position inputs.
2026-10-18 18:30:37 -07:00
Adrià 7978a4b585 Merge pull request #6366 from EagleBearerYS/fix/agc-defer-unpreparable-abi-stages-v3
fix(agc): leave a stage the title's pipeline ABI cannot prepare to its first use
2026-10-19 03:26:59 +02:00
Yunus Shaikh b6489b863a Merge main into fix/agc-sample-location-grid-fallback
The custom MSAA sample-location debt entry keeps this branch's grid stand-in text and takes main's sentence on ANCILLARY and the position inputs of a once-per-pixel shader.
2026-10-18 18:25:31 -07:00
Dean 017f2151ca Merge pull request #6126 from fdfawef324/claude/json2-value-handlers
feat(libSceJson2): implement Value::setTypeMismatchHandler and store the element access failure and special float handlers
2026-10-19 14:21:53 +13:00
Adrià 00666eeb36 Merge pull request #6470 from EagleBearerYS/fix/recompiler-once-per-pixel-sample-inputs
fix(recompiler): run a pixel shader the guest does not iterate once per pixel
2026-10-19 03:21:34 +02:00
milescovielloandClaude Opus 5.5 7092dde6ee fix(shader): emit nothing for a vertex s_barrier that precedes every memory access
A vertex-path program with LDS, GDS or memory writes refused any s_barrier. NGG passthrough
programs start with the s_barrier that orders GS_ALLOC_REQ, before any memory access, and some
write buffers later. A barrier that runs before every load, store, atomic, image or LDS access of
the program has nothing to order, so it emits no instruction, like the barrier of a program
without memory access. Barriers after a memory access still throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 01:07:58 +00:00
Adrià 12c1d1875f Merge pull request #6464 from AymanFE/claude/project-thread-d8qx30
fix(agc): overestimate single-sample draws with centroid inputs
2026-10-19 03:02:01 +02:00
Nixitov ce8f32854a feat(libkernel): declare physhm_open and physhm_unlink 2026-10-19 03:00:55 +02:00
Adrià 42d8666f29 Merge pull request #6458 from DavidSamir/fix/relinker-trap-macos-guest-gs
fix(relinker): trap guest GS accesses in macOS output instead of refusing the module
2026-10-19 02:56:44 +02:00
MaxandClaude Opus 5.5 5140b08d82 feat(libSceAgc): implement sceAgcDcbSetIndexIndirectArgs
Write the INDEX_ATTRIBUTES_INDIRECT packet the console's builder writes,
as measured by the prosper console oracle, with OpenAGC's signature, and
report its measured size of 16 bytes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 02:53:01 +02:00
JJenkx 5daee96f35 fix(shader): read 2D textures through MSAA image loads 2026-10-18 20:46:43 -04:00
Adrià bebc294607 Merge pull request #6443 from EagleBearerYS/fix/libkernel-host-stack-guard-page
fix(libkernel): keep a protected host stack's guard page, and protect the Linux main stack
2026-10-19 02:41:09 +02:00
Adrià c176007f5c Merge pull request #6422 from Amoenus/codex/test-vcc-sampler-runtime-main940
test(agc): execute MIMG sampler tuples ending in VCC
2026-10-19 02:40:59 +02:00
Adrià d5c854dd9b Merge pull request #6339 from hypermoist/feat/libc-std-vector-algorithms
feat(libc): implement the __std vectorized algorithm helpers
2026-10-19 02:40:50 +02:00
Adrià 347c0a7934 Merge pull request #6420 from JJenkx/feat/kernel-error-conversion-upstream
feat(libkernel): convert guest POSIX error values
2026-10-19 02:40:46 +02:00
Hannah Lyons 15649b702f feat(libkernel_sys): implement fstatat 2026-10-18 20:39:35 -04:00
Yunus Shaikh 4bd379b6ed Merge main into perf/agc-remember-evicting-refusals
Resolves the AGC driver debt file bullet by bullet.
2026-10-18 17:12:07 -07:00
Yunus Shaikh 4bbb952fac Merge main into perf/agc-host-import-aligned-blocks
Resolves the AGC driver debt file bullet by bullet.
2026-10-18 17:11:27 -07:00
Yunus Shaikh 03fab5cffc Merge main into perf/agc-host-import-blocks
Resolves the AGC driver debt file bullet by bullet.
2026-10-18 17:10:33 -07:00
Dean a373e85e56 Merge pull request #7194 from XairRrR/fix/agc-htile-later-slice-clear
fix(agc): take a later slice's HTILE clear when every word has ZMask 0
2026-10-19 13:09:45 +13:00
Dean 60fb8078c7 Merge pull request #6067 from meh7an/perf/libs-mimalloc-windows
feat(libs): let relinked Windows games opt into mimalloc
2026-10-19 13:09:36 +13:00
Adrià Franch da5b7e3334 docs(debt): note that macOS output traps GS-prefixed instructions without a memory operand too 2026-10-19 02:06:49 +02:00
David 414c1f96a6 docs(debt): record that guest GS accesses trap in macOS output 2026-10-19 02:06:44 +02:00
Yunus Shaikh 106b79e007 Merge main into perf/shader-image-table-reuse-v3-pr
The data-hit verification keeps this branch's pending-span query on its ShaderMemory and takes #5958's CaptureInvocation, which retries a capture with converted samples.
2026-10-18 17:04:23 -07:00
Yunus Shaikh 10b798fb99 Merge main into perf/shader-image-table-reuse-v3-pr
Keeps this branch's tagVariantRuns declaration next to main's dumpRequest suffix parameter in Driver.hpp, and reads #6232's pointer-chain test words from its table's snapshot, where this branch keeps them.
2026-10-18 17:03:39 -07:00
Muhammad Wasif Ali WasifandClaude Opus 5.5 ddb774ad26 feat(libkernel): map regular files with mmap on Windows
A shared mapping is a view of a file section created on the descriptor's
handle, read-write when the descriptor is, otherwise read-only. A private
mapping is a copy of the file read at mmap, as POSIX allows. Anonymous
shm_open objects and JIT shared memory descriptors are temporary files on
Windows, so mmap now maps them too (it failed with EOPNOTSUPP before).
mprotect of a mapped view above the view's protection fails with EACCES
before any bookkeeping changes. The cases Windows cannot represent are
listed in the libkernel debt.

Dusklight (PPSA99305) uses SQLite in WAL mode, which maps its -shm file.
On Windows main f0634088b every start logged "Failed to start
transaction: disk I/O error" for its Dawn and pipeline caches (3 of 3
runs); with this change the caches initialise and their WAL files fill
(4 of 4 runs). The title reaches its menu either way.

A shared mapping may end inside the 16 KiB page that holds the end of
the file, as POSIX mmap allows: the view ends with the file's last 4 KiB
host page, which Windows zero-fills past the end, the rest of the guest
page is private zero pages, and the file never grows. A mapping that
reaches a whole page past the end still fails with EOPNOTSUPP.

PS5LM Plus (PPSA99581) loads its model with llama.cpp, which maps the
whole GGUF file shared and read-only. With a 491,400,032-byte model,
Windows main 5de7a46e0 and this change without the last page logged
"llama_model_load: error loading model: mmap failed: Operation not
supported" (3 of 3 runs); now the model loads and the completion of
"The capital of France is" starts with " Paris" (3 of 3 runs).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 05:02:25 +05:00
Adrià 6493ae1276 Merge pull request #6370 from pushkarreddyy/feat/libSceSysmodule-proprietary-voice-chat-helper
feat(libSceSysmodule): register libSceProprietaryVoiceChatHelperPrx module id 0x132
2026-10-19 01:58:59 +02:00
Adrià 456f8513bc Merge pull request #6400 from Capmare/feat/fontft-support-formats
feat(libSceFontFt): implement the font format support exports
2026-10-19 01:57:51 +02:00
T3cm0andClaude Fable 5.1 e191a132ab feat(libSceHmd2): return the console's display and mirroring buffer sizes
Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-18 18:57:14 -05:00
Adrià ce8c71a78e Merge pull request #6411 from Nixitov/feat/fchown
feat(libkernel_sys): implement fchown
2026-10-19 01:56:48 +02:00
Adrià 7732434367 Merge pull request #6376 from Get-fix/ps4/libscefreetype
feat(libSceFreeType): implement the six FreeType functions OpenOrbis samples use
2026-10-19 01:48:40 +02:00
Adrià 56ea17e5d7 Merge pull request #6369 from JJenkx/fix/ngs2-voice-handle-errors
fix(ngs2): return PS5 errors for invalid voice handles
2026-10-19 01:48:35 +02:00
Adrià 9d4966c265 Merge pull request #6343 from klosixgaming-arch/feat/kevent-standard-input
feat(libkernel): accept a kevent read event on descriptor 0
2026-10-19 01:46:19 +02:00