Commit Graph

1289 Commits

Author SHA1 Message Date
Adrià b44eeb967a
Merge pull request #3393 from LeandroLP23/fix/libc-printf-pointer-form
fix(libc): format %p as FreeBSD does on Windows
2026-10-11 11:58:03 +02:00
Adrià 708ffcd2ef
Merge pull request #3394 from LeandroLP23/fix/kernel-signal-unmapped-numbers
fix(libkernel): accept signal() for every valid signal number
2026-10-11 11:56:52 +02:00
Adrià 58a581d983
Merge pull request #3399 from MathiasDevelopes/codex/feat-npwebapi2-push-event-abort
feat(libSceNpWebApi2): export sceNpWebApi2PushEventAbortHandle
2026-10-11 11:56:32 +02:00
Adrià 76f2d72d40
Merge pull request #3384 from sypher69/fix/sce-dynlibdata-relocation-offsets
fix(relinker): resolve SCE relocation tables relative to dynlibdata
2026-10-11 11:55:28 +02:00
Adrià b70a0e278f
Merge pull request #1491 from Celegans12/feat/shader-tessellation-triangle-patches
feat(shader): implement triangle-patch tessellation
2026-10-11 11:50:50 +02:00
MathiasDevelopes 6d70a46f74 docs: remove gap between technical debt entries 2026-10-11 11:43:36 +02:00
MathiasDevelopes 0f45675768 feat(libSceNpWebApi2): export sceNpWebApi2PushEventAbortHandle
Titles that import it now load; calling it throws until push event
handles have operations that can be aborted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit f50cb08c988736d645f0cc1c329f911f732fa935)
(cherry picked from commit ae3227dbfa2c972b36242056df5971d858ac65c3)
(cherry picked from commit 3df66a6a5dd9f0cd73daaee1342c22742c1915e4)
2026-10-11 11:43:35 +02:00
Adrià 946ffa08d4
Merge pull request #3372 from alfalfa-star/fix/agc-fast-clear-import-window
fix(agc): keep a fast-clear copy where an import window can stamp watched memory
2026-10-11 11:40:15 +02:00
Adrià Franch c8f8014ea2 docs(debt): local programs get one artifact per tessellation configuration
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-11 11:37:19 +02:00
Adrià 097f4e2284
Merge pull request #3373 from MathiasDevelopes/codex/feat-coredump-thread-context-export
feat(libkernel): export sceCoredumpGetThreadContextInfo
2026-10-11 11:36:29 +02:00
Dani cdfc11cf56 fix(relinker): resolve SCE relocation tables relative to dynlibdata 2026-10-11 11:34:59 +02:00
Adrià 65d4a8b189
Merge pull request #3375 from MarcZX100/codex/libc-unlocked-streams-lockfree-1765
feat(libc): implement unlocked character I/O
2026-10-11 11:31:03 +02:00
Adrià Franch 48c9156d10 docs: remove stray blank line in the TechnicalDebt list 2026-10-11 11:28:44 +02:00
MathiasDevelopes 92303a2ee5 feat(libkernel): export sceCoredumpGetThreadContextInfo
Titles that import it now load; calling it throws like the other
coredump queries, since host crashes are not turned into guest dumps.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit e0e5fd9ffbbaffdc065d1471ce1c91b144af5f98)
(cherry picked from commit 2ac0c88fdbb9e380b6eb5a37d5f98d557940f131)
(cherry picked from commit 1279010b1bc123d3b87664ede15ec6ab2ced806a)
2026-10-11 11:28:39 +02:00
Adrià 0333ec91ed
Merge pull request #1482 from awake-devel/fix/libkernel-umtx-op
feat(libkernel): implement _umtx_op wait and wake operations
2026-10-11 11:26:12 +02:00
Celegans12 77dcb74ccd feat(shader): implement triangle-patch tessellation
DecodeShaderStages accepts LS, HS and an NGG passthrough ES, reads the
3-bit VGT_TF_PARAM fields, refuses its other bits but DISTRIBUTION_MODE,
and needs HOS levels that keep [1, 63]; 0x286-0x287 join the draw key.
Local and domain programs are prepared with their stage group: its
headers are merged over one set of defaults, and a local program left
unbound by the hull header is prepared at its first draw.

