Commit Graph

6703 Commits

Author SHA1 Message Date
MarcZX100 c7aca86c61 fix(tools): use the shared merge base for overlap checks 2026-10-13 06:01:10 +00:00
MarcZX100 2a91815210 fix(tools): parse paginated overlap API responses 2026-10-13 05:52:46 +00:00
Dean 88107b7de6
Merge pull request #4535 from moong15/codex/windows-deferred-write-watch
fix(agc): defer write tracking for fresh Windows shared imports
2026-10-13 18:33:39 +13:00
Dean 2cc97e1057
Merge pull request #4197 from MarcZX100/codex/audit-coredump-userdata
feat(libkernel): implement coredump user data calls
2026-10-13 18:24:28 +13:00
umang b24e1cc46f perf(agc): return from fresh Windows collection when nothing is fresh
MarkWritten collects the fresh portions of the written blocks before
each GPU stamp. On Windows that walked every shared view of those
blocks twice under the mappings mutex even when all of them had been
collected before. Keep the never-collected portions as address ranges,
as the Linux tracker keeps _fresh, and return after one lookup when
none overlaps the request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 10:37:27 +05:30
umang b14d087cd4 fix(agc): defer write tracking for fresh Windows shared imports 2026-10-13 10:37:27 +05:30
Dean 7e181fcc38
Merge pull request #3874 from oneandonlydean/up4/import-window-compare
perf(agc): compare an import window's pages when the window closes
2026-10-13 17:55:13 +13:00
Dean 597f976872
Merge pull request #3947 from MarcZX100/codex/carry-getsockname-unbound
fix(libkernel): return the zero address for unbound getsockname on Windows
2026-10-13 17:54:53 +13:00
Dean 3cfb915cf0
Merge pull request #4187 from Scramblrrrr/codex/cpu-copy-profile-spans
fix(agc): profile completed CPU copies with their actual spans
2026-10-13 17:54:30 +13:00
Dean e268844924
Merge pull request #4700 from Nesyth/fix/agc-comp-to-single-dcc-reads
fix(agc): read comp-to-single DCC keys of sampled textures and storage images
2026-10-13 17:54:09 +13:00
Dean 52edeeda5d
Merge pull request #4698 from Nesyth/perf/libc-shared-lease-snapshot
perf(libc): share one snapshot of the registered guest ranges between leases until the registry changes
2026-10-13 17:53:47 +13:00
Dean fa39549b50
Merge pull request #4654 from GustavoGamarra95/fix/agc-store-pending-under-written-buffers
fix(agc): store pending storage results before a use writes the same memory as a buffer
2026-10-13 17:53:26 +13:00
Dean 7e2a2ae5f9
Merge pull request #4363 from johnmaia/fix/gpl-shader-rendering
fix(agc): build pipeline library shader parts for the draw's depth format
2026-10-13 17:53:05 +13:00
Dean f9821b76ed
Merge pull request #4097 from kr4y4/fix/shader-f16-ternary-output-modifier
fix(shader): keep the output modifier of the f16 min3, max3, med3 and div_fixup ops
2026-10-13 17:52:50 +13:00
Dean 547807422c
Merge pull request #3471 from Kikoarl/perf/agc-copied-writes-overlap
perf(agc): disambiguate direct GPU writes from copied write-backs in indirect draws
2026-10-13 17:52:29 +13:00
Dean fe8d3eba0e
Merge pull request #3633 from tv7/fix/color-view-array-slice-range
fix(agc): render a color view of several array slices into its first slice
2026-10-13 17:51:58 +13:00
Dean 46e7cd3e83
Merge pull request #4838 from milescoviello/carry/seek-pipe-stream-windows-4837
fix(libc): fail fseek and ftell on a pipe with ESPIPE on Windows
2026-10-13 17:51:37 +13:00
Dean 9b7c8ea965
Merge pull request #4811 from milescoviello/carry/localtime-range-windows-4807
fix(libc): convert local times before 1970 and after 3000 on Windows
2026-10-13 17:51:16 +13:00
Dean e15c316ead
Merge pull request #4733 from fdfawef324/fix/libc-collate-char-capacity
fix(libc): size collate<char>::do_transform strings as the console does
2026-10-13 17:50:55 +13:00
Dean 1268ba8cd4
Merge pull request #4727 from gjonn/feat/hull-dynamic-control-point-index
feat(shader): read hull inputs at a control-point index computed from data
2026-10-13 17:50:35 +13:00
Dean e64bf3c5d0
Merge pull request #4662 from fdfawef324/fix/agc-gpu-map-import-off-guest-stack
fix(agc): import GPU-mapped memory on a host stack
2026-10-13 17:50:12 +13:00
Dean a6ed539e70
Merge pull request #4659 from AaravMehta-07/codex/sce-pthread-sem-overflow
fix(libkernel): guard SCE pthread semaphore count overflow
2026-10-13 17:49:51 +13:00
Dean b7025517e1
Merge pull request #4656 from milescoviello/fix/rwlock-writer-preference
fix(libkernel): hold back new rwlock readers while a writer waits
2026-10-13 17:49:30 +13:00
Dean 4fe3123627
Merge pull request #4640 from MarcZX100/codex/win-host-standard-handles-4631
fix(libc): preserve host standard handles on Windows redirects
2026-10-13 17:49:02 +13:00
Dean 88f48fddef
Merge pull request #4688 from eliyarson/fix/kernel-stat-relinked-prx
fix(libkernel): resolve original .prx names to relinked .guest.prx in stat, open and reachability
2026-10-13 17:48:42 +13:00
Dean 73a5f3a41c
Merge pull request #4667 from babyhuey/feat/libkernel-sysctl-hw-model
feat(libkernel): report hw.model from sysctl
2026-10-13 17:48:21 +13:00
Dean 2ffbb75ae7
Merge pull request #4206 from jweidenh/codex/sparse-buffer-hole-initialization
fix(agc): clear interior holes in recycled sparse buffers
2026-10-13 17:48:00 +13:00
Dean 432675d919
Merge pull request #4252 from karanvora2599/perf/shader-wave32-exec-lane-bits
perf(shader): keep wave32 EXEC and VCC lane bits without a ballot round trip
2026-10-13 17:47:39 +13:00
Dean 02f5c0bcb0
Merge pull request #4195 from rugbedbugg/fix/shader-narrowing-fold
fix(shader): preserve integer narrowing in constant folding
2026-10-13 17:47:18 +13:00
Dean 887953200b
Merge pull request #4248 from hypermoist/perf/guest-buffer-region-index-sort
perf(agc): sort guest buffer regions through indices before merging them
2026-10-13 17:47:05 +13:00
Dean cc55e1410a
Merge pull request #4661 from fdfawef324/fix/libc-shared-write-pages
fix(libc): track writes to shared guest memory per 4 KiB page on Windows
2026-10-13 17:46:44 +13:00
Dean 61e4b5506c
Merge pull request #4017 from jweidenh/codex/host-import-submission-lifetime
fix(agc): defer host import retirement until the GPU lock is held
2026-10-13 17:46:23 +13:00
screamm c8379be922 feat(libkernel): implement the coredump user-data calls
sceCoredumpWriteUserData (Dbbkj6YHWdo) and sceCoredumpDebugTextOut
(dei8oUx6DbU) get the signatures of Orbital's db_types.json (cc408367)
and SharpProspero's KernelSystem.cs (5dfdb4b0): ssize_t (const void*,
size_t) and void (const char*, int). WriteUserData moves out of
Unimplemented.cpp.

