Commit Graph
12196 Commits
Author SHA1 Message Date
David 306229d940 Merge remote-tracking branch 'origin/main' into fix/netctl-default-route-macos
# Conflicts:
#	core/libs/tests/GuestNetCtl.cpp
#	docs/dev/debt/libSceNetCtl.md
2026-10-19 00:18:16 +04:00
David 8f4a50d727 Merge remote-tracking branch 'origin/main' into feat/shader-barycentric-tessellation-last-vertex
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
#	core/shader/recompiler/SpirvBackend/src/BarycentricGeometryShader.cpp
#	docs/dev/debt/libSceAgcDriver.md
#	docs/dev/debt/shader.md
2026-10-19 00:15:47 +04:00
David 5c2062cc0a test(relinker): cover branches into converted instructions past their prefixes 2026-10-19 00:10:07 +04:00
David cb9329f0e4 fix(relinker): ignore direct branch targets inside an instruction past its prefixes 2026-10-19 00:10:07 +04:00
Adrià f3059421f3 Merge pull request #6166 from freshstart2066-create/feat/libc-fabsf-fabsl
feat(libc): implement fabsf and fabsl
2026-10-18 22:09:51 +02:00
thuanquangandClaude Opus 5.5 a9cd39045b fix(shader): write a mesh shader's layer through a per-primitive block
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 03:07:32 +07:00
Josip Parlov a624d8d774 perf(agc): wait only for the key bytes' writers when reading DCC keys under a unit shadow
readDccKeys publishes the shadowed units over the keys and then waited for every recorded batch. The publish notes its copies as pending writes, so waiting through the keys' newest writer is enough, and nothing needs a wait when neither the publish nor another recorded write covers them (a stale unit's slab is dropped, not copied).
2026-10-18 22:02:30 +02:00
Adrià 05171bc66b Merge pull request #5987 from GustavoGamarra95/fix/agc-device-memory-host-fallback
fix(agc): place device memory in host memory when the driver refuses a device-local allocation
2026-10-18 22:02:03 +02:00
Josip Parlov ca01351ff8 test(shader): check window values across blocks and loop iterations 2026-10-18 22:00:35 +02:00
Adrià b8cd204a3f Merge pull request #6220 from DavidSamir/fix/libkernel-sysctl-kern-ostype
feat(libkernel): answer the uname sysctl names
2026-10-18 21:56:01 +02:00
Josip Parlov d1596f2723 perf(shader): drop window stores no relative read can see 2026-10-18 21:55:41 +02:00
Bl4ckk01 f4b090fbfd feat(libSceCesCs): implement Shift-JIS CP932 encoding conversions 2026-10-18 21:41:40 +02:00
hypermistandClaude Opus 5.5 e2a4d109c0 fix(agc): a mesh draw shorter than one primitive draws nothing
A direct mesh draw with fewer indices than its input primitive threw "mesh draw
contains no complete primitive" (about 1800 skipped draws per 10 s in PPSA08427's
hub, each paying an exception). The hardware assembles no primitive from it, as
Vulkan does for a non-mesh draw that short, so it is now an empty draw. A mesh
pipeline grouping zero primitives still throws, with its own message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Uzy15wqYTt6iWyxYXEzUWo
2026-10-18 21:35:08 +02:00
Adrià 48d61f53b4 Merge pull request #6217 from milescoviello/fix/libc-malloc-stats-default-heap
feat(libc): answer malloc_stats_fast for the default heap
2026-10-18 21:31:59 +02:00
Adrià d098a7b140 Merge pull request #6170 from primesoul-web/feat/complete-remaining-libraries
feat(libs): finish the CesCs conversions and the AudioOut, AudioIn and GameUpdate exports
2026-10-18 21:31:54 +02:00
Mehran 192d95c5d1 perf(memory): skip 4 MiB runs no write stamped since a range check 2026-10-18 21:30:12 +02:00
fdfawef324andCodex a437891eb8 fix(agc): validate capture record type before inspecting its child
Keep malformed record structures outside the optional host I/O boundary.

