Accept SCE_NGS2_RACK_ID_CUSTOM_MASTERING (0x4003) using the 0x508-byte
custom rack option layout without modules. Channels above NGS2_MAX_CHANNELS
(8) and non-zero module counts throw runtime_error as unsupported. Support
mastering voice control parameters 0x40030000 (setup), 0x40030004 (gain),
and 0x40030005 (output), write active mastering voices to render buffers,
and return voice state flags in sceNgs2VoiceGetState.
References #8039.
ShaderMemory caches guest memory in lazy pages and fills them in whole
blocks. readWords fills every missing block the requested words touch,
and a write fills the open head and tail blocks around it. Both read
guest bytes outside the words asked for, by design: the page around
them is mapped. They used std::memcpy, though, so an
ANYPS5_ENABLE_ASAN build reports a global-buffer-overflow whenever a
block reaches past a small guest buffer that a test keeps in a global,
and agc_shader_memory (verifyPointerImageTable's narrowed key column)
and agc_shader_bindless fail at ShaderMemory.cpp:359.
The single-word block fill already copies through
GuestMemory::CopyGuestBytes, which is uninstrumented in ASan builds
and a plain memcpy otherwise. The three block copies now do the same.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A shader source loading its resource plan from the disk cache decoded
its own copy, also when another source had already loaded the same
plan: the same code registered under another plan key (another host
subgroup size or interface) stores byte-identical plan entries. In Ghost
of Tsushima's cache, 14,043 plan entries hold 8,170 distinct payloads.
Loaded plans now go through a table of weak references keyed by two
hashes of the payload, its size and the shader address the plan carries,
so equal payloads for one shader decode once and share the plan, its
compact form and its compiled SRT tape while any source uses it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The connect-to-AF_UNSPEC debt entry only described Linux. On Windows a socket bound to an explicit address keeps it in the same way, getsockname reports the host address, and a sendto to a non-loopback address then fails with ENETUNREACH, where FreeBSD's udp_disconnect() resets the local address and the send succeeds.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
With the unsigned bound compare decided at capture, v_cmpx_gt_u32
exec, s8, v0 with s8 = 0 leaves no lane, so s_cbranch_execz skips the
read through the null pointer and the plan no longer poisons it. The
guarded null pointer test now expects that case as it does the skipped
branch case: no fault, no poison, cacheable.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A resource block behind v_cmpx_gt_u32 exec, s, v0 and s_cbranch_execz keeps
its condition only if the compare can decide it, but UGreaterThan32 and
ULessThan32 needed both operands and v0 is a lane value. When the uniform
operand is 0 (or 0xffffffff on the other side) no lane can pass the compare,
so the walk can skip the block without the lane value.
UGreaterThan32 now yields false when its first operand is 0 or its second is
0xffffffff, and ULessThan32 when its first is 0xffffffff or its second is 0,
in the SRT interpreter and in the SRT tape alike; MayDecide keeps such a
condition when either operand is evaluable. Fully evaluable compares are
unchanged.
Destruction AllStars (PPSA02630) dispatches compute shader 0x200a220000 with
a thread count of 0 and leaves the V# in the skipped block stale (one
dispatch holds 00000000 00000000 00000000 ffffffff), which stopped it at
about 40 s with "buffer descriptor uses an unsupported type".
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sceKernelGettimezone wrote {0, 0} for every zone. A PS5 on firmware
13.40 set to US Eastern returned tz_minuteswest -300 and tz_dsttime 60:
the standard offset in minutes east of UTC, without the summer time in
effect on the run date, and the zone's daylight saving amount in
minutes. Both now come from the host zone, through the same HostZoneAt
and HostDaylightAmount the calendar conversions use.
guest_freebsd_clocks checks five TZ settings (UTC0, IST-5:30, BRT+3,
EST5EDT, CET-1CEST) and the null pointer.
RelinkedModulePath looked in prx, sce_module and sce_modules before the
case-insensitive match in the module's own directory, so a stray nested file
could shadow a module next to the title. Check the directory of the module
first, then the nested folders, and match the nested names case-insensitively.
Tests: a same-directory module with a differently cased name wins over an
exact-case nested file, and a nested module is found case-insensitively.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Unbound copies next to eboot concurrently LoadLibrary the same PE and leave Job0 with a null vtable; reuse the already-loaded nested guest module instead.
Co-authored-by: Cursor <[email protected]>
Earlier tests in the same process can leave 0x10000+0x20000 or 0x40000+0x10000 in the Windows tracker's coverage, and AddressCopyOverflow names a heap's reason from GuestMemory::Watched over its range, so the precondition and the reasons depended on test order. Both ranges are unwatched first; the reasons checked after them are unchanged.
A dispatch that writes a resident linear target's memory directly through
a host import, and has completion work, stamps that memory a second time
when its batch completes. With the target's draws stored at completion
points, the completion can run inside the target's own store:
FlushPending moves the target to the flushing list and then waits for the
dispatch. StampKeepingNewerResults only kept block-tracked images still in
the pending list, so the second stamp made every draw recorded after the
dispatch look older than the dispatch, and the store dropped them all.
The keep rule now also covers targets with drawn results and images that
are already being flushed.
Co-Authored-By: Claude <[email protected]>