Commit Graph
5229 Commits
Author SHA1 Message Date
Nithishvelan M 85dcaddf35 docs(libSceCdlgPlayerReview): document unverified close-before-open lifecycle 2026-10-19 17:39:18 +02:00
Adrià c017549dc1 Merge pull request #6955 from alfalfa-star/perf/agc-space-page-reuse
perf(agc): reuse a cached address space's committed pages on a hit
2026-10-19 17:33:02 +02:00
Adrià 88a6b34bc5 Merge pull request #6966 from ebosido444-ai/fix/agc-relocated-header
fix(agc): resolve a relocated AGC header whose arrays hold the registered bytes
2026-10-19 17:28:19 +02:00
T3cm0andClaude Opus 5.5 151f116550 feat(libSceVrTracker2): answer as the console's module before initialization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 17:28:03 +02:00
Adrià 4393456ed0 Merge pull request #7010 from MarcZX10/codex/trace-dispatch-queue-origin
chore(agc): tag dispatch IO traces with queue origin
2026-10-19 17:27:46 +02:00
sussyandClaude Sonnet 5.5 742af5fc8d fix(agc): name both missing features when mesh barycentrics cannot be provided
A pixel shader on the mesh path that reads barycentrics on a device with
neither VK_KHR_fragment_shader_barycentric nor VK_EXT_mesh_shader
reported only the missing mesh shaders. Say that the device has neither,
so reports from such devices are told apart from the case the emulation
covers.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 17:26:37 +02:00
sussyandClaude Sonnet 5.5 dd41527ce2 feat(shader): emulate smooth barycentrics on the mesh path
A pixel shader that reads barycentrics on a device without
VK_KHR_fragment_shader_barycentric used to need a vertex shader so a
generated geometry stage could follow it, which a mesh pipeline cannot
have. The mesh program is now compiled a second time with the layout
its pixel shader needs: it writes its clip position as a varying and the
three corner positions of each primitive as per-primitive outputs, and
the pixel shader solves for the weights, for both smooth and linear
interpolation.

The layout is part of the mesh cache key, the stored artifact and the
captured request. Without VK_EXT_mesh_shader the draw still throws, now
saying so. Per-vertex parameters on the mesh path still throw.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 17:26:37 +02:00
Kovalev Vladislav 8d45d5c446 test(shader): cover device paths within host file IO limits 2026-10-19 21:25:57 +06:00
Lindamea1andClaude Opus 5.5 5fafbef246 test(libkernel): check the Linux TIOCGWINSZ word and the ioctl request boundaries
The OpenOrbis net_http sample stops on 0x5413, the Linux TIOCGWINSZ
that musl sends to standard output; the carried cases covered 0x5401
but not that word, so the test adds it to the malformed words. It also
pins the two boundary words the check takes as well-formed, 0x20046601
(IOC_VOID, length 4) and 0x80006601 (IOC_IN, length 0): on a guest
socket with a null argument they fail with EFAULT, not ENOTTY.

The debt sentence now states the open gap: an input request with
length 0 is not rejected as malformed, while sys_ioctl rejects it in a
kernel built without COMPAT_FREEBSD4, COMPAT_FREEBSD5 and COMPAT_43,
and which of these the PS5 kernel has is unknown.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 16:25:42 +01:00
Hussein Kadhim baa6d4aeee fix(libkernel): fail a malformed ioctl request with ENOTTY before the descriptor is looked at
FreeBSD's sys_ioctl rejects a request with no direction bit, an output request with no length, or a void request whose length is not an int before it reads the argument or resolves the descriptor. ioctl threw on such a request for a file, pipe or directory, failed with EBADF for a closed descriptor and with EFAULT for a socket given no argument.

