Commit Graph

4607 Commits

Author SHA1 Message Date
Joey Fisher d024709cff perf(agc): sample comparison-read R32F/R16 surfaces from a GPU depth copy of their storage image 2026-10-11 04:52:36 +02:00
Adrià 6c9cb3a5db
Merge pull request #3225 from adriadam10/feat/libc-malloc-usable-size
feat(libc): implement malloc_usable_size
2026-10-11 04:49:41 +02:00
Adrià Franch 859f2f3b92 feat(libc): implement malloc_usable_size
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 04:41:39 +02:00
Adrià aac0f1b810
Merge pull request #3229 from adriadam10/carry/libc-random-state
feat(libc): implement random, srandom, initstate and setstate
2026-10-11 04:15:28 +02:00
Adrià Franch b1267b3388 docs(technical-debt): list the random family under unknown function info
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 04:07:59 +02:00
David 1671179c4f feat(libc): implement random, srandom, initstate and setstate
Port FreeBSD 11 lib/libc/stdlib/random.c (freebsd-src 4ab2e064): the
additive feedback generator with the default 128-byte TYPE_3 table,
good_rand seeding, state sizes rounded down to 8, 32, 64, 128 or 256
bytes, setstate returning the previous state, and initstate returning
null below 8 bytes without setting errno. Calls are serialised by one
lock; a null state throws.

The import audit of the homebrew catalog on main 262c0316 lists them as
absent libSceLibcInternal imports:
- random: PPSA74126 Stremio Plus, PPSA85300 VLC, PPSA99169 RetroArch,
  PPSA99177 PS5VR, PPSA99420 PS5MC, PPSA99505 Jelly5, PPSA99515 Emby5,
  PPSA99810 PSBox Cloud Gaming
- srandom: PPSA85300, PPSA99169, PPSA99420, PPSA99810
- initstate, setstate: PPSA99177, PPSA99420, PPSA99505, PPSA99515

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 04:07:38 +02:00
Adrià 84cc975e7d
Merge pull request #3221 from adriadam10/feat/libc-acosl-frexpl
feat(libc): implement acosl and frexpl
2026-10-11 04:06:58 +02:00
Adrià Franch 3cd36b0135 feat(libc): implement acosl and frexpl
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 03:58:47 +02:00
Adrià 6040a9626e
Merge pull request #3217 from adriadam10/test/agc-flat-apertures-parts
test(agc): split agc_driver_flat_apertures into six parts
2026-10-11 03:55:38 +02:00
Adrià Franch 9fe5d90cbe test(agc): split agc_driver_flat_apertures into six parts
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 03:47:10 +02:00
Adrià d31b57a4ca
Merge pull request #3208 from adriadam10/fix/agc-4444-mandatory-format
fix(agc): view 4_4_4_4 textures as B4G4R4A4, which every Vulkan device can sample
2026-10-11 03:20:57 +02:00
Adrià Franch bbe26912dc fix(agc): view 4_4_4_4 textures as B4G4R4A4, which every Vulkan device can sample
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 03:13:40 +02:00
Adrià 77bd928a3c
Merge pull request #3201 from adriadam10/feat/libc-ctime
feat(libc): implement ctime
2026-10-11 03:06:01 +02:00
Adrià 9ba3d0d7d4
Merge pull request #3198 from adriadam10/feat/libc-rewind
feat(libc): implement rewind
2026-10-11 03:02:07 +02:00
Adrià Franch ef2d56eb9c feat(libc): implement ctime
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 02:58:30 +02:00
Adrià Franch e7605c8fd6 feat(libc): implement rewind
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 02:54:24 +02:00
Adrià 06da117642
Merge pull request #3176 from adriadam10/carry/pthread-attr-setsolosched-np
feat(libkernel): implement pthread_attr_setsolosched_np
2026-10-11 02:24:45 +02:00
Adrià 343163a0c1
Merge pull request #3174 from adriadam10/carry/system-gesture-no-touch
fix(libSceSystemGesture): report no touch events for the primitive and recognizer calls
2026-10-11 02:22:43 +02:00
Adrià f1ae427b66
Merge pull request #1337 from TibixDev/pr/cmask-fast-clears
fix(agc): keep CMASK clears resident without host imports
2026-10-11 02:13:34 +02:00
Adrià Franch 8d90c1f190 docs(technical-debt): list pthread_attr_setsolosched_np under unknown function info
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 02:11:41 +02:00
David 064f5ca825 feat(libkernel): implement pthread_attr_setsolosched_np
The POSIX alias takes (attr, int), returns EINVAL (22) for a null or
uninitialized attribute like the other pthread_attr setters, and
stores the value through scePthreadAttrSetsolosched, returning its
result in errno form. The signature and the stored int follow the SCE
twin in KytyPS5 and sharpemu; PS5PCEM implements the alias the same
way. The value is not applied to scheduling, recorded in TechnicalDebt.

