Commit Graph
14017 Commits
Author SHA1 Message Date
Dean 31557fef77 Merge pull request #6000 from isnisk/fix/audio-out-shutdown
fix(libSceAudioOut): park guest audio calls at exit before the port tables are destroyed
2026-10-15 12:13:05 +13:00
al3w0f205 e03e6f7a4e feat(libkernel): add munlockall export
Follows mlockall (#4386) for XPSemu (PPSA97358, QEMU os-posix.c), which
imports munlockall (NpLBpgVV7PU) from libkernel.prx. Predicted stop:

  FAIL: unresolved ELF import NpLBpgVV7PU from libkernel.prx

The NID is computed with tools/nid_names.py and matches aerolib.

Follows FreeBSD 11.4 sys/vm/vm_mmap.c sys_munlockall
(8c639945a44588f6cfdddfb057bb5aad88735da0): checks PRIV_VM_MUNLOCK,
clears wire state and returns 0. To match, munlockall unlocks ranges
locked by mlock (through VirtualUnlock on Windows, tolerating
ERROR_NOT_LOCKED, and munlockall on Linux).
2026-10-14 18:07:34 -05:00
ivica00 58e186975b perf(ajm): optimize ATRAC9 PeekInt with 32-bit bswap fast-path 2026-10-15 00:58:56 +02:00
ivica00 72f8219345 fix(shader): round tessellation coordinates to nearest integer in rect-list evaluation
In rect-list tessellation evaluation, gl_TessCoord coordinates (x, y) generated by hardware tessellators are floating-point values in [0.0, 1.0]. Direct integer truncation via OpConvertFToS causes coordinates that evaluate slightly below 1.0 (e.g. 0.999999f) due to hardware fixed-point representation to truncate to 0 instead of 1, collapsing rectangle vertices along the diagonal.

Adding +0.5f rounding prior to OpConvertFToS ensures correct mapping to {0, 1} quad vertex indices.
2026-10-15 00:58:02 +02:00
Akul Tyagi ec2acea5bd feat(libc): implement __modti3
Implement __modti3, the signed 128-bit integer modulo runtime helper complementing __divti3, __udivti3 and __umodti3. Add unit test coverage in guest_crt_tests and document zero-divisor exception behavior in technical debt.
2026-10-15 04:25:52 +05:30
fdfawef324andClaude Opus 5.5 d42f4963e3 fix(agc): print the VGT_TF_PARAM and VGT_LS_HS_CONFIG fields of a refused tessellation draw
A tessellation draw whose domain, partitioning or output topology the
reference path does not support was refused with only VGT_SHADER_STAGES_EN,
so a log did not show which configuration was refused. The refusal now
prints VGT_TF_PARAM with TYPE, PARTITIONING and TOPOLOGY, and
VGT_LS_HS_CONFIG with NUM_PATCHES, HS_NUM_INPUT_CP and HS_NUM_OUTPUT_CP.
The fields come before the explanation, so the reason that the
APS5_CAPTURE_TRACE log cuts at 256 characters still holds all of them.

Field and enumerator names are those of Mesa's
src/amd/registers/gfx103.json (enums VGT_TESS_TYPE, VGT_TESS_PARTITION and
VGT_TESS_TOPOLOGY). A value with no name there is printed as a number only.
The accepted configurations are unchanged.

The new UnsupportedTessellationFieldTests drives DecodeState into the
refusal with power-of-two triangle and quad patches, an isoline domain,
line and point output and unnamed TYPE, PARTITIONING and TOPOLOGY values,
and checks the decoded fields of both registers, including the order of
the input and output control-point counts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 18:50:41 -04:00
yripper 913adca3aa docs(libc): record the macOS guest arena holes as debt
Move the explanatory comments into docs/dev/debt/libc.md, as the conventions require.
2026-10-14 19:47:07 -03:00
yripper 3e98703fc8 feat(libc): reserve the guest arena on macOS
macOS has no /proc/self/maps or MAP_FIXED_NOREPLACE, so the arena never came up and every guest allocation threw. Enumerate host regions with mach_vm_region and reserve free chunks with a fixed mach_vm_map, which fails instead of replacing. This skips dyld, the Rosetta runtime, and ranges the kernel never lets a process map (0x10_0000_0000-0x70_0000_0000). The POSIX commit/protection paths now build on macOS unchanged. Adds standalone guest_arena tests (x86_64 under Rosetta and arm64).
2026-10-14 19:47:07 -03:00
David 10bc2f05af docs(debt): record where the cursor functions' signatures come from 2026-10-15 02:46:21 +04:00
Adrià 6239ceffc8 Merge pull request #6120 from adriadam10/fix/untracked-hint-windows-only
test(agc): register the untracked snapshot hint test on Windows only
2026-10-15 00:44:41 +02:00
Adrià FranchandClaude d0823dd4fa test(agc): register the untracked snapshot hint test on Windows only
Co-Authored-By: Claude <[email protected]>
2026-10-15 00:44:29 +02:00
ArjenS-LA e715f9855b fix(tools): accept compilation database argument arrays 2026-10-14 15:37:10 -07:00
ArjenS-LA 62b09018d4 fix(relinker): reject needed companion output collisions 2026-10-14 15:36:25 -07:00
ArjenS-LA 93b10d9647 fix(release): reject dangling directory junction destinations 2026-10-14 15:36:09 -07:00
ArjenS-LA fcd477faf8 fix(tools): normalize qualified ELF module exports 2026-10-14 15:35:59 -07:00
umang 843f7e963e fix(agc): skip unused pixel stages with retained export formats 2026-10-15 11:35:54 +13:00
Cesar RodriguezandClaude Opus 5.5 c43af1f372 fix(libScePlayGo): report optional chunks as supported and installed
A dump is fully installed, so scePlayGoGetSupportedOptionalChunk and
scePlayGoGetOptionalChunk report every optional chunk (language pack) like
scePlayGoGetLanguageMask reports every language. They returned an empty
bitmask, so PPSA01748 hid every text language its playgo-scenario.json
lists as a chunk language, English included.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 22:30:55 +00:00
Adrià eea428ca85 Merge pull request #5536 from milescoviello/fix/scenet-getsockopt-buffers
fix(libSceNet): report SO_SNDBUF and SO_RCVBUF from sceNetGetsockopt
2026-10-15 00:29:08 +02:00
Adrià ba3ffbab9d Merge pull request #5523 from milescoviello/fix/pad-vibration-mode-5
fix(pad): accept vibration mode 5
2026-10-15 00:28:36 +02:00
Adrià ddba90e4ae Merge pull request #5494 from MarcZX100/fix/playgo-assume-unlisted-incomplete-dump
fix(libScePlayGo): report missing chunk metadata
2026-10-15 00:27:52 +02:00
YatoVoid b36f6f3260 test(agc): disable the shader disk cache in agc_shader_memory_tests 2026-10-14 17:27:42 -05:00
Adrià 462eb4d9f1 Merge pull request #5493 from Roojool/contrib/g14-kqueue-watch
fix(libkernel): name the failing vnode watch in the kqueue notification error
2026-10-15 00:27:23 +02:00
Dean 80ccb9fb1e Merge pull request #5483 from ee6aba54/fix/agc-storage-cache-budget
fix(agc-driver): size the storage image cache from the device's reported memory budget
2026-10-15 11:26:11 +13:00
Yossi Yadgar 7af2961308 test(agc): check that a draw refused for a buffer type names its shader and V# 2026-10-15 01:22:23 +03:00
Yossi Yadgar 9960503f6a fix(agc): name the shader when a draw stage fails to capture or materialize 2026-10-15 01:22:23 +03:00
Yossi Yadgar 84a01a06e7 fix(shader): name the buffer and its V# when a descriptor type is unsupported 2026-10-15 01:21:57 +03:00
Dean b9d9ec6051 Merge pull request #4915 from fdfawef324/fix/agc-pipeline-cache-one-writer
fix(agc): merge the pipeline cache file instead of overwriting it with one device's cache
2026-10-15 11:18:23 +13:00
David e8d32bbc2d test(libSceVideoOut): check that the cursor functions report they are not implemented
guest_video_out_cursor calls each of the four cursor functions with a handle,
a cursor index, an image and a position, and requires the "not implemented"
error. Without the exports it does not link.
2026-10-15 02:16:48 +04:00
Adrià 2f1597bde5 Merge pull request #6093 from adriadam10/perf/draw-cache-data-hits
perf(agc): refresh pure data words of a cached draw stage instead of recapturing it
2026-10-15 00:15:54 +02:00
David 7a86e5ae32 feat(libSceVideoOut): export the hardware cursor functions as not implemented
sceVideoOutCursorEnable, sceVideoOutCursorDisable,
sceVideoOutCursorSetImageAddress and sceVideoOutCursorSetPosition are imported
by Prospero Win's (PPSA99995) Vulkan module, so on Windows, where imports are
bound at load, the title cannot load without them. They report that they are
not implemented when called.
2026-10-15 02:15:26 +04:00
fdfawef324andClaude Opus 5.5 9f96444c4a feat(libSceNpManager): register NP state callbacks and report signed-out from sceNpCheckCallback
sceNpRegisterStateCallback and sceNpRegisterStateCallbackA stored nothing,
the unregister calls always succeeded and sceNpCheckCallback did nothing,
so a title that waits for its NP state callback never learned the user's
state. #1277 reports that Minecraft Preview (PPSA19639) needs the callback
(stop 2).

sceNpRegisterStateCallbackA now keeps up to 8 callbacks and returns the
slot plus 1. A null callback returns INVALID_ARGUMENT, a callback that is
already registered CALLBACK_ALREADY_REGISTERED and a ninth one
CALLBACK_MAX (0x8055001D). sceNpUnregisterStateCallbackA returns
INVALID_ARGUMENT for an id outside 1..8 and CALLBACK_NOT_REGISTERED for an
empty slot. The legacy sceNpRegisterStateCallback keeps one callback with
the same errors. The rules follow shadPS4
src/core/libraries/np/np_manager.cpp @15abf68c9b52 (RegisterStateCallbackA
and UnregisterStateCallbackAById L857-L901, the legacy pair L981-L1005,
ORBIS_NP_STATE_CALLBACK_MAX L36) and np_error.h L38.

Each registration is marked pending. sceNpCheckCallback takes the pending
registrations under the lock and calls them after releasing it, on the
calling thread, with SIGNED_OUT for the initial user 0x10000000. For the A
form this follows KytyPS5 src/libs/network.cpp @9e41d8320a27
(NpRegisterStateCallbackA L4021-L4034 marks the registration pending,
NpCheckCallback L3959-L3974 delivers it once). KytyPS5 never calls the
legacy callback (NpRegisterStateCallback and NpUnregisterStateCallback,
L4009-L4019, do nothing). The legacy callback is called as
(user, SIGNED_OUT, nullptr, userdata), as in shadPS4, which passes an NpId
only for SIGNED_IN (L823, L938-L940).

shadPS4 queues SIGNED_OUT from the user service login event instead
(DispatchPendingNpStateCallbacks L903-L962), and the same event calls the
reachability callback once with UNAVAILABLE (L922-L931, L959-L961). The
reachability callback is still not called here. These differences and the
unmeasured console behaviour are recorded in
docs/dev/debt/libSceNpManager.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 18:12:19 -04:00
fdfawef324andClaude Opus 5.5 0ee7af6f5f feat(agc): accept SAMPLE_STREAMOUTSTATS events without a destination in EVENT_WRITE
EVENT_WRITE (PM4 opcode 0x46) with event type SAMPLE_STREAMOUTSTATS1-3
(0x01-0x03) or SAMPLE_STREAMOUTSTATS (0x20) failed submission validation
with "EVENT_WRITE event type 1 is not implemented". Minecraft Preview
(PPSA19639, discussion #1277, stop 9) submits a 2-dword type-1 packet
while entering a world, and the GPU thread aborted intermittently.

The four values are VGT_EVENT_TYPE entries in Linux
drivers/gpu/drm/amd/include/navi10_enum.h L14155-14188 at
0fcb05b72344f40806cbe810de8872f1698bf053.
drivers/gpu/drm/amd/amdgpu/nvd.h L326-347 at the same commit documents
these events only with the sampling index (3, or
EVENT_INDEX__SAMPLE_STREAMOUTSTATS* 8-11 on gfx10), followed by
ADDRESS_LO/HI. The 2-dword index-0 packet has no destination dwords, and
what the CP does with it is neither documented nor measured. AnyPS5 does
not emulate the VGT stream-out counters, so there is nothing to sample.
Packet execution already skips EVENT_WRITE.

These event types are now accepted on the graphics queue as 2-dword
packets with event index 0. The sampling indices 3 and 8-11 throw that
stream-out statistics sampling to memory is not implemented, before the
size and reserved-bit checks. Other indices, other sizes and the compute
queue still throw.

sceAgcDcbEventWrite ignores the address for every event type except 0x38
and 0x39, so a call with one of these event types and an address now
builds a packet that validates and writes nothing. This is recorded in
docs/dev/debt/libSceAgcDriver.md with the unmeasured hardware behaviour.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 18:12:16 -04:00
Zinebyte 58a1e712cb fix(libkernel): cancel before acquiring a ready timed semaphore 2026-10-14 18:09:37 -04:00
Adrià 922abe6a4e Merge pull request #5892 from WallisSkill/fix/cat-quest-3-ppsa15065
perf(agc): compare sampled snapshots outside the write watch only after a write-watch mark
2026-10-15 00:05:10 +02:00
Adrià 8f9240f067 Merge pull request #5512 from zaryabzip/fix/module-dir-executable-input
fix(relinker): skip the input executable when scanning modules for --executable
2026-10-15 00:02:56 +02:00
Adrià 596a0d70aa Merge pull request #5472 from eljackjoestar-cmd/codex/rgba8-uint-force-degamma
fix(shader): decode forced degamma on biased RGBA8_UINT samples
2026-10-15 00:01:33 +02:00
AdriàandClaude d65b9775e7 test(tools): give the progress encoding subprocess 60 s (#6098)
The first cp1252 run timed out at 10 s on a loaded Windows runner (Build
runs 38642532107 and 38570483873); ctest still bounds the test at 120 s.

Co-authored-by: Claude <[email protected]>
2026-10-15 00:00:20 +02:00
David 84f72fc057 docs(debt): record that guest GS accesses trap in Windows output 2026-10-15 01:57:53 +04:00
Dean 2bae94b978 Merge pull request #4774 from hamb3r/feat/relinker-windows-startup-barrier
feat(libc): lazily initialize application heap on first access
2026-10-15 10:57:18 +13:00
Dean 8ae436891a Merge pull request #5181 from ThatsLeo/perf/shader-compact-resource-plans
perf(shader): keep only evaluable branch conditions in resource plans
2026-10-15 10:56:57 +13:00
Dean e5592f0192 Merge pull request #3914 from GalaxyGamingFR/fix/pr-overlap-top-insert-link
fix(tools): link top-of-file insertions to line 1 in pr_overlap
2026-10-15 10:55:07 +13:00
Adrià 6870cc26ba Merge pull request #5492 from billythemenace2/fix/shader-lds-add-f32-denormals
fix(shader): flush ds_add_f32 denormals and NaNs as the hardware does
2026-10-14 23:53:34 +02:00
AnyPS5 Contributors a7730cb9e6 fix(graphics): keep discarded import probes from pinning windows 2026-10-14 17:53:11 -04:00
Adrià 038c83b9ba Merge pull request #5446 from Nesyth/fix/agc-depth-surface-from-storage-writes
fix(agc): start a new depth surface from the storage writes over its plane
2026-10-14 23:51:42 +02:00
KauaandClaude 6f5f176aa6 fix(psml): name two exports that only had NIDs
Co-Authored-By: Claude <[email protected]>
2026-10-14 23:48:29 +02:00
Dean 9bec202332 Merge pull request #5517 from ps54all/feat/libsceajm-opus-family255-multistream
feat(ajm): decode Opus mapping family 255 with several channels
2026-10-15 10:48:06 +13:00
Adrià b72378b0fa Merge pull request #5525 from ahmedmakroum/docs/usage-shader-cache
docs(usage): document the shader cache directory and its environment variables
2026-10-14 23:46:37 +02:00
Dean 95945006ec Merge pull request #4629 from mugurc/fix/libcxx-portability
fix(libs): build with libc++
2026-10-15 10:46:05 +13:00
Adrià FranchandClaude de0cd00eb1 docs(build): document APS5_TRACE_DRAW_PROGRAMS
Co-Authored-By: Claude <[email protected]>
2026-10-14 23:39:27 +02:00
MarcZX100 fffa0f3865 feat(agc): trace shader addresses for each draw 2026-10-14 23:39:27 +02:00