Commit Graph
12196 Commits
Author SHA1 Message Date
Dean b85592f67e Merge pull request #7200 from mrfelek/feat/avplayer-vp9-opus
feat(libSceAvPlayer): accept VP9 video and Opus audio streams
2026-10-18 09:59:24 +13:00
oskarlgsandClaude Opus 5.5 206aaa56cb fix(relinker): decode near branches with an operand-size prefix as AMD does
66 E8, 66 E9 and 66 0F 80-8F without REX.W take a 16-bit displacement on
AMD processors, the console included. Every near relative branch with that
prefix truncates its target to 16 bits, so the decoder reports no branch
target for it and stubs refuse to move it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016TFMtUC4L4wMS4eeEqaNSR
2026-10-17 20:58:29 +00:00
Dean 3c9a43df46 Merge pull request #7134 from orishamir/fix/queue0-late-completion-wake
fix(agc): wake an idle queue 0 for completions the draw pipeline adds
2026-10-18 09:58:19 +13:00
Dean fb10ea8a41 Merge pull request #7191 from milescoviello/fix/msaa-target-test-skip
test(agc): skip the multisampled target test without storage image multisampling
2026-10-18 09:57:16 +13:00
Dean 87edc304f1 Merge pull request #7204 from hossiendehghan989/fix/title-mouse-wheel-pad-leak
fix(videoout): keep guest mouse wheel off pad bindings
2026-10-18 09:56:43 +13:00
Dean 88395770b8 Merge pull request #6875 from pushkarreddyy/fix/agc-driver-unclamped-normalized-color
fix(libSceAgcDriver): accept unclamped normalized color target formats
2026-10-18 09:55:51 +13:00
Lindamea1andClaude Opus 5.5 111d81786b fix(libkernel): accept an uninitialized attribute in scePthreadCondInit
scePthreadCondInit, and pthread_cond_init through it, threw when attr
pointed to a null attribute: a zeroed one that was never initialized or
one that scePthreadCondattrDestroy has set to null. FreeBSD 11.4 libthr
(thr_cond.c, cond_init) takes a null attribute as the default one and
creates a CLOCK_REALTIME condition variable. A PS5 (firmware 13.60)
takes a zeroed attribute as the default one in scePthreadMutexInit
(#4158). Take it as the default here too, as scePthreadMutexInit and
scePthreadCreate already do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 21:54:15 +01:00
Gjon Gojcevic 571fecaddc feat(agc): sample texture format 43 through a lossless B10G11R11 copy
Texture format 43 holds unsigned floats of 10 bits (R, bit 0), 11 bits
(G, bit 10) and 11 bits (B, bit 21). VK_FORMAT_B10G11R11_UFLOAT_PACK32
holds R11 at bit 0, G11 at bit 11 and B10 at bit 22, so storing the
guest R field in the Vulkan B field and the guest B field in the Vulkan R
field moves every texel without changing a bit of any component. A
sampled texture of format 43 is now uploaded that way (a repack pass over
the detiled words, TextureRepack.comp) and viewed with R and B swapped
back (TextureComponentChannel), so the shader samples it natively: point
and bilinear filtering, every mip level and LOD, and cube faces
work as for any other float texture. A texture whose results a storage
image still holds is copied from that image (vkCmdCopyImageToBuffer, the
repack pass, vkCmdCopyBufferToImage) and copied again whenever the
image changed, like the depth and block copies. The recompiler treats a
sampled format-43 image as a float image without conversion; storage
reads and writes keep the packed R32_UINT path, and a 3D texture whose
results are still in a storage image is flushed and uploaded instead.

PPSA01317 samples a mipmapped format-43 texture at a LOD other than 0
and a format-43 cube map during boot.

AI-assisted: yes
2026-10-17 16:53:37 -04:00
Dean 90fcd20fa9 Merge pull request #7180 from Ondra97/codex/fix-pipeline-queue-admission
fix(agc): count pipeline jobs after queue admission
2026-10-18 09:53:36 +13:00
Dean dacd2e991c Merge pull request #7151 from Bonjourcestmatt/fix/socket-type-eprototype
fix(libkernel): return EPROTOTYPE for a socket type inet does not have
2026-10-18 09:51:50 +13:00
Dean b2cbba6cce Merge pull request #7160 from milescoviello/fix/clip-cull-test-user-data
test(agc): keep the pixel user data alive through its recompile
2026-10-18 09:50:05 +13:00
Dean 430f99a999 Merge pull request #6213 from milescoviello/fix/libc-getifaddrs-guest-heap
fix(libc): allocate the getifaddrs list on the application heap
2026-10-18 09:47:10 +13:00
Dean 0104aba62a Merge pull request #7144 from voidlakhan/fix/savedata-getmountinfo-getparam-errors
fix(savedata): return parameter error on null arguments in getMountInfo and getParam
2026-10-18 09:46:38 +13:00
Dean d167c0c362 Merge pull request #7141 from Bonjourcestmatt/fix/clock-gettime-efault
fix(libkernel): return EFAULT from clock_gettime for a null result pointer
2026-10-18 09:45:59 +13:00
JJenkx a3ed32e682 fix(agc): retain import settle resources per device 2026-10-17 16:45:42 -04:00
Dean 084bd39a08 Merge pull request #7133 from pushkarreddyy/fix/libkernel-write-throttling-null-efault
fix(libkernel): return EFAULT from sceKernelWriteThrottlingStatus for a null status
2026-10-18 09:45:24 +13:00
Dean 64df590f4c Merge pull request #7076 from AlexOfTheForest/fix/socket-write-space
fix(libkernel): report free send space for socket write events on Linux
2026-10-18 09:44:37 +13:00
Dean b95768d1b0 Merge pull request #6540 from JJenkx/fix/kernel-cpuset-thread-id
feat(libkernel): support cpuset affinity by guest thread ID
2026-10-18 09:43:55 +13:00
milescovielloandClaude Opus 5.5 f69e6c0934 fix(libSceSystemService): declare the PsmKit local process exports
Forever Launcher (PPSA99030) imports sceSystemServiceAddLocalProcessForPsmKit
and sceSystemServiceKillLocalProcessForPsmKit and stops at load without
them. AnyPS5 runs one process and starts no other, so both throw without
reading their arguments. The parameters follow the title's own firmware
probes (path, argv and a 0x90-byte parameter block; the kill takes the
returned handle), and the unknown results are recorded as technical debt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:43:32 +00:00
milescovielloandClaude Opus 5.5 b4e129ff80 fix(libc): give the scripting heap hooks blocks from libc's own heap
scriptingGetMem and scriptingFreeMem went through the title's registered
allocator. A title that ships its own libc.prx has already initialized that
allocator, and the application heap's lazy initialization then ran its
initializer a second time: Metal Gear Solid Master Collection (PPSA18194)
started a second Unity heap and aborted when it freed a block of the first.
The hooks now allocate and free through libc's guest heap, so they never
initialize the registered allocator; sizes that overflow return null.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:43:32 +00:00
milescovielloandClaude Opus 5.5 dde480e6c8 feat(libc): answer malloc_stats_fast for the default heap
Ship of Harkinian (PPSA99320) logs its heap use with malloc_stats_fast
every 10 s and stopped on the first call, since only an application
allocator could answer it. The default heap now keeps its system and
in-use byte counts with their peaks and fills the same managed-size
block as sceLibcMspaceMallocStatsFast, whose layout moves to a shared
header.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:43:32 +00:00
milescovielloandClaude Opus 5.5 d7c83db2a5 feat(libkernel): read and set the GS base through sysarch
sysarch's AMD64_GET_FSBASE, AMD64_GET_GSBASE and AMD64_SET_GSBASE now
follow FreeBSD 11's amd64 sysarch on Linux x86-64 through arch_prctl: the
GS base is the calling thread's, a base at or above VM_MAXUSER_ADDRESS
returns EINVAL and a null argument EFAULT. AMD64_SET_FSBASE, whose base
guest and host code share for their TLS, other operations and other hosts
still throw. Wine sets its TEB this way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:43:32 +00:00
milescovielloandClaude Opus 5.5 20764888c3 feat(libkernel): report the guest address-space map through kern.proc.vmmap
sysctl {CTL_KERN, KERN_PROC, KERN_PROC_VMMAP, pid} for the calling process
returns packed FreeBSD 11 kinfo_vmentry records, one per used range of the
guest arena, with the protection sceKernelVirtualQuery reports. Other pids
return ESRCH, a write EPERM, a short buffer ENOMEM. GuestArena gains a
query for the used range at or after an address.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:43:31 +00:00
milescovielloandClaude Opus 5.5 162f4af40b fix(libkernel): export sysarch so modules that import it load
The Wine port (PPSA99995) ships an ntdll module that imports sysarch
(b7uXQmnfB2s). libkernel did not export it, so loading stopped with
"undefined symbol: b7uXQmnfB2s" before the title ran.

Export sysarch as a stub that reports that it is not implemented: the
title loads and runs its launcher without calling it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:43:31 +00:00
Dean 82cad6b5fc Merge pull request #6237 from milescoviello/fix/loadexec-exit-shutdown
fix(libSceSystemService): park guest threads during LoadExec's shutdown as exit does
2026-10-18 09:41:59 +13:00
Dean 0f0d4004a4 Merge pull request #6517 from Wild-Badger/fix/libc-wide-collate-layout
fix(libc): count wide collate string elements
2026-10-18 09:41:21 +13:00
Dean e0045fb6ef Merge pull request #6518 from qpavyros/codex/mutexattr-invalid-attributes
fix(libkernel): return EINVAL for invalid mutex priority attributes
2026-10-18 09:41:01 +13:00
Dean b5e570d06a Merge pull request #7092 from milescoviello/fix/kevent-note-lowat
fix(libkernel): take NOTE_LOWAT on socket read and write events
2026-10-18 09:40:43 +13:00
Dean ee14990418 Merge pull request #7073 from AlexOfTheForest/fix/getlk-unlock
fix(libkernel): answer F_GETLK with F_UNLCK on Linux and macOS
2026-10-18 09:39:47 +13:00
MarcZX100 a352941e77 fix(libkernel): release flexible accounting after fixed mmap 2026-10-17 20:22:14 +00:00
thuanquangandClaude Opus 5.5 7b45d1034e fix(shader): run buffer atomics through a V# off a DWORD boundary
The binding plan refused every buffer atomic through a V# whose base is
not a multiple of 4. On RDNA2 such an atomic works when base + offset is
on a DWORD boundary and stops the dispatch otherwise, which the runtime
buffer atomic already does, so the refusal is dropped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 03:22:06 +07:00
milescovielloandClaude Opus 5.5 90c3b61c6c fix(agc): sample a multisampled target whose format differs only in red/blue order
Sampling a native multisampled color target through a texture of
another format was refused even when the two formats store the same
bytes in the other channel order. Rush 2 and Wave Race 64 render a
3840x2160 8x target as 8_8_8_8 with the alternate component swap
(B8G8R8A8_UNORM) and sample it through an 8_8_8_8 UNORM T#
(R8G8B8A8_UNORM), and stopped on "sampling multisampled color target
... (vk format 44) as a ... texture ... guest format 56 (vk 37) is not
implemented".

For the B8G8R8A8/R8G8B8A8 pairs of the same numeric type the texture is
now the target's own image with red and blue exchanged in its component
mapping, composed with the T#'s swizzle. Other format differences are
still refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 19:46:29 +00:00
thuanquangandClaude Opus 5.5 e1341df3b9 fix(libSceVideodec2): decode after a flush without a reset
sceVideodec2Decode threw when it followed sceVideodec2Flush without
sceVideodec2Reset. It now resets FFmpeg's drained decoder and decodes the
unit, keeping the pictures the flush has not returned yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 02:42:34 +07:00
thuanquangandClaude Opus 5.5 f2a4236ab6 fix(agc): draw rect lists in last provoking vertex mode
The generated rect-list control stage gave every corner of a rectangle the
flat inputs of its first vertex, so last mode was refused for rect lists.
BuildRectListShaders now also builds a control stage that takes them from
the rectangle's third vertex when the pixel shader has a flat input, and a
draw in last mode uses it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 02:38:26 +07:00
Nithishvelan M 87f2e7a88c fix(libSceSaveData.native): drop size 0 and resource validation per review 2026-10-18 01:05:22 +05:30
Nithishvelan M 0c92c51b36 refactor(libSceMsgDialog.native): drop Export.cpp changes and retain lifecycle tests 2026-10-18 01:02:13 +05:30
lorkydey 7c07ebd095 feat(libc): implement getw and putw 2026-10-17 21:28:18 +02:00
Adrià FranchandClaude Sonnet 5.5 28b3ce0fe3 fix(main): run the large cache file test alone with a longer hang limit
Windows run 39061030084: agc_shader_disk_cache_large_file wrote 2 GiB in 141 s next to 1399 parallel tests (limit 120 s), and conventions_function_bodies_shard_4 timed out at 30 s on the same loaded runner. The test is now RUN_SERIAL and its hang limit is 200 s (ctest timeout stays 240 s).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-17 21:26:00 +02:00
Nithishvelan M 18ce9241e6 fix(libSceMsgDialog.native): validate null argument and busy state across dialog lifecycle 2026-10-18 00:39:01 +05:30
Adrià 5859889b29 Merge pull request #6133 from AkulTyagi11/feat/libc-modti3
feat(libc): implement __modti3
2026-10-17 21:06:42 +02:00
Romans Pokrovskis c660ed5c3f test(agc): check all uniform MSAA CMASK byte codes 2026-10-17 18:59:54 +00:00
milescovielloandClaude Opus 5.5 12b20e17f6 fix(agc): read a multisampled target's CMASK by its MSAA codes
A multisampled color target with a CMASK fast clear seeds its state from
the CMASK when it is first used, and later fills of the CMASK update it.
Both read the bytes as DCC keys: 0x00 is a clear, 0xff uncompressed, and
anything else refuses ("reads as mixed"). But an MSAA CMASK nibble is
FMASK code | color code << 2 (Mesa ac_descriptors.h CMASK_MSAA_CODE), so
0xcc (FMASK cleared to fragment 0, color expanded), and the 2x and 4x
"FMASK uncompressed, color expanded" codes 0xdd and 0xee, are states with
no pending fast clear that were refused. Ruffle (PPSA68091) clears its
target's CMASK to 0xcc every frame and stopped on the refusal whenever
that clear landed before the target's first use.

The seed now reads the uniform CMASK byte (after pending writes, like the
key read) and both paths classify it by those codes: 0x00 (register color
clear, FMASK cleared) is the fast clear as before, any color-expanded code
(0xc to 0xf in both nibbles) is "no fast clear", and other codes, or bytes
that differ, are still refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 18:59:53 +00:00
Adrià Franch b54018e341 fix(main): unique directory for the large cache file test
Culprit: a03ccc6be (large cache files in chunks); failing run 39057904312.
The test used a fixed directory in the temp dir; the runners of one host
share it, so a concurrent run left a second entry behind.
2026-10-17 20:57:28 +02:00
thuanquangandClaude Opus 5.5 b55d411512 test(agc): skip kept-denormal f64 rounding rows a device cannot preserve
Lavapipe reports no f64 DenormPreserve, so the shaders get no
DenormPreserve 64 and it may flush f64 denormals; the rows of modes that
keep them then fail with or without the recompiler change (frexp, floor,
ceil and fract of 2^-1074 on Mesa 25 and 26). As in F64FmaSubnormals,
a mismatch in those modes is reported as skipped on such a device. The
modes that flush f64 denormals are still checked on every device.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 01:56:04 +07:00
thuanquangandClaude Opus 5.5 a314f2b85f fix(shader): flush f64 floor, ceil, fract and frexp denormal inputs
v_floor_f64, v_ceil_f64, v_fract_f64, v_frexp_mant_f64 and
v_frexp_exp_i32_f64 ignored the FLOAT_MODE f16/f64 denormal field. On
RDNA2 (gfx1031) bit 6 clear flushes a denormal input to a zero of its
sign, so v_ceil_f64 of 2^-1074 is 0 instead of 1, and bit 7 clear
flushes the denormal result v_fract_f64 gives for a positive denormal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 01:54:10 +07:00
Nithishvelan M c43c931005 fix(libSceSaveData.native): validate initialization and parameters in transaction resource lifecycle 2026-10-18 00:19:48 +05:30
milescovielloandClaude Opus 5.5 8f0bd51c5d test(libc): a protection change replaces the kept lease snapshots
A range turned unreadable must leave the next readable lease and show as
unreadable in the next lease of all ranges, the kept snapshots must not
count as a pin when the protection change waits for leases, and the
replaced range must not outlive the change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 18:48:42 +00:00
milescovielloandClaude Opus 5.5 80b929758f perf(libc): keep the guest allocation lease snapshot until the registry changes
The registry cached its lease snapshot only while a lease held it, so the
first lease taken after the others ended rebuilt the snapshot from the whole
registry: every address-based build and import refresh paid a walk of every
range and a reference to each. The registry now keeps the snapshot until the
next registry change, which drops it as before; the pin check of a mutation
drops it before counting the leases that hold a range.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 18:48:42 +00:00
milescovielloandClaude Opus 5.5 1dd716ec62 perf(agc): time compute pipeline creation
VulkanDevice::createComputePipeline, used by dispatches and the pipeline
journal's replay, had no PerformanceTimer, so a dispatch that compiles its
pipeline showed up in traces and frame timing as Driver.Dispatch time with
no slice under it. It is now Vulkan.ComputePipeline, as graphics pipeline
builds already are Vulkan.GraphicsPipeline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 18:48:41 +00:00
milescovielloandClaude Opus 5.5 dbf176f2ef fix(shader): store through DIM 2D image_store to a cube T#'s BASE_ARRAY face
A DIM 2D image_load through a cube T# already reads texel (x, y) of the
T#'s BASE_ARRAY face (#4139, measured on RDNA1). A DIM 2D image_store to
a cube T# had no matching runtime mode and threw "image descriptor is
incompatible with the static runtime image interface". Crimson Desert
writes a 16_16_16_16_FLOAT cube this way from a compute shader.

A mip-less image_store to an image the program only stores to now takes
the same face mode, writing texel (x, y) of the BASE_ARRAY face, the
face the measured load reads. Stores were not measured on hardware; the
debt entry says so. Formats that store through a conversion (SINT) keep
throwing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 18:48:41 +00:00