(cherry picked from commit 501518f321ac5d0b45ce1090af39c680927edf49)
(cherry picked from commit 3eb7edd9cf)
2026-10-19 16:25:42 +01:00
Lindamea1andClaude Opus 5.5 3237083172 fix(libkernel): return ESRCH from scePthreadAttrGet for a thread that has ended
scePthreadAttrGet copied the attributes of any non-null handle, so a
thread that was joined or had finished still answered 0, and a thread
that ended detached was read after its object had been freed. FreeBSD
11.4's _pthread_attr_get_np returns ESRCH for a dead or reclaimed thread,
and Monster Hunter Wilds (PPSA24191) reuses a slot of its thread table
only when scePthreadAttrGet returns 0x80020003.

After the EINVAL checks it now returns ESRCH unless the handle is a live
guest thread, and copies the fields while holding the thread registry
lock (LockLiveGuestThread), so a detached thread exiting during the call
is not freed under the copy. GuestThreadIsLive uses the same lookup.
pthread_attr_get_np, which the title does not import, is left as it is;
the debt entry records the difference.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 16:25:14 +01:00
Dean Galvin 064a6f98ab Merge main into pr-7427
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
2026-10-20 04:25:03 +13:00
Lindamea1andClaude Opus 5.5 179316c452 fix(libkernel): return ENOMEM from sceKernelAvailableDirectMemorySize when the range has no free block
A search range with no free direct memory returned EAGAIN (0x80020023).
A PS5 returns ENOMEM (0x8002000c) for an occupied range, as the
PS5_RetroArch author's console capture records, and PS5_PayloadSDK's
ps5_memory_query, which RetroArch uses for its memory status, gives up
on any other error.

LargestFree now returns the error: ENOMEM when no block is found, and
EAGAIN as before for a negative start, an end at or below the start and
an alignment that overflows when rounded to a page. guest_memory expects
ENOMEM for an occupied range and EAGAIN for those arguments. The
unmeasured argument handling is recorded in the libkernel debt file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 16:24:55 +01:00
Rajkamalcode 448cf78c69 fix(agc): skip storage write-back units that lie in no tiled slice
writeBackWindows retiles the kept 64 KiB units through the windows of the
surface's (layer, mip) slices. A unit can lie outside every window: the
tracking grid spans the whole guest range flat, while the slices of a 3D
surface taper in depth (HasLayer), so the upper depth slices' higher-level
blocks belong to no window. The empty window set then sized the retile
linear and scratch buffers at zero, and the zero-sized device buffer threw
'AGC graphics: zero-sized device buffer', aborting the process.

