Commit Graph
14017 Commits
Author SHA1 Message Date
Dean 535587cf03 Merge pull request #7769 from jotitadev/fix/agc-flush-pending-wait-flushing
fix(agc): wait for an image another thread is storing before a host read
2026-10-20 05:22:02 +13:00
ionut27001andClaude Opus 5.5 ad9772edd1 fix(libkernel): report the getrlimit values measured on a PS5 for RLIMIT_STACK, RSS, MEMLOCK and NPROC
In a payload process on a PS5 (firmware 12.70), getrlimit returns
0x200000 for RLIMIT_STACK, infinity for RLIMIT_RSS and RLIMIT_MEMLOCK,
and 1604 for RLIMIT_NPROC, each as both soft and hard limit. These four
threw here. Whether a title process reads the same limits is not
measured.

setrlimit reads getrlimit first, so it now accepts RLIMIT_STACK,
RLIMIT_RSS and RLIMIT_MEMLOCK when the values do not change, as the
payload process does. RLIMIT_NPROC throws: in the payload process
setting it to its current value succeeds, but getrlimit then reads 1443,
and the limit is not stored here. Any other change still throws. The
getrlimit and setrlimit debt entries also record the payload process's
RLIMIT_DATA and RLIMIT_NOFILE readings, its 12555 clamp of RLIMIT_NOFILE
and its RLIMIT_NPROC reading after a same-value set.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 18:21:34 +02:00
Adrià a12b860402 Merge pull request #6976 from CrimsonMac/fix/lds-lock-release-barrier
fix(shader): release the LDS lock with an exchange and drop fences inside it
2026-10-19 18:20:43 +02:00
emirplus 5965ea6100 fix(tools): read C++ source files with utf-8 encoding in progress scanner 2026-10-19 19:19:55 +03:00
emirplus 854570694f docs(env): list APS5_CPU_FLIP_IN_ORDER in the environment reference 2026-10-19 19:19:38 +03:00
Adrià 5638146d6a Merge pull request #7526 from Amoenus/codex/docs-trace-summary-seconds-main3e3e
docs(dev): correct periodic trace summary interval units
2026-10-19 18:18:10 +02:00
Alexandre Sanchez 98ebc9df1b Merge branch 'main' into fix/agc-cached-image-msaa-guard 2026-10-19 18:12:52 +02:00
milescovielloandClaude Opus 5.5 38ec04c3e7 test(avplayer): check every VP9 frame of the WebM clip in a video-only pass
With audio enabled the player drops video frames that fall behind the
audio-driven clock, so the A/V pass can only require some frames, which
dropped the check that VP9 decodes the whole clip (#7935). A first pass
now enables only the video stream in no-sync mode, where nothing is
dropped, and requires all 6 frames of the clip, each checked by
CheckVideoFrame, with increasing timestamps. The A/V pass after it keeps
the timing-tolerant counts and also requires increasing timestamps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 16:03:16 +00:00
Adrià Franch 2a1ca278ee docs(libSceJson2): list the unverified String, swap and iterator members as debt 2026-10-19 18:02:53 +02:00
Swetabh Singh d6f89b5ca5 feat(libSceJson2): implement Value, Object, Array, and String methods 2026-10-19 18:02:40 +02:00
Adrià Franch 0f16c25f79 docs(libSceNet): record the TCP_NODELAY option and its deviations from FreeBSD 2026-10-19 18:01:15 +02:00
Lindamea1andClaude Opus 5.5 0c84ec45f0 fix(libSceNet): support TCP_NODELAY in sceNetSetsockopt and sceNetGetsockopt
sceNetSetsockopt and sceNetGetsockopt failed with EOPNOTSUPP
(0x8041012d) for every level other than SOL_SOCKET, so TCP_NODELAY
could not be set on a libSceNet stream socket; libkernel setsockopt on
such a socket failed the same way. FreeBSD 11.4's sosetopt and sogetopt
(uipc_socket.c) pass any other level to the protocol: tcp_ctloutput
sets TF_NODELAY and returns 0, a get returns t_flags & TF_NODELAY (4),
an option it does not know fails with ENOPROTOOPT, and on a UDP or raw
socket ip_ctloutput and rip_ctloutput fail the IPPROTO_TCP level with
EINVAL. Set TCP_NODELAY on the host socket of a stream socket, read it
back as TF_NODELAY, fail other IPPROTO_TCP options on a stream socket
with ENOPROTOOPT (0x8041012a), and fail the IPPROTO_TCP level with
EINVAL on other socket types, as libkernel already does for its own
sockets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 18:01:00 +02:00
Adrià 32004dfa55 Merge pull request #6992 from MarcZX10/codex/fix-stat-symlink-6983
fix(libkernel): return ELOOP when stat follows a symlink loop
2026-10-19 18:00:27 +02:00
mazen cb7ee022cf fix(agc): require the pass-input barrier only for an in-place read
Windows NVIDIA copies index and vertex ranges, so an open pass does not read the guest indices. The hazard check stays for devices that do read them in place.
2026-10-19 19:56:07 +04:00
Ondra97 51e75dec25 fix(json2): preserve values when type allocation fails 2026-10-19 17:56:05 +02:00
Adrià 0fbfd91e5e Merge pull request #6985 from Lorkydey/feat/libc-floating-point-controls
feat(libc): implement floating-point rounding and exception flags
2026-10-19 17:54:33 +02:00
Adrià ee9bfe177e Merge pull request #6974 from HamidRezaLS/perf/relinker-tls-reachability-opt
perf(relinker): flat address-taken vector and region query caching in strict reachability
2026-10-19 17:53:17 +02:00
emirplus 8836668ef4 fix(tools): preserve lf line endings on stderr in stubgen 2026-10-19 18:52:56 +03:00
emirplus 6de562f8a3 fix(tools): fetch upstream tracking base before resolving default base 2026-10-19 18:51:14 +03:00
Nithishvelan M e775e456d8 fix(libc): add bad_optional_access exports, test, and clarify debt 2026-10-19 21:20:02 +05:30
Lindamea1andClaude Opus 5.5 6206c230c4 fix(libSceSaveData.native): count PS5 save data in 64 KiB blocks, at most 16384
The PS5 references count save data differently from the PS4: SharpEmu
uses a 64 KiB block, and SharpEmu and KytyPS5 allow 48 to 16384 blocks
per save, which at 64 KiB a block is 3 MiB to 1 GiB, the PS4's byte
range. The module used the PS4 values, 32 KiB blocks and a 32768-block
maximum. At 64 KiB a block, sceSaveDataDirNameSearch and
sceSaveDataGetMountInfo therefore counted up to twice the blocks a
save's files use, and a save without a recorded size reported 32768
blocks, which is 2 GiB.

The search test now expects 64 KiB blocks and the 16384 maximum, and
the block accounting gets its own technical debt entry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 16:49:19 +01:00
Nicolas Abosch 843084a9d1 Merge remote-tracking branch 'origin/main' into perf/gpu-wake-sleeps 2026-10-19 12:44:46 -03:00
Nicolas AboschandClaude Sonnet 5.5 447b744ddf test(libkernel): run guest_sleep_wake with coarse timed waits too
With APS5_COARSE_TIMED_WAITS set a sleep is never ended early.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 12:44:39 -03:00
Adrià Franch 6d151aa70c docs(libSceWebBrowserDialog): drop BOM, restore debt line formatting 2026-10-19 17:40:39 +02:00
Nithishvelan M 22f7542e49 docs(libSceWebBrowserDialog): document unverified close-before-open lifecycle 2026-10-19 17:40:29 +02:00
Nithishvelan M 239b74c18a fix(libSceWebBrowserDialog): transition to finished on dialog close 2026-10-19 17:40:29 +02:00
Adrià d047690c63 Merge pull request #6967 from CrimsonMac/fix/libc-u8path-deprecation
fix(libc): build the working directory path without deprecated u8path
2026-10-19 17:40:22 +02:00
Adrià Franch 46e1da4d97 docs(libSceCdlgPlayerReview): restore debt file formatting, record unverified close lifecycle 2026-10-19 17:39:28 +02:00
Nithishvelan M 85dcaddf35 docs(libSceCdlgPlayerReview): document unverified close-before-open lifecycle 2026-10-19 17:39:18 +02:00
Nithishvelan M 0647c0a5b3 fix(libSceCdlgPlayerReview): transition to finished on dialog close 2026-10-19 17:39:18 +02:00
Adrià c017549dc1 Merge pull request #6955 from alfalfa-star/perf/agc-space-page-reuse
perf(agc): reuse a cached address space's committed pages on a hit
2026-10-19 17:33:02 +02:00
Adrià 88a6b34bc5 Merge pull request #6966 from ebosido444-ai/fix/agc-relocated-header
fix(agc): resolve a relocated AGC header whose arrays hold the registered bytes
2026-10-19 17:28:19 +02:00
Adrià 01ef2d2961 Merge pull request #6981 from Lorkydey/fix/selected-test-fixture-builds
fix(ci): build fixture helpers added by CTest
2026-10-19 17:28:14 +02:00
T3cm0andClaude Opus 5.5 151f116550 feat(libSceVrTracker2): answer as the console's module before initialization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 17:28:03 +02:00
Adrià 4393456ed0 Merge pull request #7010 from MarcZX10/codex/trace-dispatch-queue-origin
chore(agc): tag dispatch IO traces with queue origin
2026-10-19 17:27:46 +02:00
Adrià Franch a4287f344d test(agc): reject request serialization version 39 as unsupported 2026-10-19 17:26:37 +02:00
Adrià Franch 00b02d633d test(agc): expect request serialization version 38 2026-10-19 17:26:37 +02:00
sussyandClaude Sonnet 5.5 742af5fc8d fix(agc): name both missing features when mesh barycentrics cannot be provided
A pixel shader on the mesh path that reads barycentrics on a device with
neither VK_KHR_fragment_shader_barycentric nor VK_EXT_mesh_shader
reported only the missing mesh shaders. Say that the device has neither,
so reports from such devices are told apart from the case the emulation
covers.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 17:26:37 +02:00
sussyandClaude Sonnet 5.5 4d60321f1f feat(shader): emulate per-vertex parameters on the mesh path
A pixel shader that reads per-vertex parameters (v_interp_mov of P10 and
P20) on a device without VK_KHR_fragment_shader_barycentric now works on
the mesh path too. The mesh program stages each such parameter in
workgroup memory and writes the values of the three vertices of every
primitive as a per-primitive output, in the order of the triangle
indices; the pixel shader reads them from there.

The emulation throws when the staging, the output components or the
output memory exceed the device's mesh limits, or when the mesh
configuration uses a provoking vertex other than the first.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 17:26:37 +02:00
sussyandClaude Sonnet 5.5 dd41527ce2 feat(shader): emulate smooth barycentrics on the mesh path
A pixel shader that reads barycentrics on a device without
VK_KHR_fragment_shader_barycentric used to need a vertex shader so a
generated geometry stage could follow it, which a mesh pipeline cannot
have. The mesh program is now compiled a second time with the layout
its pixel shader needs: it writes its clip position as a varying and the
three corner positions of each primitive as per-primitive outputs, and
the pixel shader solves for the weights, for both smooth and linear
interpolation.

The layout is part of the mesh cache key, the stored artifact and the
captured request. Without VK_EXT_mesh_shader the draw still throws, now
saying so. Per-vertex parameters on the mesh path still throw.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 17:26:37 +02:00
Kovalev Vladislav 8d45d5c446 test(shader): cover device paths within host file IO limits 2026-10-19 21:25:57 +06:00
Lindamea1andClaude Opus 5.5 5fafbef246 test(libkernel): check the Linux TIOCGWINSZ word and the ioctl request boundaries
The OpenOrbis net_http sample stops on 0x5413, the Linux TIOCGWINSZ
that musl sends to standard output; the carried cases covered 0x5401
but not that word, so the test adds it to the malformed words. It also
pins the two boundary words the check takes as well-formed, 0x20046601
(IOC_VOID, length 4) and 0x80006601 (IOC_IN, length 0): on a guest
socket with a null argument they fail with EFAULT, not ENOTTY.

The debt sentence now states the open gap: an input request with
length 0 is not rejected as malformed, while sys_ioctl rejects it in a
kernel built without COMPAT_FREEBSD4, COMPAT_FREEBSD5 and COMPAT_43,
and which of these the PS5 kernel has is unknown.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 16:25:42 +01:00
Hussein Kadhim baa6d4aeee fix(libkernel): fail a malformed ioctl request with ENOTTY before the descriptor is looked at
FreeBSD's sys_ioctl rejects a request with no direction bit, an output request with no length, or a void request whose length is not an int before it reads the argument or resolves the descriptor. ioctl threw on such a request for a file, pipe or directory, failed with EBADF for a closed descriptor and with EFAULT for a socket given no argument.

(cherry picked from commit 501518f321ac5d0b45ce1090af39c680927edf49)
(cherry picked from commit 3eb7edd9cf)
2026-10-19 16:25:42 +01:00
Lindamea1andClaude Opus 5.5 3237083172 fix(libkernel): return ESRCH from scePthreadAttrGet for a thread that has ended
scePthreadAttrGet copied the attributes of any non-null handle, so a
thread that was joined or had finished still answered 0, and a thread
that ended detached was read after its object had been freed. FreeBSD
11.4's _pthread_attr_get_np returns ESRCH for a dead or reclaimed thread,
and Monster Hunter Wilds (PPSA24191) reuses a slot of its thread table
only when scePthreadAttrGet returns 0x80020003.

After the EINVAL checks it now returns ESRCH unless the handle is a live
guest thread, and copies the fields while holding the thread registry
lock (LockLiveGuestThread), so a detached thread exiting during the call
is not freed under the copy. GuestThreadIsLive uses the same lookup.
pthread_attr_get_np, which the title does not import, is left as it is;
the debt entry records the difference.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 16:25:14 +01:00
Dean Galvin 064a6f98ab Merge main into pr-7427
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
2026-10-20 04:25:03 +13:00
Adrià cded26c687 Merge pull request #7007 from MarcZX10/codex/filter-host-ca-pem
fix(libkernel): filter host CA bundle to certificate blocks
2026-10-19 17:25:03 +02:00
Lindamea1andClaude Opus 5.5 179316c452 fix(libkernel): return ENOMEM from sceKernelAvailableDirectMemorySize when the range has no free block
A search range with no free direct memory returned EAGAIN (0x80020023).
A PS5 returns ENOMEM (0x8002000c) for an occupied range, as the
PS5_RetroArch author's console capture records, and PS5_PayloadSDK's
ps5_memory_query, which RetroArch uses for its memory status, gives up
on any other error.

LargestFree now returns the error: ENOMEM when no block is found, and
EAGAIN as before for a negative start, an end at or below the start and
an alignment that overflows when rounded to a page. guest_memory expects
ENOMEM for an occupied range and EAGAIN for those arguments. The
unmeasured argument handling is recorded in the libkernel debt file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 16:24:55 +01:00
Rajkamalcode 448cf78c69 fix(agc): skip storage write-back units that lie in no tiled slice
writeBackWindows retiles the kept 64 KiB units through the windows of the
surface's (layer, mip) slices. A unit can lie outside every window: the
tracking grid spans the whole guest range flat, while the slices of a 3D
surface taper in depth (HasLayer), so the upper depth slices' higher-level
blocks belong to no window. The empty window set then sized the retile
linear and scratch buffers at zero, and the zero-sized device buffer threw
'AGC graphics: zero-sized device buffer', aborting the process.

Keep such units as the guest left them: there is no tiled data of the
surface to retile or store. The caller alone accounts for the unit.
2026-10-19 20:54:46 +05:30
Agnibha Mukherjee 904bb59c25 fix(relinker): decode explicitly enqueued CFG targets at full bounds
The padding bound in buildGraph's decoding loop skipped worklist targets inside the trailing zero region without decoding them, so malformed mandatory roots were accepted silently and complete instructions at targeted zero offsets lost their reachable marking. Decode the first instruction at each popped target against text.size() and keep the codeSize bound for sequential fall-through only. Covers the entry, extra-entry, branch-target, complete-zero-instruction and zero-immediate cases in the direct API test and in the CLI fixture.
2026-10-19 17:24:04 +02:00
Agnibha Mukherjee 1f28b37898 fix(relinker): stop the unused-filter CFG walk before trailing zero padding
buildGraph fell through from the entry points into the segment's zero
padding; an odd-length zero tail left a lone 0x00 the decoder needs a
ModRM byte for, and the non-speculative walk let that truncation escape
the pipeline, so unused-filter=1 exited 2 on input the other levels
convert. Bound the walk before the trailing zeros the way
StrictReachability does; mandatory roots still decode strictly.
2026-10-19 17:23:57 +02:00