Returnal (PPSA01285 v03.000.005) stops on it after eager binding
(#2872, #1155):

    what(): pthread_attr_setsolosched_np_nid_postfix not implemented

LEGO Horizon Adventures (PPSA14632, #734) and Palworld (PPSA23126,
#2598) import it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-11 02:06:30 +02:00
Adrià Franch 894ef6db09 test(libSceSystemGesture): cover the handle and null checks of every recognizer call
Moves the no-touch line to "Silent stubs" and records the error-code disagreement with KytyPS5.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 02:04:04 +02:00
Adrià 942a174e0d
Merge pull request #3015 from MarcZX100/codex/prbatch-2805-lds-lock
fix(shader): avoid spinning in the spilled LDS lock
2026-10-11 02:03:58 +02:00
Adrià e8d6de4ae7
Merge pull request #1091 from kjhq/feat/libkernel-socket-events
feat(libkernel): implement read and write events for guest sockets
2026-10-11 02:02:31 +02:00
xXPBSXx 6e2ea0a071 docs(technical-debt): list the system gesture no-touch behavior
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 02:01:32 +02:00
xXPBSXx 4bf608565f fix(libSceSystemGesture): report no touch events for the primitive and recognizer calls
WIP: the TechnicalDebt entry for the silently successful calls is still missing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 02:01:32 +02:00
Adrià 2a38c0bd91
Merge pull request #3011 from MarcZX100/codex/prbatch-2988-cond-wait
fix(libkernel): return errors for waits with an unowned mutex
2026-10-11 01:59:12 +02:00
Adrià Franch 6b9f0cd01a test(agc): pass the gpu flag to GuestAllocations::Mutation::Add in the CMASK pass test 2026-10-11 01:58:31 +02:00
Adrià a0d669926c
Merge pull request #2996 from MarcZX100/fix/agc-mesh-wave32-subgroup-2815
fix(agc): require 32-lane subgroups for wave32 mesh programs
2026-10-11 01:58:20 +02:00
TibixDev 9207f7245c fix(agc): keep CMASK clears resident without host imports
Use the upstream CMASK implementation and remove the import requirement from image clears. Propagate storage-image creation failures. Test repeated clears, copied write-back, and failure without changing guest data.

AI-assisted: yes.
2026-10-11 01:57:26 +02:00
kjhq 0abe0b832b feat(libkernel): wake socket read and write events instead of polling
A wait on an equeue that holds socket events now blocks in poll/WSAPoll on
those sockets plus a per-thread loopback wake socket, instead of rechecking
every millisecond. Adding, triggering or deleting an event and closing the
equeue wake the blocked waiters. Closing a socket removes its read and write
events, as on FreeBSD. A read event also reports EV_EOF once the peer has
shut down its sending side.
2026-10-11 01:54:15 +02:00
kjhq 9b7535c6a4 feat(libkernel): implement read and write events for guest sockets
sceKernelAddReadEvent/DeleteReadEvent and sceKernelAddWriteEvent/
DeleteWriteEvent register EVFILT_READ and EVFILT_WRITE events on guest
sockets. The equeue polls the host socket for readiness on each wait
and reports the readable byte count or the send buffer size in data,
with EV_EOF on hang-up or error.
2026-10-11 01:54:04 +02:00
Adrià e28fbc277d
Merge pull request #3010 from MarcZX100/codex/prbatch-2998-strerror
fix(libc): match FreeBSD errno message strings
2026-10-11 01:53:29 +02:00
MarcZX100 324be50c64 docs(libkernel): record condition wait errors 2026-10-11 01:53:27 +02:00
Hussein Kadhim 709c12e133 fix(libkernel): return EPERM or EINVAL when a condition wait gets a mutex the caller does not hold
pthread_cond_wait and pthread_cond_timedwait, and their sce counterparts, threw a
host exception when the mutex was unlocked, locked by another thread, or not yet
initialized, and dereferenced the adaptive static initializer. FreeBSD returns
EPERM for these (EINVAL for a destroyed mutex) before touching the condition.

(cherry picked from commit a78bb8a855ca3b277f128c6a9e52ff3949b9cb80)
2026-10-11 01:53:12 +02:00
ThatsLeo a2d82815b3 fix(shader): take the LDS lock with one attempt per loop iteration
The elected lane's inner spin loop never ended on Mesa ANV with the LDS in
a storage buffer. It now tries once and the outer loop elects again; the
update is unchanged.

(cherry picked from commit e894f9092326a849ebe1ce46ff0ed3b25fbb7e9b)
2026-10-11 01:52:59 +02:00
Adrià ed79bde5b9
Merge pull request #2987 from CouchRiv/fix-shader-f16-addmul-denorm-flush
fix(shader): flush scalar f16 add/mul/sub denormals to signed zero
2026-10-11 01:51:46 +02:00
Adrià 9d792ae477
Merge pull request #2989 from CnRJay/fix/srt-null-root-reads
fix(recompiler): read SRT words through a null user-data pointer as zero
2026-10-11 01:49:13 +02:00
Adrià 9402d32fc2
Merge pull request #2993 from CnRJay/fix/agc-indirect-getsize-count
fix(agc): ignore the count passed to the indirect register GetSize functions
2026-10-11 01:48:56 +02:00
Adrià 62419286cd
Merge pull request #3009 from MarcZX100/fix/libkernel-open-directory-3004
fix(libkernel): report ENOTDIR for Windows O_DIRECTORY opens
2026-10-11 01:48:46 +02:00
Adrià 935993d608
Merge pull request #2980 from JAB-dev/test/agc-draw-cache-reuse
test(agc): require a repeated draw to reuse the cached draw
2026-10-11 01:46:52 +02:00
Adrià b64c75fc12
Merge pull request #2939 from CnRJay/fix/agc-dcc-comp-to-single
fix(agc): expand comp-to-single DCC keys in a DCC decompress pass
2026-10-11 01:46:49 +02:00
Adrià abb2f8e4fc
Merge pull request #2986 from MarcZX100/fix/relinker-windows-unicode-2640
fix(relinker): support Unicode Windows startup paths
2026-10-11 01:46:23 +02:00
Adrià 30ab2f6ef5
Merge pull request #2990 from CnRJay/fix/agc-dispatch-ahead-indirect-arguments
fix(agc): stop the dispatch look-ahead before indirect arguments an earlier dispatch may write
2026-10-11 01:46:17 +02:00
Adrià c633e6d532
Merge pull request #2880 from SleglJan/fix/shader-log2-near-one
fix(shader): correct v_log_f32 near 1.0 when the driver's log2 strays from a series
2026-10-11 01:46:08 +02:00
Adrià f336979f3b
Merge pull request #2991 from CnRJay/fix/agc-nop-one-dword
fix(agc): encode a one-dword NOP as the header-only form
2026-10-11 01:46:02 +02:00
Adrià 5bd6912b0b
Merge pull request #2978 from MarcZX100/fix/libkernel-rwlock-destroy-busy
fix(libkernel): return EBUSY when destroying a held rwlock
2026-10-11 01:45:28 +02:00
Adrià 68afb3cbb7
Merge pull request #2976 from SleglJan/fix/agc-drain-registration-prepare
fix(agc): drain the registration preparation pool before the device is reset
2026-10-11 01:44:40 +02:00
Adrià 59a8cbab89
Merge pull request #2981 from MarcZX100/codex/system-service-language-2769
feat(libSceSystemService): select the console language
2026-10-11 01:43:53 +02:00
Adrià 3db065af86
Merge pull request #2984 from MarcZX100/fix/agc-ignore-unchanged-watched-blocks
fix(agc): ignore unchanged imported texture blocks
2026-10-11 01:43:27 +02:00