Co-Authored-By: Codex <[email protected]>
2026-10-18 21:29:09 +02:00
fdfawef324andCodex b79bf445e3 fix(agc): stop optional compute captures at their bounds
Preserve strict capture validation and immutable writes while disabling
optional dispatch captures after capacity or host I/O failures.

Co-Authored-By: Codex <[email protected]>
2026-10-18 21:29:09 +02:00
Adrià 4b4385cb7f Merge pull request #6201 from bruceblake/libkernel-getdtablesize
feat(libkernel): implement getdtablesize
2026-10-18 21:26:33 +02:00
ionut27001 bd22a701f5 fix(libkernel): answer sysarch I386_GET_FSBASE, I386_GET_GSBASE and undefined operations as measured on a PS5
In a payload process on a PS5 (firmware 12.70), I386_GET_FSBASE (7) and
I386_GET_GSBASE (9) wrote 4 bytes, the low 32 bits of the FS and GS
bases, and failed with EFAULT for a null argument; both threw here. On
Linux x86-64 hosts they now do the same.

The nine operation numbers tried that FreeBSD 11's amd64 sysarch has no
case for (2, 5, 6, 12, 127, 133, 134, 1000 and -1), each with a null
argument, failed with EINVAL there, as its default case does, and threw
here. Every such number now returns EINVAL on every host.

Threads made with pthread_create and scePthreadCreate started with their
creator's GS base there; the test now checks that a guest thread does so
on Linux. The sysarch debt entry records these measurements and what
AMD64_GET_XFPUSTATE and I386_GET_XFPUSTATE returned there; both still
throw here.
2026-10-18 22:25:09 +03:00
Dean 6685795f77 Merge pull request #7626 from frankea/ssl-followup
feat(libSceSsl): apply the verify options, run the verify callback, add ALPN, non-blocking sockets and sceSslClose
2026-10-19 08:24:50 +13:00
xXPBSXxandClaude Sonnet 5.5 c664ffbec4 fix(libkernel): return EINVAL for pthread mutex and cond operations on a destroyed object
Locking, trylocking, unlocking a destroyed mutex and signalling, broadcasting,
waiting on or destroying a destroyed condition variable threw a C++ exception
into the guest. FreeBSD 11.4 libthr returns EINVAL for all of them (thr_mutex.c
check_and_init_mutex and mutex_unlock_common compare against THR_MUTEX_DESTROYED,
thr_cond.c CHECK_AND_INIT_COND and _pthread_cond_destroy against
THR_COND_DESTROYED). The condition wait path already reported EINVAL for a
destroyed mutex.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-18 21:23:54 +02:00
Scott SchusterandClaude Opus 5.5 7623f074f1 test(agc): a thread that never bumped takes the newest bumped collect epoch
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 21:21:02 +02:00
Scott SchusterandClaude Opus 5.5 537bbcc96c perf(agc): the presenter takes the newest collect epoch, so an untracked display image keeps its comparison memo
APS5_NO_PRESENT_EPOCH=1 compares the display surface at every present as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 21:21:02 +02:00
thuanquangandClaude cc69016858 fix(shader): follow long branches in the hoisted descriptor search
reachingWriter followed only fall-through and direct branches, so a V#
load on a path that reaches the loop through an s_setpc_b64 jump the
control flow analysis resolves was not seen, and another load could be
taken as the only writer. The walk now follows those jumps. It also
fails at s_call_b64 targets, whose callers it does not follow, instead
of walking from a function entry into the code above it.

Co-Authored-By: Claude <[email protected]>
2026-10-19 02:18:43 +07:00
Adrià Franch 6d732204a6 test(shader): skip RelativeIndexingKnownBits when the subgroup holds less than a wave32 2026-10-18 21:18:00 +02:00
WallisSkillandClaude Opus 5.5 8540328431 fix(libSceVideoOut): pace only the light bar and resend refused effects
The 30 ms limit gated all controller output, so a rumble pulse shorter
than the interval could be lost and a stop could wait up to 30 ms.
Rumble goes out on every output change again, as on main; SDL already
skips repeated values and merges consecutive rumble reports. Only the
light bar is paced: a changed colour is sent at most every 30 ms, always
the latest one, and a colour SDL refuses is retried after the interval.

