Commit Graph
6138 Commits
Author SHA1 Message Date
Adrià FranchandClaude 0ecd75fd54 test(libkernel): put the GuestDefaultScopeOnly assertion on its own line
Co-Authored-By: Claude <[email protected]>
2026-10-08 14:30:59 +02:00
jeffrey12cali 34616c425b fix(module): resolve the default dlsym scope against guest exports only
Titles pass handle 0 (RTLD_DEFAULT) for a process-wide lookup, and the loader rejected it: the handle is
not in the module map, so every such lookup failed even when a loaded module exports the symbol. Handle 0
and -2 now take the default scope, searching the global modules by plain name, NID and `#guest` form, and
then the process-wide scope.

The process-wide scope of the real loader also contains glibc and libstdc++, so an unfiltered fallback
would answer `malloc`, `dlopen` and `pthread_create` where PS5 reports the symbol as missing: handle 0 is
the main program, whose lookup sees the program's exports, not the host C++ runtime. A result from the
process scope is therefore accepted only when `dladdr` attributes it to a converted or replacement module
(a `.prx` library or the executable), which keeps the fallback for guest symbols and removes the host
leak. `guest_dynamic_loader` asserts the three host names are not found; disabling the filter makes that
test fail.

The scripting heap that an earlier revision of this branch added has been dropped: the title reaches the
same boot milestone with the lookup failing honestly, so the export was an inference rather than a
requirement, and prosper's bring-up notes report `ESRCH` for that name on hardware.
2026-10-08 14:30:55 +02:00
krishnarayaandClaude Opus 5.5 ee9033f9cd test(agc): check device capabilities by name in the execution tests
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-08 08:29:12 -04:00
Arvind FrøilandandClaude Opus 5.5 0858f01429 test(relinker): check decoder lengths against an LLVM-generated table
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 21:09:18 +09:00
SK Arin 6e951bd0ed fix(progress): exclude library test fixtures from function counts 2026-10-08 17:30:43 +05:30
Adrià 1081602d79 Merge pull request #1338 from TibixDev/pr/resource-rejection-details
fix(agc): include resource details in rejected draw diagnostics
2026-10-08 13:55:01 +02:00
Adrià 8087092234 Merge pull request #1350 from gjonn/feat/usbd-no-devices
feat(libSceUsbd): report a USB stack with no devices attached
2026-10-08 13:54:00 +02:00
SK Arin 466ebde23c fix(oracle): publish cached executable only after successful build 2026-10-08 17:16:36 +05:30
Adrià 33a9199af1 Merge pull request #1326 from gjonn/fix/relinker-branch-into-cut-tail
fix(relinker): tolerate unwind ranges that split an instruction
2026-10-08 13:40:05 +02:00
Adrià 947a267f4d Merge pull request #1302 from TibixDev/pr/ngs2-legacy-userfx
feat(ngs2): implement legacy submixer UserFx callbacks
2026-10-08 13:37:56 +02:00
Adrià fae39c6709 Merge pull request #157 from Pacuka/perf/linux-maps-cache
perf(agc): query guest page access with PROCMAP_QUERY on Linux
2026-10-08 13:36:08 +02:00
Adrià d393c3e754 Merge pull request #1346 from TibixDev/pr/disabled-color-targets
fix(agc): honor disabled color targets and their reset state
2026-10-08 13:36:03 +02:00
Gjon GojcevicandClaude Opus 5.5 53b3da5cea ci: retrigger checks (flaky guest_raise_exception timeout)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 13:34:39 +02:00
Gjon Gojcevic 6e5d70f0cd feat(libSceUsbd): report a USB stack with no devices attached
Init and exit succeed, the device list is empty, event handling waits for its timeout, and calls that need a device throw.
2026-10-08 13:34:39 +02:00
Adrià 4f41832dc0 Merge pull request #1320 from TibixDev/pr/temporary-storage-lifecycle
fix(appcontent): track temporary storage mounts
2026-10-08 13:31:44 +02:00
TibixDev e5aeec994d fix(agc): include resource details in rejected draw diagnostics
AI-assisted change. Graphics regression tests passed on Fedora 44.
2026-10-08 13:30:07 +02:00
Adrià a983fb5df5 Merge pull request #1348 from TibixDev/pr/null-pixel-input-state
fix(agc): ignore stale input state for null pixel shaders
2026-10-08 13:29:44 +02:00
Adrià f0cc6750db Merge pull request #1343 from nikhilpanchal1/fix/recompiler-storage-only-constants
fix(recompiler): avoid illegal narrow constants during optimization
2026-10-08 13:28:34 +02:00
muhzain05 19f2fcf059 fix(relinker): bound the jump relocation table range
DT_JMPREL and DT_PLTRELSZ were never range-checked against the input
file. With DT_OS_JMPREL the offset is used raw, so an offset outside the
image reached BuildDynamicSection and CompactPlt. When DT_PLTRELSZ is
zero the per-entry loops never run, so nothing rejected the table and
the relink produced an output executable.

