The PS5 payload SDK declares the process parameters with a 32-bit PS4
SDK version at offset 0x10 and a 32-bit PS5 SDK version at 0x14, not
one 64-bit field. The debt entry now states that the export returns the
field at 0x10, as libSceHmd2 and shadPS4 read it, and that which field
the console returns is unmeasured. The test puts different values at
0x10 and 0x14 instead of one 64-bit value with its upper half set.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WYjMwvLdPR8iX8EP8tQYWa
Implement sceNpTrophy2GetRewardIcon matching PPSA06888 and SharpProspero signatures. Zeroes size if non-null and returns SCE_NP_TROPHY2_ERROR_ICON_FILE_NOT_FOUND following KytyPS5 when icons are unavailable offline. Updates guest tests and technical debt documentation.
A line list or strip drawn with PA_SC_AA_CONFIG above 1x and
PA_SC_MODE_CNTL_0.MSAA_ENABLE clear threw, and METAL GEAR SOLID: Peace
Walker (PPSA18216) draws such lines into its 4x target. They now take
the path triangles already take in this state: the target's sample
count with every sample at the pixel center, or one sample under a
one-sample color target.
The refusal now reads the primitive the draw rasterizes
(RasterPrimitiveOf) instead of VGT_PRIMITIVE_TYPE: a point list that a
geometry program turns into triangles or lines is drawn as those, and
rasterized points and alpha-to-coverage still throw. No draw on main
rasterizes points in this state, because a vertex-path point list and
a geometry program's point output throw earlier; the point term takes
effect once they are drawable, as with #6801.
The new GPU test decodes a line list and a line strip into a 4x target
in this state with DecodeState, draws the decoded state, and requires
every pixel to be covered in all four samples or in none.
Co-Authored-By: Claude <[email protected]>
A native D32S8 target whose separate stencil plane a multisampled colour
target covers with a draw, unknown content, or another format or sample
count was refused at import, so sampling its depth failed as well. The
plane is now imported unproven: its host stencil is not taken from it,
depth sampling and depth-only draws continue, and a draw with a stencil
test or a sample of the plane refuses with the stencil alias text and a
line naming the colour target's state.
A later whole-plane fill proves the plane from the fill byte without
reading guest memory and clears the host stencil to it, provided a
colour target still over the plane absorbed that fill as the same R8
byte at the same sample count; otherwise the fill is refused.
The SCE name moves from a libkernel_sys stub to libkernel. Kinds
MutexType::ErrorCheck (1) to MutexType::Adaptive (4) are the mutex
types FreeBSD 11 libthr's pthread_mutexattr_setkind_np stores, and are
set through scePthreadMutexattrSettype, which maps the same values onto
those types. Other kinds and a null or uninitialized attribute throw, as
their console answer is not known.
guest_kernel_sys_pthread_np_kind round-trips kinds 2, 3, 4 and 1
through pthread_mutexattr_gettype, checks that kind 1 makes a second
lock return EDEADLK and kind 2 lets it succeed, and checks the throws
for kinds 0, 5 and -1 (the type unchanged) and for a destroyed or null
attribute.
The POSIX name moves from a libkernel_sys stub to libkernel and stores the
type through its SCE twin scePthreadRwlockattrSettype, converting the
result as the other POSIX rwlock calls do.
guest_kernel_sys_pthread_np_rwlockattr checks types 0, 1 and 2 through
both names, a rwlock built from the attribute, and the throws for a
destroyed or null attribute.
Declare 6 verified PS5 3.20 missing system exports across libSceVrTracker2 (2), libSceFreeTypeOptOl (3), and libSceRnpsNKInjectedBundle (1). In addition, resolve the rename-ready stub in libSceVrTracker2 (NBhWy+Gl0tY) to sceVrTracker2GetRawCameraMeshSize matching its PS5 export symbol.
Every added declaration has no parameters and throws through NotImplemented_nid_no_patch to resolve imports without premature ABI claims. Technical debt files are added or updated in docs/dev/debt/.
A native D32S8 target whose separate stencil plane a multisampled R8
colour target covers is refused for sampling once that colour target
has drawn. Taking it would need a GPU copy of the colour target's R8
samples into the depth image's stencil aspect; the debt file now names
that gap and that the console's stencil reads of such a plane are not
measured.
5be005ea1 let a descriptor with no metadata (META_DATA_ADDRESS 0, not
pipe-aligned) sample a native multisample depth target from its
decompressed host image, assuming the guest had expanded the plane. On
hardware such a read sees decompressed depth only after an in-place
expand, a draw with DB_RENDER_CONTROL DEPTH_COMPRESS_DISABLE (bit 6)
and STENCIL_COMPRESS_DISABLE (bit 5) set, as radeonsi's in-place
decompress sets them.
DecodeDepthRenderControl reads DB_RENDER_CONTROL, DB_Z_INFO's format and
sample count and DB_Z_READ_BASE for a draw with clear or compress-disable
bits. The draw precheck hands it to NoteDepthRenderControl before the
draw is dropped as drawing nothing (an expand draw has no depth test and
no colour writes), draining the draw pipeline first for an expand, or
for a clear over an existing depth surface. A draw over the target with
the depth bit, and the stencil bit when the target has a stencil plane,
marks the surface expanded; a clear draw, an HTILE clear or fill
(NoteHtileDepthClear, NoteDepthMetadataFill, a cleared HTILE at
DepthSurfaceView) and a plane fill clear the mark. CheckResource takes a
descriptor without metadata only while the surface is marked, and
otherwise refuses with "native multisample depth sampled metadata or XOR
mismatch", printing the last DB_RENDER_CONTROL seen at most eight times.
Tested: agc_driver_native_depth_expand_gate, for D32 and D32S8 with a
separate stencil plane: a bare sample before any expand is refused, and
after only the depth bit on D32S8; after the expand draw it gets the
cleared and then the drawn depth; an HTILE fill, a clear draw and a
plane fill (an HTILE mask clear on D32) each refuse it again until the
next expand. The separate-stencil test now draws an expand before its
bare sample. With the gate reverted the first bare sample is accepted
(1 of 1); with it the mode passes 5 of 5.
Ghost of Tsushima Director's Cut (PPSA02225) renders a 2-sample R8
colour target over the memory of a D32S8 target's separate stencil
plane. The native import proved the plane by reading it, and that read
hit the colour target's guard: "a CPU read of ... overlaps multisampled
color target ..., whose samples are only on the host".
MultisampleTarget gains a query that does not throw: the active colour
target whose guarded range overlaps a range, with its format, samples,
footprint and newest content. A pending fill the target absorbed, a
CMASK fast clear, or a clear it recorded with no draw since is a known
uniform value; a draw, a storage write or any refused metadata is not.
The target records its clears and whether it was drawn since.
prepareDepthSampling asks it for the depth, HTILE and stencil plane
ranges before reading guest memory. An R8 UNORM or UINT target with the
depth's sample count over exactly the plane, holding a known value,
gives the plane's initial stencil, which the first host clear uses. Any
other overlap refuses sampling ("native multisample stencil plane
aliases a multisampled colour target whose samples are only on the
host", or the depth or HTILE form) and prints the colour target's
address, format, samples and newest operation, at most eight times.
CheckCurrent runs the same query: a plane fill over an aliased plane is
proven from the colour target's value, not by reading the plane, and a
colour target that drew, changed value or appeared since the last proof
refuses sampling.
Tested: agc_driver_native_depth_aliased_stencil. A 4-sample R8 target
over the plane with an absorbed fill imports and the next stencil test
passes the fill value and not another; a second absorbed fill is proven
and taken; a colour draw after it refuses. The target drawn after its
fill, and an R8G8 target over the plane, refuse with the new reason. The
guest plane keeps its 0xa5 bytes throughout. Two and eight samples, and
another colour sample count, are not available on lavapipe. With the
product change reverted the cleared case throws the guard text above
(1 of 1); with it the mode passes 5 of 5.
Nothing runs in VR2D without a headset, so sceHmdInternalIsGameVr2d,
IsMiniAppVr2d, IsCommonDlgVr2d and IsCommonDlgMiniAppVr2d return false,
the answer the console gives to the same four queries in libSceHmd2.
sceHmdOpen never issues a handle without a headset, so the distortion
correction, wide-near correction and 2D VR command queries, and their
sceHmdDistortion* export aliases, answer as the other handle queries:
NOT_INITIALIZED before sceHmdInitialize and HANDLE_INVALID after it,
leaving the command buffer unwritten.