Keep such units as the guest left them: there is no tiled data of the
surface to retile or store. The caller alone accounts for the unit.
2026-10-19 20:54:46 +05:30
Kovalev Vladislav 3955cd3379 fix(shader): skip unsafe prefixed cache directory traversal 2026-10-19 21:23:28 +06:00
pushkarreddyy a1b6caaf0a feat(libkernel): implement setgid 2026-10-19 20:41:52 +05:30
Nicolas AboschandClaude Sonnet 5.5 462cbf6499 docs(libkernel): shorten the short-sleep debt entry
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 12:09:15 -03:00
plokmklo 9c9128d45c docs(debt): name the pending results that still have no saved guest bytes
Results that land in a unit whose store ran while its blocks were
watched, after those blocks left the watch while nothing was pending,
have neither saved bytes nor a watch: the unwatch hook found nothing to
save and the write-back refuses as before (#7017). The entry named only
the range that leaves the watch without the hook running over it.
2026-10-19 17:01:06 +02:00
plokmklo 1b6419caae fix(agc): run the unwatch hook when a failed collect leaves the write watch
A MarkWritten whose fresh collect fails (a no-access or unwatchable
resident page inside the 64 KiB block span) took the span out of the
write watch without running the unwatch hook, so pending storage-image
results over it kept no saved guest bytes and their write-back refused:
storing storage image results pending over memory outside the write
watch without the guest bytes saved before them is not implemented
(#7017, Palworld PPSA23126 among others).

The hook now runs over the block span before the blocks leave the
watch, as Unwatch and the import fallback do, with the tracker lock
released for it like #6308 does for imports. The debt entry drops the
failed collect from the unsaved cases.

The check makes a collect fail over a no-access arena page and requires
the hook to have covered the block; it needs the WindowsMappings
protection failure, so it runs in the Windows-only section of the write
tracking test.
2026-10-19 17:00:48 +02:00
Adrià Franch f2558e7be6 docs(libScePlayGoDialog): file the GetResult note under Unknown function info 2026-10-19 16:58:33 +02:00
Nithishvelan M 89e1425662 fix(libScePlayGoDialog): return COMMON_DIALOG_ERROR_NOT_FINISHED for uncompleted dialog
Align scePlayGoDialogGetResult unfinished error code with the other common dialog modules across the tree (0x80B80005, COMMON_DIALOG_ERROR_NOT_FINISHED) instead of 0x80ED0005. Update GuestPlayGoDialog test and technical debt entry accordingly.
2026-10-19 16:58:29 +02:00
Nithishvelan M a9264aa7e9 docs(libScePlayGoDialog): record unverified status check and rename test variable 2026-10-19 16:58:29 +02:00
Nicolas Abosch b131d2db5d Merge remote-tracking branch 'origin/main' into perf/gpu-wake-sleeps 2026-10-19 11:58:20 -03:00
Dean Galvin 88f64ec265 x
# Conflicts:
#	docs/dev/debt/libSceAgcDriver.md
2026-10-20 03:54:33 +13:00
Dean Galvin 1d8d67f8d3 x
# Conflicts:
#	docs/dev/debt/libSceAgcDriver.md
2026-10-20 03:54:32 +13:00
Dean Galvin f3751e96ad Merge main into pr-6457
# Conflicts:
#	docs/dev/debt/libSceAgcDriver.md
2026-10-20 03:54:07 +13:00
Adrià c92eb8da1e Merge pull request #6931 from AnthonyClemens/perf/agc-pipelined-indirect-draws
perf(agc): queue CPU-path indirect draws on the draw pipeline
2026-10-19 16:48:13 +02:00
Adrià 73c59b7be6 Merge pull request #6958 from Pipodi/fix/pipeline-cache-save-try-lock
fix(agc): skip a periodic pipeline cache save while a pipeline creation holds the cache
2026-10-19 16:48:06 +02:00
MarcZX10 2a7e1b46eb docs: explain current VR support limitations 2026-10-19 14:43:14 +00:00
ps54allandClaude Opus 5.5 b0558ce95f feat(shader): model ds_ordered_count swap
A ds_ordered_count with offset1 bit 4 set swaps the first active lane's value into the GDS counter instead of adding it. Emit it as one device-scope atomic exchange through the same path as the ordered add, and return the counter's previous value to every active lane.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 16:41:03 +02:00
Adrià 863486cc32 Merge pull request #6836 from DavidSamir/fix/libkernel-open-file-limit-macos
fix(libkernel): set the open file limit at load on macOS
2026-10-19 16:38:18 +02:00
Adrià FranchandClaude Sonnet 5.5 d2e5f1b7fe fix(libSceLoginDialog): drop BOM added to the debt file
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 16:30:21 +02:00
pushkarreddyy 91abb61be6 fix(recompiler): use ActiveMaskImplies in SrtTape and restore debt entry 2026-10-19 20:00:18 +05:30
Nithishvelan M 1dbba0243a docs(libSceLoginDialog): document unverified close-before-open lifecycle 2026-10-19 16:30:17 +02:00
Adrià Franch 542fcef382 docs(libSceNpAuthAuthorizedAppDialog): drop BOM and restore the existing debt line 2026-10-19 16:28:46 +02:00
Nithishvelan M 84a6f79fc8 docs(libSceNpAuthAuthorizedAppDialog): document unverified close-before-open lifecycle 2026-10-19 16:28:38 +02:00
David 63e763f443 Merge remote-tracking branch 'origin/main' into feat/shader-barycentric-tessellation-last-vertex
# Conflicts:
#	docs/dev/debt/shader.md
2026-10-19 18:27:34 +04:00
Adrià bcdee66d10 Merge pull request #5782 from SirDarky/feat/shader-mad-f32-gfx1010
docs(debt): record the v_mad_f32 family as measured on gfx1010
2026-10-19 16:19:55 +02:00
thuanquangandClaude Opus 5.5 1ed8eb6d8b fix(shader): sample a 3D T# through DIM 2D_ARRAY as a volume
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 16:19:13 +02:00
Adrià 4f10164198 Merge pull request #6901 from akkadbakkad89/feat/np-cpp-web-api
feat(libs): restore libSceNpCppWebApi for dumps that ship no copy
2026-10-19 16:18:42 +02:00
ShinMalphur 41fe91a13b docs(net): state hardware validation gap first 2026-10-19 20:41:43 +06:30
ShinMalphur 905fa532af docs(net): record process-time behavior source 2026-10-19 20:41:03 +06:30
Adrià c4708fa207 Merge pull request #6916 from MarcZX10/codex/carry-tz-6910
fix(libc): honor guest TZ in time conversions
2026-10-19 16:08:10 +02:00
ntamas94andClaude Opus 5.5 be7068bd81 fix(libSceNet): end IPv4 sceNetInetPton text at whitespace as the PS4 does
PS4 firmware 10.71 converts "1.2.3.4" followed by a space, tab, LF,
VT, FF or CR, and anything after it ("1.2.3.4 x"), to 1.2.3.4 and
returns 1, where host inet_pton returns 0. Leading whitespace, other
trailing bytes (0x01, 0xa0), "1.2.3 " and IPv6 text with whitespace
still fail there.

A failed conversion leaves the destination and sceNetErrnoLoc
unchanged on the console; Winsock inet_pton writes the parsed prefix
before failing, so the conversion now goes through a local buffer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 16:05:36 +02:00
Adrià ebb478c055 Merge pull request #6939 from milescoviello/fix/systemservice-psmkit-exports
fix(libSceSystemService): declare the PsmKit local process exports
2026-10-19 16:05:00 +02:00
MarcusandClaude Opus 5.5 8768803dd7 docs(debt): record the v_mad_f32 family as measured on gfx1010
v_mad_f32, v_mac_f32, v_madak_f32 and v_madmk_f32 exist only on gfx10.1,
so the RDNA2 oracle can't measure them. Measured on gfx1010 (RX 5700 XT)
in wave32 at IEEE 0 and 1, f32 denormal modes 0 to 3 and round modes 0
to 3, and in wave64, they round the product before the add, flush f32
sources, product (tiny after rounding with an unbounded exponent) and
result in every mode, and choose NaN results like the fma forms.

The behaviour stays left to the driver: translating it on every lane
cost about 15x main on the RX 5700 XT and 23x on an RTX 3070, and a
branch around the exact path still about 6x, so the lowering waits for
the SPIR-V float controls of #981.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 09:54:55 -04:00
Gjon Gojcevic a15694eb94 feat(agc): render layered draws into a one-slice surface as an array of its view's slices
A layered draw into a color view of slices 0 to 5 of a 2D surface whose
CB_COLOR_ATTRIB3 declares one slice was refused. The CB clamps the
render target array index to the view's SLICE_MAX, not to the surface's
slice count, so each layer is written one slice pitch further on.
PPSA01317 renders a 512x512 cube map this way. Such a view now renders as
a 2D array of the view's last slice + 1 slices.

AI-assisted: yes
2026-10-19 15:52:35 +02:00
Adrià 85029a00f5 Merge pull request #6762 from simonbronk/fix/stencil-op-value-export
fix(agc): replace with a stencil operation value the pixel shader exports
2026-10-19 15:45:10 +02:00
Adrià 3647fcc68a Merge pull request #7370 from klosixgaming-arch/docs/system-fonts-boot
docs(usage): say what happens without system fonts and where to get them
2026-10-19 15:42:02 +02:00
Adrià 3efab5ed86 Merge pull request #6914 from moong15/pr/queued-index-read-order
fix(agc): order deferred write-backs after queued draws' index reads
2026-10-19 15:39:49 +02:00