Validate the declared range with the subtraction-based check already
used for DT_STRTAB and DT_STRSZ, next to it and before the table is
read.
2026-10-08 05:25:08 -06:00
Gjon Gojcevic 90dcd6256c fix(relinker): tolerate unwind ranges that split an instruction
A static branch into a skipped function tail is accepted when an
instruction decodes there within its executable segment, so a range that
ends inside an instruction no longer stops code analysis.

The Windows TLS rewriter skips a non-FS segment-prefixed instruction that
starts inside an earlier collected instruction: it is an alternative
decoding from a range that begins mid-instruction, not a TLS access.
2026-10-08 13:20:32 +02:00
Celegans12 29c22442dc feat(agc): implement overestimating conservative rasterization
A draw whose PA_SC_CONSERVATIVE_RASTERIZATION_CNTL (context 0x313) was
not the default 0x6000 threw in DecodeState and the draw precheck.
0x6001 sets OVER_RAST_ENABLE and now decodes to Vulkan's overestimation
mode, chained to the pipeline's rasterization state and its key.

The device enables VK_EXT_conservative_rasterization only when its
primitiveOverestimationSize is at most 1/256 pixel and it rasterizes
degenerate triangles; elsewhere the pipeline throws. Overestimation is
accepted only when triangles reach the rasterizer: VGT_GS_OUT_PRIM_TYPE
behind a geometry shader, VGT_TF_PARAM's output topology behind
tessellation, VGT_PRIMITIVE_TYPE otherwise. Other 0x313 values and
centroid interpolation still throw.

Adds the agc_driver_conservative_rasterization GPU test and extends
agc_driver_graphics.
2026-10-08 13:20:22 +02:00
Nikhil Panchal 39e8e70caf fix(recompiler): guard narrow-type scanning bounds
Check module headers, instruction lengths and required operands before
scanning narrow types.

Cover malformed and byte-swapped modules while retaining the native
SPIR-V 1.3 conversion matrix.

Tested: Linux/llvmpipe CTest three times with SPIRV-Tools on and off,
cold-cache Vulkan regressions, and ASan/UBSan in all optimization modes.
2026-10-08 13:20:06 +02:00
Nikhil Panchal 43074a805e fix(recompiler): avoid illegal narrow constants during optimization
Skip CCP and Simplification for storage-only narrow types while keeping
the remaining passes and arithmetic-capable folding.

Add compiler and Vulkan readback regressions for default/full/none modes.

Tested: Linux/llvmpipe, full CTest with SPIRV-Tools on/off, ASan/UBSan
optimizer checks, and cold-cache Vulkan wave32/wave64 readback.