The local program ends at its jump into the hull half.
TessellationLowering lowers LDS and ring addresses that are affine in
the control point and relative index to tessellation interfaces with
strides from the code, and refuses accesses outside the patch, per-patch
writes from other control points and a modified primitive export. Hull
lanes read their own saved exec bit, also of host-subgroup-masked
copies; other masks are refused, gl_InvocationID loads as a scalar and
factors clamp to 63.
2026-10-11 11:25:56 +02:00
Adrià 09bd4aa1a3
Merge pull request #1431 from Zaid-Talib/claude/focused-turing-ivfmjn
feat(libkernel): deliver sceKernelRaiseException on Linux
2026-10-11 11:22:31 +02:00
Romans Pokrovskis 228532e9a8 fix(libc): keep unlocked stream status queries lock-free
Use unlocked POSIX EOF/error queries after unlocked byte operations so status synchronization cannot reacquire the stream lock. Keep the verified UCRT status calls on Windows, and cover byte, status, error, and held-lock behavior.

Co-authored-by: MarcZX100 <marczxrr@gmail.com>
2026-10-11 09:18:23 +00:00
milescoviello ee720ee004 test(agc): reproduce an import window over a pending storage image
agc_driver_dcc_keys_first_write only exercises the import window when the
device's own host import resolves the write protection of the imported
pages, as the NVIDIA driver does on Linux. CI's devices do not, so the
comparison that #2984 adds for BlockMaybeWritten units is not run there.

RunImportWindow opens an import window itself over a pending storage
image with GuestMemory::ImportWatched and stores the byte already there,
which leaves the same stamp without depending on the driver: the image
must stay pending and unchanged. A store of a new byte inside a window
must still be seen. Devices whose imports are compared print that the
window is not tested, as the recorder's (w) test does. Linux only: the
Windows path compares imports.

TechnicalDebt records that an identical-byte CPU store inside a window
cannot be told apart from the import, and that images tracked by layer
still upload again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 11:18:04 +02:00
Adrià e8e4dfdb36
Merge pull request #3337 from AchrafReyani/carry/export-ppsa01530-ppsa13356-imports
fix(exports): export the calls PPSA01530, PPSA23827 and PPSA13356 import
2026-10-11 11:16:45 +02:00
Adrià Franch 3879e7ed54 fix(libkernel): throw on a size-0 _umtx_op timeout that is not a valid timespec 2026-10-11 11:13:33 +02:00
Hannah Lyons 93cb3a1b0d fix(libkernel): compare the full WAIT_UINT value and throw on _umtx_op operation 1 2026-10-11 11:13:09 +02:00
clem-gb 79f90f3d9b feat(libkernel): implement _umtx_op wait and wake operations
Titles that ship their own libc.prx or Unity's PS5Util.prx import
_umtx_op (04AjkP0jO9U) for atomic waits, call_once and futex-style
waits. Implement UMTX_OP_WAIT, UMTX_OP_WAKE, UMTX_OP_WAIT_UINT,
UMTX_OP_WAIT_UINT_PRIVATE and UMTX_OP_WAKE_PRIVATE as FreeBSD 11's
kern_umtx.c does, on the sceKernelSyncOnAddressWait waiter queue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeC9bA3n74TzJRYv9AgBE8
2026-10-11 11:13:08 +02:00
Claude c356112f32 fix(libkernel): keep raises off unregistered threads and clamp the handler's MXCSR
Two defects found in review of the Linux delivery:

A raise right after scePthreadCreate reached the new thread before
RunThread set currentThread, so scePthreadSelf() in the handler adopted
a second handle, and could deadlock on glibc's thread lock when the
signal interrupted pthread_getattr_np. The creator now blocks all
signals around the std::thread construction, so the child starts with
them blocked, and RunThread restores the creator's mask once the thread
is registered, as libthr does. A raise in that window stays pending and
is delivered just before the entry runs.

A handler that set reserved MXCSR bits made rt_sigreturn fail with
SIGSEGV. The MXCSR the handler leaves is now masked with the frame's
MXCSR_MASK (0xffbf when it reads 0), as FreeBSD's fpusetregs does, on
both platforms; Windows also keeps CONTEXT.MxCsr equal to
FltSave.MxCsr.

