#9159 marks memory that a rewatch or an import kept watched while it was
resident with SharedPage::comparedWhenShared, so its shared views stay
compared instead of armed. The mark lived only on the SharedPage, which
a physical slot holds weakly: once every view of that physical page was
unmapped, Map's pageOf made a fresh, unmarked SharedPage for the next
mapping, and the next clearing collect armed its aliases again.
The mark is now also kept on the physical slot. CompareWhenShared sets
it through each view's slot, and pageOf copies it into a SharedPage it
creates. ForgetSection still drops the slot and the mark with it, so a
reused section handle starts unmarked, and memory shared before it was
ever marked keeps its tracking. MapAlias and its runs create no
SharedPage, so they need no change.
The test maps one page resident, marks it, unmaps it, maps it into two
views, and requires a clearing collect over either view to refuse and
neither to be made read-only; after ForgetSection the same mapping is
collected and armed again.
Grand Theft Auto V (PPSA04264): tibzejoker's remaining resumed write
faults in zlib's inflate_fast with #9181 and #9159
(https://github.com/boykopovar/AnyPS5/pull/9159#issuecomment-6355849767)
may come from memory remapped this way. This change does not claim to
remove them.
Every registration decodes the header's registers into a
RegisteredShaderState: three dense register sets, about 10 KiB, kept by
the snapshot for the life of the registry. A title that registers the
same code with the same registers at another header address got a copy
each time. Ghost of Tsushima does that for 85 % of its registrations,
about 400 a second during its opening, so by 200 s 68,000 of its 80,000
snapshots held a copy of a state another snapshot already had.
A new snapshot now takes the state of a published snapshot at the same
code address whose type, code and decoded registers are equal. The state
is immutable once published, and its users only copy it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
CONTRIBUTING asks to split or shrink a test that gets close instead of raising its timeout; the subprocess timeouts of the previous commit stay.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
SPIR-V requires ImageMSArray only for an OpTypeImage with MS 1, Arrayed 1
and Sampled 2, and Vulkan requires shaderStorageImageMultisample for a
module that declares it. The recompiler declared it for every
multisampled arrayed image, including sampled ones, and the device listed
it as supported without the feature, so a sampled Dim2DMsaaArray load
produced an invalid module on devices without
shaderStorageImageMultisample (VUID-VkShaderModuleCreateInfo-pCode-08740).
Co-Authored-By: Claude Opus 5.5 <[email protected]>