Fixes boykopovar/AnyPS5#1276
2026-10-08 13:20:06 +02:00
TibixDev 0d4db860a6 feat(ngs2): implement legacy submixer UserFx callbacks
Invoke the title callback on planar mixed samples and silence. Preserve per-voice callback data, reset registration on setup, and release the render guard on callback failure. Include behavioral tests and source references. Written with AI assistance.
2026-10-08 13:18:41 +02:00
hamb3r 8ed4ff55b5 fix(agc): validate stencil clear before decoding stencil operations 2026-10-08 14:16:10 +03:00
Aryan Sharma 72e8d502f9 fix(agc): draw with DB_RENDER_CONTROL STENCIL_CLEAR_ENABLE
A draw that sets STENCIL_CLEAR_ENABLE was rejected as a whole, so its
color output was lost as well. The draw is now rasterized with every
covered sample's stencil replaced by DB_STENCIL_CLEAR, whatever the
stencil and depth tests are, and its color outputs are written as usual.
The depth/stencil state is decoded for such a draw even when
DB_DEPTH_CONTROL enables no test. Depth clear, copy, resummarize and
decompress draws are still rejected.
2026-10-08 14:16:10 +03:00
Adrià b1c5f10df8 Merge pull request #1319 from TibixDev/pr/allocation-lease-deadlock
fix(memory): release the registry lock while waiting for a lease
2026-10-08 13:08:46 +02:00
Adrià 44ef694870 Merge pull request #1308 from TibixDev/pr/implicit-cube-extents
fix(agc): decode implicit six-face cube extents
2026-10-08 13:08:02 +02:00
Adrià FranchandClaude 18bc4b6d0e fix(agc): report a failed PROCMAP_QUERY instead of rescanning the maps
Co-Authored-By: Claude <[email protected]>
2026-10-08 13:05:02 +02:00
PacukaandClaude Opus 5.5 3bea115487 perf(agc): query guest page access with PROCMAP_QUERY on Linux
describePages parsed the whole /proc/self/maps for every run it
reported. On kernels with the PROCMAP_QUERY ioctl (Linux 6.11+) each run
is now one ioctl on an open /proc/self/maps fd with
PROCMAP_QUERY_COVERING_OR_NEXT_VMA, which returns the covering or next
VMA and its read/write flags straight from the kernel, so the answer is
exact for host mappings too. A VMA starting above the cursor is a gap up
to its start and ENOENT is a gap to the end. Kernels without the ioctl
keep the line scan.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 13:04:56 +02:00
popcoder565 d3cdffac25 Merge branch 'main' into perf/bda-store-byte-loop 2026-10-08 07:03:25 -04:00
Celegans12 38e89df1a5 fix(agc): bind guest buffer views that start off a DWORD boundary
A V# whose base is not a multiple of 4 bytes from the start of its GPU
owner threw in GuestBufferMemory::Descriptor, because the shader added
the offset below the view only in whole dwords.

Descriptor now binds from the offset alignment below the view and
passes the whole remainder. Such a view's range covers the dwords
around it, and its descriptor region starts and ends on dword
boundaries, so a lone view copied to its own buffer binds the same way.

The buffer specialization records the V# base's low two bits. Raw
vector loads through such a V# join two dwords, glc dwordx2 loads
included, stores merge their bytes into both with compare-exchange
loops, and bounds checks include the second dword. s_buffer_load
ignores the low two bits, as SrtEvaluator does. Formatted accesses
whose element alignment (min(element bytes, 4)) the base breaks throw,
as they fault the wave on RDNA2, and so do atomics.
2026-10-08 13:01:27 +02:00
popcoder565andClaude Opus 5.5 d80d5ff8c6 fix(libkernel): give a sleep nested in an APC its own timer on Windows
SleepUntil, PollSleepUntil and SleepNanosCoarse each wait on one
thread_local high-resolution timer. A sceKernelRaiseException handler
that runs as an APC inside a sleeping thread's wait and sleeps itself
re-armed that timer and consumed its signal, so the interrupted sleep
never returned. A nested TimerWait now waits on its own timer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 07:01:09 -04:00
TibixDev 33555244c3 fix(appcontent): track temporary storage mounts
Preserve files across unmount, block new lookups until remount, and validate mount-dependent operations. Keep prior-run storage inaccessible after initialization.

Written with AI assistance.
2026-10-08 13:00:00 +02:00
Dean 084aeeb67a Merge pull request #1515 from oneandonlydean/revert/1156-bundled-libc
revert: undo #1156's bundled libc lifecycle suppression
2026-10-08 23:58:39 +13:00
Adrià 615262f3cd Merge pull request #1279 from TheAggie/fix/libkernel-send-nosignal
fix(libkernel): accept MSG_NOSIGNAL in send and sendto
2026-10-08 12:58:28 +02:00
Adrià b599fe0586 Merge pull request #1268 from Celegans12/fix/shader-wave64-half-wave-reductions
fix(shader): read the half-wave scans of wave64 reductions on any host subgroup
2026-10-08 12:58:18 +02:00
Celegans12 ccddd4f89b fix(agc): forget a DCC key fill once a refresh sees other keys
StorageTexture::MarkDirty skips the first write's uncompressed key
store while the image's filledKeys holds a clear code, and only an
upload or clearByKeysFill reset that fill. After a 0001 key fill, a
kernel storing 0000 over the keys and a storage write, the refresh of
write-watched memory read 0000, the keys the image was uploaded under,
so it did not upload again and kept the stale 0001. The write then
left the 0000 keys in memory, and a kernel reading them saw the clear
colour.

