Follow FreeBSD 11.4 sys_kenv: KENV_GET, KENV_SET, KENV_UNSET and KENV_DUMP over
an in-memory kernel environment of at most 512 variables, with the 128-byte
name and value limits, ENOENT, EINVAL, ENAMETOOLONG and EFAULT.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
sceMoveClose returns INVALID_HANDLE for a handle that is not open since 808d67e715 (#8252), and sceMoveOpen returns ALREADY_OPENED for an open slot since c478789949 (#8252) and throws only for users other than the initial user since 95ea06e80b (#8125). The sentence came from 8a1bd363ef (#9137), which left both bodies alone; the rest of the entry already describes them.
The work-memory entry said the bodies of all its queries remain
unimplemented, but sceHmdGetDistortionWorkMemoryAlign and Size return
0x400 and 0x20000 since db2575839 (#8307), and their
sceHmdDistortionGetWorkMemory* aliases since fa916ae7bc (#8256). Only
capture start, separate-mode open, crash-report cancellation and the
mirroring aspect debug setter still throw.
The device and sensor query entry said its protected bodies are
unchanged, but sceHmdGetFieldOfView, sceHmdGetInertialSensorData and
sceHmdGetAssyError answer without a headset since fe6aba89a8 and
a569d075ec (#8256), before 7b97d7552c (#9137) wrote the entry. Only the
internal device-information, distortion-parameter, status-report and
DFU-status queries still throw.
rename and sceKernelRename now look the source up before they reject a
dot destination, as FreeBSD 11.4's kern_renameat does, so a missing
source onto dir/. fails with ENOENT. guest_filesystem covers it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sceRudpPollCancel waited until no wait was registered, so a wait that
started during the drain kept it blocked, forever for an infinite one.
Waits registered when the cancel starts now move to a draining count,
and the cancel returns once those have left. A scope guard releases each
wait's registration on every exit, retaking the lock if the wait had
dropped it, so an exception in the condition wait no longer leaves a
registration that a later cancel can never drain. Reported by
@MarcZX10, @thepoppfish, @adriadam10 and @oneandonlydean; the guard
follows @thepoppfish's repair.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v_fma_f32, v_fmac_f32, v_fmamk_f32 and v_fmaak_f32 threw "f32 denormal
mode 2 is not implemented" whenever FLOAT_MODE flushed f32 denormal
inputs but kept denormal results.
On RDNA2 (gfx1036) at round to nearest even, mode 2 flushes the inputs
and rounds the fused result once with gradual underflow, which the host's
Fma gives under DenormPreserve 32. The translation now matches all 5,596
measured triples for the four forms at IEEE 0 and 1. Mode 1 keeps
throwing: there the hardware flushes a result that is tiny after rounding
with an unbounded exponent even when the addend is nonzero.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
All four threw "f32 denormal mode N is not implemented" whenever
FLOAT_MODE kept only one side of the f32 denormals.
On RDNA2 (gfx1036), in every f32 round mode and at IEEE 0 and 1, mode 2
gives the results of mode 0 and mode 1 those of mode 3 with a denormal
result flushed, which only v_fract_f32 of a positive denormal produces.
The translation now matches all 118 measured inputs in modes 1 and 2.
Mode 1 of the three that run host float operations on a kept denormal
needs DenormPreserve 32, as v_min_f32 does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Both log their arguments and the caller and return. Note what the
titles' bundled libc.prx passes them and that three of its
sceKernelDebugRaiseException calls are followed by ud2 in every build
checked, so the guest reaches that ud2 here.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This reverts commit 780b33aea3, restoring the 13824 MiB direct memory pool.
With the pool at 12288 MiB, Astro Bot (PPSA21564) can no longer load its
level: DirectMemoryAllocator asserts "Can't allocate direct memory" for a
64 MB VideoPlayerTexture with 12228 of 12288 MB in use, then the process
faults about 26 s in (2 of 2 runs, RTX 4090, Linux, main cccdaa2734).
The same tree with only this merge reverted runs the full 150 s with no
direct memory assert (2 of 2 runs).
SPIRV-Cross emits the lock's acquire compare-exchange and release
exchange as relaxed Metal atomics, so the plain LDS loads and stores of
a locked 64-bit update were not ordered against the lock and contended
ds_add_u64 lost updates on an Apple M5 Pro. On MoltenVK the driver now sets
SpirvTarget::ldsLockFences, and the lock brackets its critical section
with workgroup-scope acquire and release OpMemoryBarriers, which become
threadgroup atomic_thread_fence with no execution barrier.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The only conflict was in GuestMath.cpp, where main's sinh tests and this
branch's asinh tests were inserted at the same place. Keep both: the asinh
checks follow the sinh ones.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>