The trigger effect is cached only when SDL_GameControllerSendEffect
succeeds, so a refused effect is sent again on the next update as it was
before. LightBarPacer and TriggerEffectCache hold these decisions;
pad_output_pacing covers changes, retries, a new controller and a light
bar animated every frame at 120 Hz.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 02:14:44 +07:00
fdfawef324andClaude Opus 5.5 1db31b9c9e fix(agc): name preparation-failure shader dumps apart from dispatch captures
With APS5_DUMP_SHADERS set, PrepareShaderWithDiagnostics wrote a request
whose preparation failed under the same shader_<address>.req name that
dispatch and draw captures use. A preparation request has no captured
resources: the registration-time one carries placeholder (zero) user
data and only the code and header memory. Replaying such a file as a
dispatch capture follows the null user-data pointer into the SRT and
fails in SrtWalker, which looks like a walker bug but is not one.

dumpRequest also de-duplicated by address, so once a preparation
failure had been dumped, a later dispatch dump of the same shader was
silently dropped and the real capture was lost.

Preparation-failure dumps are now written as shader_<address>.prepare.req,
and dumpRequest de-duplicates by file name, so the later dispatch dump
of the same address is still written. agc_shader_replay's usage text
says to replay .prepare.req files with --prepare.

The FailureCapture test expects the .prepare.req name, no plain .req
from a preparation failure, and a subsequent dispatch dump of the same
address to be written with the serialized request.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 21:11:39 +02:00
mitul72 3e1f932d41 perf(shader): share folded SPIR-V constants and drop identity bitcasts
SPIR-V specialization emitted a new OpConstant for every folded result.
A folded value now reuses the id of an existing constant of the same
type and value for the operands the specialization decodes
(VisitInputs); consumers it does not decode, such as subgroup and
extended instructions, keep their own constant definitions, and the
unused-constant removal keeps those definitions while anything names
them. An OpBitcast to its operand's type or back to the type before a
previous bitcast becomes a copy. A compute program with one formatted
load shrinks from 10730 to 1117 words, so the formatted-load sharing
check compares the words two more loads add with the words the first
one added instead of with the module size.
2026-10-18 21:07:19 +02:00
mitul72 4064ff4c83 perf(shader): fold integer compares by value sets and known bits
IEqual32 and INotEqual32 against a constant fold when the other
operand has a value set of at most 64 values (built through shifts,
bitfield extracts, and/or/xor/mul/umin with a constant, add and
select) that excludes the constant or holds only it, or when a known
bit of the operand contradicts the constant. Known bits come from
constants, shifts and bitfield extracts by constants, and/or/xor, add
(up to the first unknown bit), mul (trailing zeros), umin, select, phi
and lane reads. The value set of x & mask leaves out the known bits of
x. ULessThan32 against a constant folds from the known-bit and
value-set bounds.

A fold pass computes the known bits and value set of each compared
operand once, so a chain of compares against one operand does not
repeat the analysis, and a sum is not enumerated when its two operand
sets hold more than 65 values together, since without wraparound it
then has more than 64 values.