User data belongs to the core dump handler: the Vita's
sceCoredumpWriteUserData returns 0x800A0003 ("No user-data capture is
active") outside it (vita-headers e66ebe90), and the RED engine's PS4
crash handler makes every coredump call from its handler (Vangaurd
4f86d2b0). The handler is never invoked here, so WriteUserData returns
SCE_COREDUMP_ERROR_NOT_IN_COREDUMP_HANDLER (0x81180003, shadPS4
coredump_error.h e0a46675) sign-extended and keeps nothing; a null,
empty or wrapping buffer throws because the order of the console's
checks is unknown. DebugTextOut prints its text to stderr with the
[coredump] prefix; a negative length or a null text with a nonzero
length throws.

Evidence: Broken Sword Reforged (PPSA21480) reaches the family through
its sibling, #3704 comment 6113687542: "`ERROR agc_graphics.cpp:266
Sony call failed with code 8a6c9018` (the resource registration error,
followed by the error dialog), then `sceCoredumpWriteUserString not
implemented`." WriteUserString has no declaration in any source and
keeps throwing; its TechnicalDebt entry records the call. 007 First
Light (PPSA11386) imports WriteUserData (#2523) without calling it
before its stop.

Test: guest_coredump_user_data.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13 04:43:50 +00:00
Hussein Kadhim 0438621d74 fix(libkernel): getsockname on an unbound socket returns the zero address on Windows
FreeBSD's in_getsockaddr and in6_getsockaddr succeed for a socket that has no
local address and return the wildcard address with port 0. Winsock fails
getsockname with WSAEINVAL until the socket is bound, which the guest saw as
EINVAL. Return the zero address of the socket's family for that error.
2026-10-13 17:01:30 +13:00
Dean e51428bf23
Merge pull request #4759 from fdfawef324/fix/bda-span-read-split
fix(shader): split a BDA span read's in-place loads from its fallback
2026-10-13 17:00:47 +13:00
Dean 226b40db0f
Merge pull request #2132 from Raghav314/fix/agc-msaa-fill-clear
fix(agc): clear a multisampled target on a uniform fill of its color memory
2026-10-13 17:00:26 +13:00
Dean 3fed8e9bf3
Merge pull request #2121 from Raghav314/fix/agc-cb-resolve-source-samples
fix(agc): take a CB resolve's sample count from its source target
2026-10-13 17:00:06 +13:00
Dean 3779597778
Merge pull request #4658 from milescoviello/fix/sockopt-option-lengths
fix(libkernel): accept socket option values longer than an int
2026-10-13 16:53:12 +13:00
Dean 675c52ca98
Merge pull request #4580 from coltken95/fix/shader-same-target-branch
fix(shader): never branch conditionally to one label twice
2026-10-13 16:52:48 +13:00
Dean a675333d5a
Merge pull request #4600 from coltken95/fix/shader-folded-continue
fix(shader): keep the back-edge of a loop whose continue block is dead
2026-10-13 16:52:24 +13:00
Dean 3a0642e131
Merge pull request #4019 from ahir061/fix/macos-shader-cache-directory
fix(shader): find the shader cache directory on macOS
2026-10-13 16:52:01 +13:00
Dean 0d54077b9a
Merge pull request #4500 from ee6aba54/feat/agc-depth-surface-storage
feat(libSceAgcDriver): storage image access to depth surfaces
2026-10-13 16:50:53 +13:00
Dean 6124bf063f
Merge pull request #4907 from oneandonlydean/up4/fix-msaa-guest-access-segv
fix(agc): submit tiled multisample test targets before destroying them
2026-10-13 16:40:11 +13:00
Dean Galvin b32ba9eeef fix(agc): submit tiled multisample test targets before destroying them
The tiled cases of agc_multisample_guest_access destroyed each target while its layout transition and clear were still recorded, so the recorder later submitted commands for destroyed images and lavapipe crashed executing them. Each case now submits and waits first, as the linear case does. The 2x case runs only when the device renders 2x color, like the 8x case.
2026-10-13 16:07:32 +13:00
Dean Galvin e322c6e064 fix(agc): a pending CMASK clear takes precedence over a refused color fill
ApplyFastClear took the color fill before the CMASK clear, so a partial
fill of a multisampled target's color memory threw at the next use even
when a CMASK fast clear was pending over the whole target. The CB reads
a cleared tile's color from the clear registers whatever the memory
holds, so the CMASK clear is applied and the recorded fill dropped.
2026-10-13 15:48:03 +13:00
raghav314 d57f9cfb03 fix(agc): take a CB resolve's sample count from its source target
DecodeColorMetadataPass treated a CB_COLOR_CONTROL resolve as one only
when PA_SC_AA_CONFIG has a sample count, and checked the source against
it. A title that resolves with the rasterizer single-sample fell through
to the draw path and threw "only normal color rendering with copy ROP is
supported (... mode resolve)".

A color target's sample count is CB_COLOR_ATTRIB.NUM_SAMPLES, separate
from the rasterizer's; radeonsi itself writes PA_SC_AA_CONFIG 0 for a
multisampled framebuffer when rasterizer multisampling and line
smoothing are off. So a resolve is decoded when either the rasterizer or
CB0 is multisampled, and its sample count is CB0's. When the rasterizer
is multisampled, the source still has to match it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:46:45 +13:00
milescoviello 0dda76b1f9 fix(libc): check for a pipe on every stream seek on Windows
The pipe check cached its first answer in the FileStream, so a stream
first used on a regular file stayed classified as a file after its
descriptor was replaced with a pipe (dup2 onto fileno(stream)), and a
later fseek reached the C runtime again and dropped buffered bytes.
fseeko and ftello now ask GetFileType on each call, as lseek on a pipe
does since #4670, and FileStream no longer keeps the state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 02:38:02 +00:00
David 7aabb9005c fix(libc): fail fseek and ftell on a pipe with ESPIPE on Windows 2026-10-13 02:38:01 +00:00
Dean c13dc7e6b4
Merge pull request #4558 from MiniRML/fix/kernel-json-number-locale
fix(kernel): parse JSON numbers independently of host locale
2026-10-13 15:37:49 +13:00
Dean 417c7d02a7
Merge pull request #4586 from ee6aba54/fix/agc-lookahead-write-data
fix(agc): count every CP data write of a dispatch group as a write of the run
2026-10-13 15:37:38 +13:00