Each asynchronous call must start with valid arguments and finish signed out, refuse an unknown request and a non-null option; each synchronous call must return SCE_NP_ERROR_SIGNED_OUT. Targeted cases cover empty virtual users, the operation and sort types and the slot, user, friend and TSS size limits.
The add-and-get, try-and-set, multi-user and friends variable calls (NpId, account, virtual user and cross-save forms) run shadPS4's argument checks and then finish with SCE_NP_ERROR_SIGNED_OUT like the multi-slot variable calls; the synchronous forms wait for their asynchronous ones.
fstat was a NotImplemented stub in libkernel_sys. It now calls libkernel's
_fstat, as fstatfs already calls _fstatfs, so it reports the same status,
EFAULT for a null buffer and EBADF for a descriptor that is not open.
Since #8224, a read-only strided buffer that starts below the render
target and runs less than one stride into it is bound only up to the
target, and the cached build keeps that size. MovedReadOnlyBuffers
compared it with the descriptor's whole size, so a hit with the same
words took the buffer as moved and rebound all of it, over the render
target.
MovedReadOnlyBuffers takes the draw's target and cuts a read-only buffer
as the build does. The cut lives in ShaderResources::BytesUpToTarget,
which addGuestBuffer, CheckBufferAliases and MovedReadOnlyBuffers call;
a buffer that runs a whole stride or more into the target is not cut and
still fails the alias checks.
agc_driver_graphics checks a cached build whose read-only stride-60,
4-record buffer runs 8 bytes into the target: the same words list
nothing moved, a buffer moved to run 4 bytes in is listed at 236 bytes,
and one moved to run a whole stride in keeps its 240.
__std_init_once_begin_initialize_clr, __std_init_once_complete_clr and
__std_init_once_link_alternate_names_and_abort were not exported. As in
the PS5 12.00 module, begin moves an idle once object to running and
reports pending, reports done without pending, and waits on the object
while another caller runs; complete marks it done, or idle again for
flag 4, wakes every waiter and returns 1; the third aborts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
The Windows crash report reads APS5_CRASH_STACK_BYTES through
EnvironmentNumber, which env_reference did not recognize, so the name had
no row in docs/dev/ENVIRONMENT.md and neither the reference check nor the
conventions check reported it. Recognize the reader as an integer reader
and add the row.
The Dinkumware std::filesystem in titles calls twelve low-level helpers
that libSceLibcInternal exports and this project did not: _Stat, _Lstat,
_File_size, _Last_write_time, _Make_dir, _Remove_dir, _Unlink, _Chmod,
_Current_get, _Open_dir, _Read_dir and _Close_dir. They now follow the
PS5 12.00 module on top of the guest stat, mkdir, rmdir, unlink, chmod,
getcwd and directory calls, with its results: file_type codes from the
mode, not_found for ENOENT, ENOTDIR, EINVAL and ENAMETOOLONG, mkdir's
1/0/-errno, -1 for a failed size, and directory reads that skip the dot
entries and report the type as unknown. As on the console, _Lstat
follows links like _Stat.
The two _Xfilesystem_error overloads are exported and still throw, as
the guest filesystem_error type is not provided yet.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
siginterrupt is a libSceLibcInternal export (the public SDK's stub table has it there, not in the
kernel tables) and FreeBSD 11.4's lib/libc/gen/siginterrupt.c reads the signal's disposition,
sets or clears the signal's bit in _sigintr and SA_RESTART, and installs the disposition again.
libc cannot call libkernel, so, as the pthread hooks do, libc keeps a registered sigaction and
the address of the _sigintr set, and libkernel registers both from a static initializer when it
loads. A call before that throws; the set is written without libkernel's registration lock, as
FreeBSD's libc does. Builds on #8866, which adds the set.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
The public SDK's libkernel, libkernel_sys and libkernel_web stub tables declare _sigintr, the
sigset_t that FreeBSD's libc shares between signal and siginterrupt, and no built library
provided it (#8846). libkernel now exports the 16-byte object, zero at start, and signal records
a handler with SA_RESTART unless its signal is in the set, as lib/libc/gen/signal.c does.
siginterrupt, which fills the set, is a libSceLibcInternal export; libc does not link libkernel
and cannot reach the dispositions, so it stays out and a debt entry for signal says so.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
- Drain the draw pipeline before recording the copy, as the CB metadata
pass does, so the copy follows the queued draws that render the plane.
- Address the plane as decodeDepth registers it: a multisampled plane's
pipe-bank XOR bits are stripped and a DB_DEPTH_VIEW slice is added.
Mipmapped or partially resident planes are refused.
- Refuse a color target with CMASK fast clears, as the CB resolve does.
- Find the source through the depth owner (planeSurface) and require a
32-bit float surface with the decoded sample count.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every graphics pipeline library was created with
VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT, and
libraries live until the device is destroyed. Only the background
relink reads that info, and it exists only when the device's links are
optimized: not on the NVIDIA proprietary driver and not with
APS5_NO_PIPELINE_LTO set. A library now asks for the info only when
its link will be optimized, and whether it will be is part of the
library cache key, so a link that is optimized never names a library
made without the info, even when a context forces
pipelineLinkTimeOptimization on a device whose other contexts do not.
Draws, journal replays and shader library prebuilds all create their
libraries through this one path.
The pipeline readback tests count the libraries created with the flag
next to their pixel checks, and a new recorder mode checks that a
context without optimized links makes libraries without the info and
that a context with them makes its own.
Forward scePthreadBarrier*, scePthreadBarrierattr*, scePthreadGetcpuclockid,
scePthreadGetconcurrency and sceKernelMsync to libkernel's POSIX
implementations and return POSIX errors as SCE kernel errors.
Co-Authored-By: Claude Opus 5.5 <[email protected]>