guest_raise_exception raises right after each of 50 thread creations and
checks scePthreadSelf() in the handler, and its context round trip sets
a reserved MXCSR bit and FZ and checks that only FZ is kept.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwJx7AHrSUaMGSpEGhL1Kb
2026-10-11 11:12:02 +02:00
Adrià 90c152e840
Merge pull request #1333 from TibixDev/pr/descriptor-pool-recycling
perf(agc): recycle descriptor pools after their last set is released
2026-10-11 11:11:24 +02:00
Claude dca5a88ef2 feat(libkernel): deliver sceKernelRaiseException on Linux
sceKernelRaiseException threw on Linux, so a title whose garbage
collector stops threads with it (Unity's PS5Util raises SIGUSR1 on each
thread and reads mc_rsp from the handler's context) could not run there.

The raise now sends the host SIGUSR1 to the target thread with
pthread_kill. The host handler, installed on first use with SA_SIGINFO
and SA_RESTART, builds the FreeBSD-layout ucontext from the interrupted
registers and the FXSAVE area, calls the guest handler on the target's
own stack and writes the registers back, so the handler's changes reach
the interrupted code, as they do on Windows. errno is left as the
handler leaves it, as libthr does.

A raise on another thread takes the target's join lock with the host
signal blocked and returns ESRCH once the thread has finished, so a
detached thread's pthread_t is never signalled after it exits. The
pthread_t is recorded when the thread is created or adopted. Handlers
are now lock-free atomics, as the host handler reads them.

guest_raise_exception now runs on every platform. It also checks that
r13 and xmm8 reach the handler and that r12 and xmm8 written by the
handler reach the interrupted code.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwJx7AHrSUaMGSpEGhL1Kb
2026-10-11 11:11:23 +02:00
Adrià Franch 3c8c02f194 docs(debt): move the PPSA01530 imports line into Unknown function info and note the inferred Ult forwards 2026-10-11 11:07:12 +02:00
Achraf Reyani c9f4689248 fix(exports): drop the sceNpWebApi2GetMemoryPoolStats stub and register the test with the shared guest tests
include from Equeue.cpp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 11:07:03 +02:00
xXPBSXx c4d29f6a99 fix(exports): export the calls PPSA01530, PPSA23827 and PPSA13356 import
Forwards _sceUltWaitingQueueResourcePoolCreate and _sceUltSemaphoreCreate to the existing calls, like the other underscore Ult exports. Declares sceNetShowIfconfig, sceNpWebApi2GetMemoryPoolStats, Json::Value::setNullAccessCallBack, kqueue, kevent and one pad call of unknown name without an implementation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 11:07:03 +02:00
TibixDev 058b7e8f94 fix(agc): support alternate channel order in 16-bit color targets
Map red and blue exports, write masks and constant-color blend factors together. Reject conflicting simultaneous target constants.

Semantics: Mesa 26.2.2 src/amd/common/ac_formats.c ac_translate_colorswap; console equivalence remains unverified. Graphics tests passed. Written with AI assistance.
2026-10-11 10:59:37 +02:00
TibixDev 4e7ca3c760 fix(agc): recycle descriptor pools after their last set is released
Allocate cached sets without individual-free pools. Reset a pool after its
last owner releases it. Keep stable pool indices, skip full pools, and
terminate if reset fails. No GPU wait is added.

This avoids RADV 26.2.2's affected individual-free allocation path.

Validation: Fedora 44 Release graphics tests pass. The reset-failure
regression fails on the previous behavior and passes on this change.
llvmpipe and RX 6600 pass the 3,301-set lifecycle test with core and
synchronization validation. Windows was not tested.

AI-assisted: yes.
2026-10-11 10:54:44 +02:00
Hussein Kadhim 1100d41a36 fix(kernel): accept the default handler for SIGKILL and SIGSTOP in signal
FreeBSD's kernel_sigaction rejects SIGKILL and SIGSTOP only for a handler other than SIG_DFL, so signal(9, SIG_DFL) and signal(17, SIG_DFL) succeed. Drop the SIG_ERR rejection, which has no kernel basis and which sigaction does not apply.
2026-10-11 10:54:27 +02:00
Adrià 85c7cf9b02
Merge pull request #3343 from AchrafReyani/carry/progress-literal-braces
fix(progress): ignore braces in literals and comments when scanning bodies
2026-10-11 10:50:56 +02:00
Adrià 3c3992c5c2
Merge pull request #2985 from MrMha/fix/wait-memory-timeout-2832
fix(agc): keep polling unsatisfied memory waits after diagnostics
2026-10-11 10:50:34 +02:00
Adrià 536cbf4a98
Merge pull request #3341 from AchrafReyani/carry/shareplay-connection-info
fix(libSceSharePlay): export sceSharePlayGetCurrentConnectionInfoA with no Share Play session
2026-10-11 10:49:50 +02:00
Adrià 3fb2e29d75
Merge pull request #3315 from pushkarreddyy/feat/libc-nan
feat(libc): implement nan and nanf
2026-10-11 10:49:06 +02:00
Adrià d5477f8402
Merge pull request #2015 from arvindfroi/fix/agc-placeholder-images
fix(agc): typed image heaps on devices without nullDescriptor
2026-10-11 10:48:40 +02:00
Adrià f6b421b73c
Merge pull request #3040 from CouchRiv/fix-shader-ldexp-f16-denorm-flush
fix(shader): flush v_ldexp_f16 denormals per the f16 denormal mode
2026-10-11 10:48:14 +02:00
Adrià d3e84f8543
Merge pull request #3296 from SynnZer0/feat/npwebapi2-memory-pool-stats
feat(libSceNpWebApi2): implement sceNpWebApi2GetMemoryPoolStats
2026-10-11 10:46:44 +02:00
Adrià 71dda5b333
Merge pull request #3297 from SynnZer0/fix/libkernel-module-info-st-size
fix(libkernel): ignore the input st_size of sceKernelGetModuleInfoFromAddr
2026-10-11 10:45:21 +02:00
Hussein Kadhim d67ad1fc14 docs(technical-debt): record the Linux narrow %p difference 2026-10-11 10:43:41 +02:00
pushkarreddyy 31906bf9b0 feat(libc): implement nan and nanf
Add standard quiet NaN generators nanf (DZU+K1wozGI) and nan (zck+6bVj5pA) to libc.

Resolves startup failure in VLC for PS5 (PPSA85300) where execution halts at nanf on Linux once strsep is available.
2026-10-11 14:12:36 +05:30
SynnZer0 c5bcc085ba feat(libSceNpWebApi2): implement sceNpWebApi2GetMemoryPoolStats
PPSA21703's Unity PSN plugin imports sceNpWebApi2GetMemoryPoolStats
(Xweb+naPZ8Y), so the title did not start.

sceNpWebApi2Initialize now records the pool size of each context and
sceNpWebApi2Terminate forgets it. The statistics report that size with
no peak or current use, as sceHttp2GetMemoryPoolStats does, since nothing
is allocated from the pool. A null output or an unknown context throws.
The signature and layout follow the Http2 statistics and are recorded in
TechnicalDebt.

The library gets its own CMakeLists.txt, equivalent to the generic rule,
to register its test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 10:42:09 +02:00
Arvind Frøiland 7216621545 fix(agc): typed image heaps on devices without nullDescriptor
The typed descriptor heaps write a null descriptor for a null guest
image, and the device therefore required VK_EXT_robustness2's
nullDescriptor. MoltenVK has the extension but not the feature, so on
macOS no Vulkan device opened and every GPU test was skipped. The
feature is now enabled when the device has it. Without it, the device
creates a placeholder image per typed image heap: 1x1, cleared to zero,
of the heap's dimension, sample count, numeric class and access, and a
null guest image binds the placeholder of its heap. A heap whose
placeholder the device cannot create throws when a null image reaches
it. TechnicalDebt.md lists where a placeholder differs from a null
descriptor.

agc_placeholder_images checks every image resource the recompiler maps
to a heap against that heap's placeholder, so the two cannot drift
apart, and agc_shader_device_profile now expects a device without
nullDescriptor to be accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 10:32:49 +02:00
Adrià 04ab4a86cd
Merge pull request #921 from 011010/feat/cmake-use-system-deps
build: add ANYPS5_USE_SYSTEM_DEPS option
2026-10-11 10:30:35 +02:00
Adrià 0c617bae95
Merge pull request #374 from MichonGoddijn231849/fix/depth-htile-fast-clear
fix(agc): depth fast clears through the HTILE metadata
2026-10-11 10:27:15 +02:00
Alex 327bf794a2 docs(shader): flush v_ldexp_f16 results before rounding in the debt entry
The entry said the result is flushed before or after the scale. The
lowering flushes the exact scaled value below the minimum normal before
rounding. Measured on RDNA2 (gfx1036) with round to nearest over every
half magnitude 0x0000..0x0fff of both signs, scaled by 2^-1 and 2^0,
IEEE 0 and 1, denorm16 0..3: no mismatch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 04:24:27 -04:00
Claude b87dd8d845 docs(shader): note the per-bit f16 denormal field against the f32 mode 1 and 2 refusals
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K9MzdVqDf6wHUKzNymQSze
2026-10-11 04:24:00 -04:00
Alex 63b2bcb354 fix(shader): flush v_ldexp_f16 denormals per the f16 denormal mode
v_ldexp_f16 ignored the FLOAT_MODE denorm16 flush bits on main. Flush a
denormal half input when bit 0 is clear. When bit 1 is clear, flush the
result when its exact value is below the minimum normal half, decided
on the f32 product before the half conversion rounds it: 0x07ff scaled
by 2^-1 is zero on RDNA2, not the minimum normal. NaN handling and
destination high-half preservation stay the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-11 04:24:00 -04:00
Adrià 7b5214d429
Merge pull request #846 from merwie/feat/relinker-module-dir
feat(relinker): add --module-dir for modules loaded at run time
2026-10-11 10:23:54 +02:00