A descriptor heap that a shader binds whole while only the pieces from its
base are mapped (a sparse heap) is copied on the CPU for every build that
binds it unless a mirror serves it. The sparse heap mirror takes a heap whose
needed extent lies in one releasable registered range. A heap mapped piece by
piece, each mapping its own allocation and the pieces back to back from the
heap's base, is several registered ranges, so every build copied its mapped
run again.
Such a region is now bound in place from an import of that run: an import
already covering it, the run's own import, or one joined over exactly the run
(#4517). This applies to any sparse heap no mirror took, including under
APS5_NO_LEASE_MIRROR or APS5_NO_SPARSE_HEAP_MIRROR. A join is made only for a
region that starts at a registered range, once the previous bind of that
address saw the same last mapped byte: a heap that grows between every two of
its binds keeps the copy, and one bound more often than it grows is joined
again after each growth. Joins stop after 64 per joined run base, with a
message: the heap is then bound in place while an existing import covers its
run and copied otherwise. The records go with their range. The region's descriptor and BDA ranges end at the import's end, which
covers the mapped run and the last view, as the copy does. A region whose
mapped part does not start at its base, with a view past the run, written by
its shader, or whose run is not imported is copied as before. A direct
region whose import ends before it outside this path still fails in
Descriptor, as before.
A set over such a region stays reusable: DirectRegions and InPlaceReads name
the region up to its import's end, so the import's serial proves it, and a
reuse also requires the heap to be mapped exactly up to that end
(CutRegions), checked whenever the imports or the registry changed, so a
mapping past the cut makes the set miss. DirectRegions also refuses a set any
of whose regions bound in place no longer holds the import found at its base
(a later join in the same build retired it); this applies to every region
bound in place.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A storage view of the depth plane that starts above slice 0 was refused. The
layered storage image already spans slices 0..last, and the view starts at its
base slice, so the refusal is dropped and only the slices from the base slice to
the last are copied in and out. The base slice joins the cache key.
DepthStorageDispatch stores through a view from base slice 2 and checks the
other slices stay untouched; it fails without the change.
DecodeInstruction returned before reading the ModRM of FF /3 and FF /5,
so a far CALL or JMP through a RIP-relative pointer had no RIP-relative
displacement. A stub that moved such a JMP copied the displacement
without relocating it.
The decoder was compared with iced-x86 (AMD decoding) over 3.99 million
encodings: every opcode of the legacy, 0F, 0F38 and 0F3A maps under 34
prefix combinations and the VEX 0F, 0F38 and 0F3A maps, each with 48
ModRM forms. Apart from this, it agrees on length, RIP-relative offset,
control flow kind and branch target for every valid Zen 2 instruction
except near branches with a 66 prefix, recorded as technical debt, and
kernel-only returns, which it treats as sequential.
Add the comparison's metadata as cases: one RIP-relative encoding per
opcode, map and immediate size, every FF /r form, and the branch forms
with their flow kind and target. The existing cases check lengths only;
a loop or jrcxz decoded as an unconditional jump passed the whole suite.
The export turned YNw9Xk5iNWo from an unresolved import into a stub that throws. Dreaming Sarah (PPSA02929) calls it during start-up and now aborts with "YNw9Xk5iNWo not implemented" about 2 s in. Reverting until the function is implemented.
Accept SCE_NGS2_CUSTOM_MODULE_ID_USER_FX (0x1d) on custom submixer racks alongside UserFx2 (0x1f). When configuring a custom rack voice, support voice control parameter SCE_NGS2_CUSTOM_VOICE_PARAM_USER_FX (0x40001d00) to install custom submixer UserFx callbacks with user data. Run legacy UserFx callbacks during custom voice rendering and update sample presence flags accordingly.
Fixes runtime abort in Void Terrarium (PPSA03061):
terminate called after throwing an instance of 'std::runtime_error'
what(): NGS2: custom module id 0x1d is not implemented
FATAL: abort() (SIGABRT)
Closes#5055