Commit Graph

4797 Commits

Author SHA1 Message Date
Yunus Shaikh 28ca53dc89 feat(agc): report performance timer scopes to Tracy with APS5_ENABLE_TRACY
APS5_ENABLE_TRACY=ON builds the Tracy 0.14.1 client from the new
3rdparty/tracy submodule as a shared library next to the patched
libraries. Every PerformanceTimer scope of libSceAgcDriver and
libSceVideoOut becomes a Tracy zone, each presented flip ends a frame,
and the queue workers and the presenter name their threads. The client
listens only on localhost and records only while a profiler is
connected; sampling, system tracing, call stacks, code transfer and its
crash handler are off. Without the option nothing of Tracy is compiled.

On MinGW the client is built without thread_local destructors and with
TRACY_DELAYED_INIT, because emulated TLS frees thread_local objects
before their destructors run; a thread's event producer then stays
alive until the process exits instead of being destroyed on freed
memory.
2026-10-12 12:55:40 -07:00
AlxcBTW af52bc430f style(agc): restore the space before QueryBdaByteFeatures
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:42:59 +02:00
AlxcBTW 5c7da226df fix(agc): write the trace's gzip framing around a raw deflate stream
The zlib in the tree (libjpeg-turbo's) is built with NO_GZIP, so
deflateInit2 refuses the gzip wrapper (windowBits 31) and no trace was
written. The trace file now writes the gzip header, a raw deflate stream,
and the CRC-32 and size trailer itself. The writer's result line is flushed,
since stderr is buffered in a title process. The file writing moves to
TraceFile, and a test inflates a written file and checks its CRC-32 and
size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:42:59 +02:00
AlxcBTW 5668e0d0e7 feat(agc): record a present window as a Chrome trace and a summary line
APS5_TRACE_FRAMES=<start>:<count> (or APS5_TRACE_SECONDS=<start>:<length>)
records every PerformanceTimer scope and stage of the queue workers and the
presenter inside the window as complete events, named after their frame
timing keys, into a preallocated buffer per thread. Slices under 20 us are
counted per thread instead of written; a full buffer stops that thread and
sets trace_dropped. When the window closes, a ProfileOutput writer thread
writes aps5-trace-<commit>-<pid>.json.gz and appends one line to
aps5-summary.jsonl. Without either switch a PerformanceTimer costs one more
predictable branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:42:59 +02:00
Adrià cf4557e5d8
Merge pull request #4570 from AlxcBTW/feat/sampler-collapsed
feat(agc): write the worker sampler's stacks as collapsed stacks
2026-10-12 21:42:52 +02:00
Dean 2f4cc8983b
Merge pull request #4431 from AlxcBTW/refactor/spirv-specializer-debris
refactor(shader): drop unused folded constants and unreachable blocks after specialization
2026-10-13 08:30:39 +13:00
AlxcBTW 428963d3b3 feat(agc): write the worker sampler's stacks as collapsed stacks
APS5_SAMPLE_WORKER=<file> now also writes <file stem>.collapsed.txt: one
"frame;...;frame count" line per distinct stack of queue worker 0, root
first, frames as module+0xRVA, which speedscope.app and flamegraph.pl
open. Walks go up to 64 frames, and nothing allocates while the worker is
suspended.

The libraries are built with -fno-asynchronous-unwind-tables, so most of
their functions have no .pdata entry, only a DWARF record in .ehfram, and a
walk ended at the first such frame. The worker's walk now steps those
frames through their record, with the CIE/FDE decoding and the call frame
instructions of libc's unwinder, which move from Unwind.cpp into its
header unchanged. A module is indexed after the worker resumes, the first
time a walk meets it, and every register the step restores is read inside
the worker's stack. The process sampler (APS5_SAMPLE_THREADS) keeps its 12
frames through .pdata.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:23:11 +02:00
Dean 1b92f7f5dc
Merge pull request #4605 from AlxcBTW/fix/agc-dword-pattern-fill-format
fix(agc): take the dword pattern-fill kernel only through a 32-bit output format
2026-10-13 07:35:32 +13:00
Dean 9d3629cc91
Merge pull request #4268 from AlxcBTW/fix/vop3p-int-neg
fix(shader): apply VOP3P neg_lo/neg_hi to packed 16-bit integer sources
2026-10-13 07:35:10 +13:00
Dean ed47df8ba9
Merge pull request #4385 from AlxcBTW/fix/host-import-retire-hold
fix(agc): keep a host import dropped mid-hold for every batch that hold opens
2026-10-13 07:34:49 +13:00
Dean c90404f97a
Merge pull request #4518 from AlxcBTW/fix/bda-unaligned-dword-write
fix(shader): store unaligned 32-bit BDA writes byte by byte
2026-10-13 07:34:34 +13:00
Dean 0c75934f5f
Merge pull request #4470 from overlordxrz-source/fix/vertex-one-lane-waves
fix(recompiler): run vertex programs as one-lane waves without vertex subgroups
2026-10-13 07:34:13 +13:00
Dean 9f7c40e36f
Merge pull request #4389 from ivica00/fix/rect-list-invariant-position
fix(shader): decorate rect-list gl_Position as Invariant
2026-10-13 07:33:51 +13:00
Dean 5d933db02e
Merge pull request #4364 from SleglJan/fix/structurizer-return-join
fix(recompiler): give an early-return selection a merge when its parent's other arm reaches the same join
2026-10-13 07:33:30 +13:00
Dean 9df77462cc
Merge pull request #4544 from poonasor/feat/libkernel-module-info2
feat(libkernel): implement sceKernelGetModuleList2 and sceKernelGetModuleInfo2
2026-10-13 07:33:08 +13:00
Dean 9c99f43440
Merge pull request #4537 from coltken95/claude/sleepy-dirac-e44kw4
fix(libc): sort with FreeBSD 11's qsort so equal elements keep its order
2026-10-13 07:32:15 +13:00
Dean 21c27e60a4
Merge pull request #4536 from orishamir/fix/debugout-host-stderr
fix(libkernel): keep sceKernelDebugOutText off a redirected guest stderr
2026-10-13 07:31:53 +13:00
Dean a29ea3a2e3
Merge pull request #4529 from NahuelGenchi/fix/libc-new-length-error
fix(libc): throw bad_alloc from operator new when the default heap rejects a size
2026-10-13 07:31:32 +13:00
Dean 455027e520
Merge pull request #4528 from kr4y4/test/agc-dot2-rounding-float64-skip
test(agc): skip the f32 dot2 rounding test on devices without shaderFloat64
2026-10-13 07:31:10 +13:00
Dean 3b5c96377d
Merge pull request #4516 from Ondra97/codex/file-lock-lifetime
fix(libs): share Windows flock state between duplicated descriptors
2026-10-13 07:30:48 +13:00
Dean f7b238e43b
Merge pull request #4513 from winstrex/fix/libkernel-open-directory-trailing-separator
fix(libkernel): open directories whose host path ends in a separator on Windows
2026-10-13 07:30:26 +13:00
Dean 66013d910b
Merge pull request #4511 from rebelittle/fix/windows-seh-unwind
fix(libc): unwind guest exceptions through Windows DLL frames
2026-10-13 07:30:11 +13:00
Dean 4756c051ef
Merge pull request #4504 from yunusshaikh7/fix/savedata-dir-name-trailing-wildcard
fix(savedata): let a trailing % in a directory name pattern match nothing
2026-10-13 07:29:49 +13:00
Dean 60f4c71608
Merge pull request #4466 from babyhuey/feat/libkernel-socid-cpumode
feat(libkernel): export sceKernelGetMainSocId, sceKernelGetCpumode and sceKernelGetCpuFrequency
2026-10-13 07:27:28 +13:00
Dean d4ccf91e03
Merge pull request #4462 from milescoviello/carry/libc-umodti3-4460
feat(libc): implement __umodti3
2026-10-13 07:27:06 +13:00
Dean b9f194a890
Merge pull request #4455 from SibteProf/fix/libc-secure-copy-size-limits
fix(libc): reject oversized secure copy destinations
2026-10-13 07:26:35 +13:00
Dean 715bfabdac
Merge pull request #4426 from babyhuey/feat/libc-overflow-error
feat(libc): export std::overflow_error type info, vtable and destructor
2026-10-13 07:25:42 +13:00
Dean 30e169127d
Merge pull request #4419 from Ondra97/codex/deferred-module-lifetime
fix(libkernel): bind deferred initialization to the loaded image
2026-10-13 07:24:39 +13:00
Dean 6f47d9117f
Merge pull request #4416 from muhzain05/fix/videodec2-picture-owner
fix(videodec2): answer picture info from the decoder that last wrote the buffer
2026-10-13 07:24:18 +13:00
Dean 3ede42aace
Merge pull request #4414 from AchrafReyani/fix/agc-single-sample-scan-into-msaa-target
fix(agc): rasterize a single-sample scan into a multisampled target at the pixel center
2026-10-13 07:23:57 +13:00
Dean 83e6be8a69
Merge pull request #4394 from AaravMehta-07/codex/sce-net-stream-sender
fix(libSceNet): preserve successful stream recvfrom results
2026-10-13 07:23:13 +13:00
Dean 57f91221c4
Merge pull request #4380 from AzazelSensei/fix/libc-stream-errors
fix(libc): return stream errors from fwrite, fread and fputs instead of throwing
2026-10-13 07:22:52 +13:00
Dean b5546111b6
Merge pull request #4373 from milescoviello/fix/recvmsg-seqpacket-trunc
fix(libkernel): report MSG_TRUNC for SOCK_SEQPACKET records in recvmsg
2026-10-13 07:22:38 +13:00
Dean b701bc5d8d
Merge pull request #4372 from milescoviello/fix/fflush-read-stream
fix(libc): leave a stream that is reading untouched in fflush on Linux
2026-10-13 07:22:17 +13:00
Dean 3377986a60
Merge pull request #4371 from milescoviello/fix/net-socket-timeval-timeouts
fix(libSceNet): read setsockopt timeouts as struct timeval
2026-10-13 07:21:55 +13:00
Dean edddd6a17b
Merge pull request #4370 from milescoviello/fix/ipv6-only-sockets
fix(net): make new IPv6 sockets IPv6-only as FreeBSD does
2026-10-13 07:21:34 +13:00
Dean f30e89ee7c
Merge pull request #4365 from Gashrod1/fix/libc-strxfrm-truncation
fix(libc): truncate strxfrm like FreeBSD's C locale
2026-10-13 07:20:51 +13:00
Dean dfe9ccf6a2
Merge pull request #4360 from milescoviello/fix/wide-printf-grouping-flag
fix(libc): accept the ' flag in the wide printf family
2026-10-13 07:20:09 +13:00
Dean 15e64abd77
Merge pull request #4359 from milescoviello/fix/syslog-wide-format
fix(libc): format guest wide arguments in syslog on Linux
2026-10-13 07:19:47 +13:00
Dean 655cba83d5
Merge pull request #4358 from milescoviello/fix/scanf-binary-prefix
fix(libc): read %i without the C23 binary prefix in the scanf family on Linux
2026-10-13 07:19:26 +13:00
Dean 2c579b55f9
Merge pull request #4357 from milescoviello/fix/wide-printf-positional
fix(libc): format positional arguments in the wide printf family
2026-10-13 07:19:05 +13:00
Dean b538b28d8b
Merge pull request #4354 from milescoviello/fix/fopen-append-position
fix(libc): start append-mode streams at the end of the file
2026-10-13 07:18:50 +13:00
Dean bde332a59c
Merge pull request #4353 from milescoviello/fix/printf-errno-message
fix(libc): print the guest errno message for %m in the printf family
2026-10-13 07:18:29 +13:00
Dean 2a5eca11cd
Merge pull request #4350 from milescoviello/fix/once-reset-on-exit
fix(libkernel): reset a once control when its initializer exits or is cancelled
2026-10-13 04:53:46 +13:00
Dean a7614930a4
Merge pull request #4349 from milescoviello/fix/open-nofollow
fix(libkernel): fail open with O_NOFOLLOW on a symbolic link
2026-10-13 04:53:25 +13:00
Dean 3881117feb
Merge pull request #4348 from milescoviello/fix/rmdir-symlink
fix(libkernel): fail rmdir on a symbolic link instead of removing it
2026-10-13 04:53:02 +13:00
Dean 97445386fe
Merge pull request #4328 from pipe1os/fix/agc-packed-mip-tail-fallback
fix(agc): render into non-resident packed mip tails
2026-10-13 04:50:40 +13:00
Dean 82b1b2e7a4
Merge pull request #4445 from LeandroLP23/fix/agc-library-modules-after-prebuild
fix(agc): keep shader modules of pipeline library parts alive for background linking
2026-10-13 04:50:18 +13:00
poonasor 08824f3b90 feat(libkernel): implement sceKernelGetModuleList2 and sceKernelGetModuleInfo2
The title-module variants of sceKernelGetModuleList and
sceKernelGetModuleInfo, following shadPS4: the list leaves out system
libraries and the info call answers EPERM for one. A system library is
a loaded .prx image that is not a relinked title module.

NHL 27 (PPSA34063) imports both and fails to load without them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 11:15:26 -04:00
AlxcBTW 4309bffdb0 fix(agc): take the dword pattern-fill kernel only through a 32-bit output format
The kernel #2081 matches stores each pattern dword with
buffer_store_format_x, so what lands in memory depends on the output
descriptor's FORMAT (bits 12-18 of user[3]). Only 32_UINT, 32_SINT and
32_FLOAT (20-22) store the dword unchanged. Other formats convert it,
and an 8- or 16-bit one writes 1 or 2 bytes of every 4-byte element, so
a buffer fill would also overwrite the bytes in between. Such a dispatch
now goes to the recompiler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:09:31 +02:00