The Windows release of imports retired during a settle read belongs after the whole
overlapsImport block in the not-holding-the-lock branch of WaitForLeasesAndImports, as in
the original change, not inside it. It was placed inside while main was merged in.
The depth remap fields moved to request format 33 when this branch was rebased onto
main's format 32. The replay tests that rebuild older streams now drop and append the
remap tail on top of the linked call fallbacks and the spanned waves flag, and the
depth remap test downgrades to format 32.
A compute shader loads every texel of a 256x192 32_UINT, 32_SINT and
16_UINT texture in SW_64KB_Z_X whose memory holds a known pattern and no
depth surface, from untracked memory and from a guest allocation, and
stores what it read. Every texel must keep its stored bits, NaN, infinity
and denormal patterns included; without the 32-bit fix the 32_UINT read
throws.
Every guest-memory read of a pixel shader that can fault ended the
invocation with its own OpTerminateInvocation, or OpKill without the
extension. A main-menu pixel shader of NHL 27 (PPSA34063) has 216 such
exits and Demon's Souls (PPSA01342) up to 112, and AMD's Windows driver
crashes in vkCreateGraphicsPipelines on those modules
(amdvlk64.dll+0x9e251f).
The guest code is now emitted as its own function: a failed read sets a
private flag and returns, and the entry point calls it and terminates
once when the flag is set. A pixel shader without a fault site keeps a
plain entry point, with no exit and no SPV_KHR_terminate_invocation.
Primitive-ordered pixel shaders keep the old form, as their interlock
instructions must stay in the entry point.
Based on poonasor's design in poonasor/AnyPS5@eb2e2309, ported to
current main.
Co-authored-by: poonasor <[email protected]>
Compute LDS beyond the device's shared-memory limit lives in a storage
buffer, and its 64-bit atomics took a lock in that buffer. AMD's Windows
driver compiles the lock's acquire and release to s_barrier, which inside
the divergent lock loop pairs with the program's own barriers, so the
device-memory case of agc_driver_lds_lock_budget read half its sum.
With shaderBufferInt64Atomics the device-memory LDS now uses a 64-bit view
of the buffer instead: 64-bit atomics are compare-exchange loops on it and
32-bit atomics stay native, so no lock is taken. Without the feature the
lock is kept. The per-workgroup slice is rounded up to an even dword count
so that the 64-bit view stays aligned.
scePthreadJoin checked whether the thread was detached before whether it
was the calling thread. So a detached thread joining itself got EINVAL
instead of EDEADLK, and so did the main thread, which scePthreadSelf
adopts as detached. FreeBSD's join checks the calling thread right after
the null check and before it looks at the detach state. The self check
now comes first; the null, detached and already-joined answers are
unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Homebrew built with the ps5-payload-dev SDK imports by symbol name and
names its system libraries with .sprx, while the libraries in libs/
are .prx files that export NIDs. Quake from the websrv launcher
stopped with 457 unresolved imports such as strlen and malloc.
An import without a module that no searched library exports under its
name is now looked up again under the NID of that name. A dependency
named with .sprx, .suprx or .debug_prx loads the .prx library of the
same stem, and libkernel_web also loads libkernel.prx, as
libSceLibcInternal already loads libc.prx.
sigprocmask and _sigprocmask threw std::invalid_argument for a how other
than SIG_BLOCK, SIG_UNBLOCK or SIG_SETMASK, which ends the title. FreeBSD
returns -1 with EINVAL and leaves the old mask uncopied, and ignores how
when set is null; pthread_sigmask here already returns EINVAL. The check
now comes first, before the previous mask is written.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The two anisotropic rows of agc_driver_image_sample_reduction sampled
a two-level texture at explicit LOD 0.25 and 0.75 through a point mip
filter, and expected only the nearest level in the min or max. Vulkan
leaves the anisotropic filtering scheme to the implementation, and
only recommends that it consider mipmapMode, minLod and maxLod. On an
RTX 4090 (NVIDIA 616.92) the min row returns 5, a level-1 texel, where
level 0's bilinear minimum is 17, so the test fails on main there.
The rows now use no mip filter, which the decoder turns into a host
sampler with minLod and maxLod 0, so they read level 0 only, as the
RDNA2 measurements without derivatives did (gfx1030 with no mip filter
over a single-level texture, gfx1035 with image_sample_lz). They still
throw if the min or max reduction with anisotropy is refused again.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
DecodeSrgbTexel looked up the 256 table constants and stored the whole
table into its Private array at every decode site. The constants are
interned, but once a module has more than the declaration cache's 512
entries, each of those lookups that misses walks every slot before it
reaches the map. The table is now built on first use as the Private
array's initializer, as the buffer format table already is, and later
sites only index it.
The sRGB image load test checks that the recompiled module holds one
table, initializes one variable with it and never stores it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The depth remap mode, scale and offset change the pipeline a draw creates, so the
pipeline journal's recipe carries them. The file format is bumped and the State
layout guard follows the new size.