StorageTexture::ProvedKeys, the key read of Refresh and the fast
revalidation, now forgets the fill when it reads other keys while the
image has no results pending. An image with pending results keeps it,
since its write-backs treat those results as killed by that fill.
2026-10-08 12:55:45 +02:00
Adrià 81f31ef1a9 Merge pull request #1301 from TibixDev/pr/ngs2-atrac9-loops
feat(ngs2): parse forward ATRAC9 waveform loops
2026-10-08 12:53:11 +02:00
Adrià 4a14093ac9 Merge pull request #1291 from TibixDev/pr/savedata-directory-records
fix(savedata): use 32-byte directory records
2026-10-08 12:52:30 +02:00
Adrià 7c4dfac50e Merge pull request #1293 from TibixDev/pr/savedata-progress-dialog
fix(savedata): keep progress dialogs running until closed
2026-10-08 12:50:48 +02:00
Dean Galvin 2096c66a91 revert: undo #1156's bundled libc lifecycle suppression
Since #1156 a title's bundled sce_module/libc.prx is loaded for its
exports but its init is suppressed, while titles still call its malloc,
which then returns NULL (#1500). On Linux, titles that bundle libc crash
at launch: one segfaults within 0.2 s, another stops with bad_alloc.

This reverts commit 2d6aff7a1e, reversing
changes made to e82e03f11e.
2026-10-08 23:49:41 +13:00
CyanBook 42f42ae228 docs(debt): drop sce::Json::Value::clear from PPSA23566 unknown signatures 2026-10-08 12:45:25 +02:00
Kikoarl 319ac9ba78 test: give cpu topology and icon resource temp paths a random suffix 2026-10-08 12:40:39 +02:00
Adrià 4b2413fb57 Merge pull request #1278 from TheAggie/feat/libkernel-poll
feat(libkernel): implement poll for guest sockets
2026-10-08 12:37:49 +02:00
065280d58d fix(libkernel): map EPIPE on Linux and test send with MSG_NOSIGNAL on a closed peer
Case and test by hikazey in the PR thread.

Co-authored-by: hikazey <[email protected]>
Co-Authored-By: Claude <[email protected]>
2026-10-08 12:36:58 +02:00
Scott SchusterandClaude Opus 5.5 a2f9a50985 fix(libkernel): accept MSG_NOSIGNAL in send and sendto
send, sendto and sendmsg rejected every flag with EOPNOTSUPP, so callers
that pass FreeBSD's MSG_NOSIGNAL (0x20000) could not send at all. Accept
it: Windows sockets never raise SIGPIPE, and on Linux it maps to the
native MSG_NOSIGNAL. Other flags still fail with EOPNOTSUPP.

DOOM (PPSA99666) sends its upload server replies with MSG_NOSIGNAL and
closed every connection without an answer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 12:36:58 +02:00
Adrià 4ffc9a14f8 Merge pull request #927 from mugurc/libc-exceptions
feat(libc): exception runtime on macOS hosts
2026-10-08 12:35:51 +02:00
Scott SchusterandClaude Opus 5.5 408e305ca0 feat(libkernel): implement poll for guest sockets
Translate the FreeBSD pollfd layout and flags to WSAPoll on Windows and
poll on Linux. Closed socket descriptors report POLLNVAL, a timeout below
-1 fails with EINVAL and a null array with EFAULT. Non-socket
descriptors, unknown event bits, POLLPRI on Windows and an infinite wait
without sockets throw; these are recorded in TechnicalDebt.

DOOM (PPSA99666) imports poll for its upload server.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 12:23:41 +02:00
xsvm 70b3ae082b docs(relinker): drop the VEX/0F38/0F3A gap from the rewriter debt entry 2026-10-08 18:20:14 +08:00