All folds are identities of the operand's possible values; out-of-range
M0 handling of the relative indexing lowerings is unchanged. With
M0 = 4i + k, three of every four entries of an s_movrels/s_movreld
compare chain fold away.
2026-10-18 21:06:52 +02:00
Nicolas Abosch 5b59f257d8 Merge remote-tracking branch 'origin/main' into perf/gpu-wake-sleeps 2026-10-18 16:04:30 -03:00
Nicolas Abosch d22094d066 Merge remote-tracking branch 'origin/main' into perf/gpu-wake-sleeps
# Conflicts:
#	docs/dev/debt/libkernel.md
2026-10-18 16:04:17 -03:00
Adrià c4c2b3aa73 Merge pull request #6211 from milescoviello/fix/libc-telldir-seekdir
feat(libc): implement telldir and seekdir
2026-10-18 20:58:31 +02:00
Dean 400baa252b Merge pull request #6884 from MarcZX10/codex/udp-connect-port-zero-6880
fix(libkernel): reject port-zero connect on unconnected sockets
2026-10-19 07:51:55 +13:00
Adrià 8a7f434f19 Merge pull request #6196 from SandstromPL/fix/agc-msaa-enable-clear-one-sample-target
fix(agc): rasterize into one-sample targets as one sample when MSAA_ENABLE is clear
2026-10-18 20:49:55 +02:00
Adrià c73787f443 Merge pull request #6157 from freshstart2066-create/feat/libc-erf-erfc
feat(libc): implement erf, erfc, and erfcf
2026-10-18 20:49:50 +02:00
ANONYMOUSZED-beep 486f3069ae feat(shader): follow pointer chains from image-table records to the T# 2026-10-18 20:49:04 +02:00
frankea 51d0cb9623 test(ssl): reset the server socket only after the client's handshake is done
The Serve::Reset case closed with linger 0 as soon as the server's handshake returned, while the client could still be reading the last flight; on Linux the RST discards unread data, so sceSslConnect reported the closed socket instead of 0. The server now reads one byte the client writes after its sceSslConnect and resets after it.
2026-10-18 14:37:45 -04:00
Emanuele f67e221738 test(libc): check that the macOS guest arena keeps free space beside host regions
The four guest_arena tests still pass with the mach_vm_region walk
disabled, because TryReserve marks every 1 GiB chunk it cannot reserve
as occupied. guest_arena_gap reads the host map before the arena
reserves its range and requires a fixed guest mapping in free space
that shares a chunk with a host region to be accepted.

The debt entry also records that on macOS 27.0.1 (M4 Pro) the
unmappable range starts at 0xF_C000_0000.
2026-10-18 20:33:33 +02:00
Dean 376c040294 Merge pull request #6112 from ayam04/fix/relinker-guest-preinit
fix(relinker): run guest preinit arrays before the module initializer
2026-10-19 07:33:14 +13:00
Dean 50f2090d53 Merge pull request #5981 from MarcZX10/codex/relinker-df-symbolic-5927
fix(relinker): preserve DF_SYMBOLIC on guest modules
2026-10-19 07:33:07 +13:00
Yunus Shaikh d0325058f7 Merge main into perf/shader-image-table-reuse-v3-pr
#7527's selected-record limit test reads a record's descriptor words through the
table snapshot's shared words list; this branch keeps a snapshot's words per column,
so the test reads them from its column instead.
2026-10-18 11:33:00 -07:00
Yunus Shaikh a74f343e58 Merge main into fix/agc-sample-location-grid-exact 2026-10-18 11:30:40 -07:00
Yunus Shaikh dc47a81b02 Merge main into fix/recompiler-once-per-pixel-sample-inputs 2026-10-18 11:30:31 -07:00
Yunus Shaikh 7da5ba7b3c Merge main into fix/agc-heap-mirror-replan-unwatched 2026-10-18 11:30:09 -07:00
Yunus Shaikh 6b4f24bb39 Merge main into perf/agc-remember-evicting-refusals 2026-10-18 11:29:38 -07:00
Yunus Shaikh 50a8db2030 Merge main into perf/agc-host-import-blocks 2026-10-18 11:29:27 -07:00
Yunus Shaikh e100002eb9 Merge main into perf/agc-host-import-aligned-blocks 2026-10-18 11:29:16 -07:00
Dean Galvin 2275d7a18f Merge main into pr-7153
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
2026-10-19 07:28:59 +13:00
MarcZX100 00ca965c57 fix(libkernel): reject connects on listening sockets first 2026-10-18 18:25:48 +00:00