CONVENTIONS.md still listed stable resident runs of at least 256 KiB as
the pages the write watch can leave read-only between collections on
Windows, and pointed at the debt/libc.md entry this PR removes. Resident
runs are no longer write-protected. What stays read-only between
collections on Windows are the pages of shared views (shared memory,
shared file mappings, and direct memory mapped at more than one guest
address), which Collect arms; the Windows direct-memory backing entry in
debt/libc.md describes the direct-memory case.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
embersas's ordering on Windows: a rewatched 64 KiB block of direct memory is
cached as a 128x128 R32_UINT snapshot, shared through a second mapping, then
written by one 4-byte CPU store with no lookup in between. The next lookup
must replace the snapshot, and a compute texelFetch of it must read the
stored texel.
Once a second mapping shares rewatched direct memory, every collect of it is
refused and returns 0, but nothing was stamped, so an entry holding a
generation from before the sharing (the sampled cache's hit) still read as
unchanged and kept the old texels for one lookup. A refused walk now stamps
the pages the mappings report unreported as CPU-written, once, as main's
first collect after the demotion did, and marks the blocks of every compared
shared page with its generation. UnchangedSince, UnchangedSinceAll and
UnchangedCommittedSince never vouch for a generation older than such a mark,
whatever the generation came from (a collect before the sharing, the newest
of several collects, TrackerGeneration), so those callers compare bytes.
WrittenSince, ChangedBlocks and StoredOver keep reading stamps alone, so
storage textures and depth surfaces do not reload or drop pending results at
every refused collect.
A page marked to be compared when shared is refused by every collect once a
second mapping demotes it, so the writes made to it since its last collect
were never reported. Each view of such a page now carries an unreported mask:
set when the view is demoted, when the page is first marked while the view is
already shared, and when a new view of a marked page is mapped. ComparedPages
lists the compared shared pages of a range, or takes the unreported ones.
The UTF-16 and UTF-32 string forms and the UTF-8 to Shift-JIS and EUC-JP
calls now share the measured string loop and UTF-8 decoder, and the
Japanese tests expect JIS X 0212 to be neither decoded nor encoded.
sceCesMbcsUcsContextInit rejects a null profile.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The console's libc exports _ZdlPvRKSt9nothrow_t (NID McsGnqV6yRE) as a 12-byte tail call to the same delete function that _ZdlPv uses, ignoring the nothrow tag. Forward to _ZdlPv so memory from the nothrow new overloads is released through the registered application heap; a null pointer is ignored.
ShaderResources::rejectTableElement records a poison entry and the
reason for each table element the driver rejects, and kept the reason
as its own std::string per element. A sampler table's rejections
mostly repeat one reason, so a table with many border or opaque-black
samplers held one heap copy of the same text per element, and building
the image table faults copied every string again.
TableStage and BdaResources::ImageTableFaults now keep the reasons as
shared_ptr<const std::string>, and a rejection whose reason equals the
previous one shares its string. The fault copy only bumps reference
counts. The recompiler's own poison entries, which have no driver
reason, take a null pointer where they took an empty string, and the
fault report skips both the same way.
The new image table case rejects two sampler table entries, differing
only in MAX_LOD, for the same reason and samples each one; the second
entry's reason is the shared string.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
In PS5 firmware 3.20 and 4.03 sceAudioOutInit calls sceAudioOut2Initialize, which sets the flag that sceAudioOut2GetSpeakerInfo tests before anything else. A title that only calls sceAudioOutInit got 0x80268006 here. The flag moves next to sceAudioOutInit so the test targets that build only AudioOut.cpp still link.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
patched_libraries loads each patched .prx with LoadLibraryExW and
LOAD_WITH_ALTERED_SEARCH_PATH, so Windows looks for the libraries' own
dependencies (libstdc++-6.dll, libgcc_s_seh-1.dll, libwinpthread-1.dll)
next to the .prx and then on PATH, not next to the test executable
where the build copies the MinGW runtime. Run from a shell whose PATH
does not start with the toolchain's bin, it failed with error 126 for
libc.prx, libkernel.prx and the others, or loaded another libstdc++
found earlier on PATH.
On MinGW, prepend the compiler's directory to the test's PATH, as the
other tests do for the directories their libraries load from.
Co-Authored-By: Claude Opus 5.5 <[email protected]>