Commit Graph
139 Commits
Author SHA1 Message Date
Adrià b38cb56dd2 Merge pull request #12300 from dantdmdarealguy/docs/build-table-cpu-lead-execution-tests
docs(build): list ANYPS5_REQUIRE_CPU_LEAD_TEST and ANYPS5_AGC_EXECUTION_TESTS
2026-10-28 14:56:24 +01:00
Adrià 4ee7e4c95f Merge pull request #12268 from dantdmdarealguy/docs/build-agc-create-log-no-effect
docs(build): say APS5_AGC_CREATE_LOG has no effect
2026-10-28 14:48:11 +01:00
Adrià eb6127c5d9 Merge pull request #12087 from MarcZX10/docs/build-trace-and-capture-limits
docs: correct the trace buffer sizes and capture details in the build guide
2026-10-28 14:47:11 +01:00
Adrià cc672fdfc6 Merge pull request #11366 from guglia001/test/relinker-conversion-fuzzer
test(relinker): add a libFuzzer target for the whole conversion
2026-10-28 09:56:49 +01:00
dantdmdarealguy f0cf07265c docs(build): list ANYPS5_REQUIRE_CPU_LEAD_TEST and ANYPS5_AGC_EXECUTION_TESTS
The CMake flag table left out the ANYPS5_REQUIRE_CPU_LEAD_TEST option and
the ANYPS5_AGC_EXECUTION_TESTS cache list that the Windows, MSYS2 and
sanitizer workflows set. Add a row for each and drop the stray comma
after "the reason" in the sanitizer workflow paragraph.
2026-10-28 03:23:50 -05:00
JJenkx b971004857 feat(agc): inspect captured compute pipeline statistics 2026-10-28 08:27:11 +01:00
dantdmdarealguy e26d34d624 docs(build): say APS5_AGC_CREATE_LOG has no effect
The option's only use, the success log in sceAgcCreateShader, has been commented out since 3da76b9b33, so OFF changes nothing and ON logs nothing.
2026-10-28 00:51:32 -05:00
MarcZX10 846c386cd8 docs: give the zero padding of the submission dump file names
SubmissionCapture formats the file name with %06llu, as the PM4 replay
tests expect (submission_000006.bin).
2026-10-27 20:05:07 +00:00
MarcZX10 cb7a97d4d4 docs: say how compute pipeline capture reacts to its limits
The directory limits (128 records, 256 MiB) throw CaptureLimit, which
WriteOptional catches: capture disables itself with one stderr line and
the pipeline is still created. Only the per-record 36 MiB limit throws
out of the capture, so the old sentence described both as an error.
2026-10-27 20:05:07 +00:00
MarcZX10 e7ab802c95 docs: correct the trace event buffer sizes in the build guide
TraceThread::Slice holds five eight-byte members (scope, stage, begin,
length and the recorder batch), so an event takes 40 bytes, not 32.
The example sizes follow: 10 MiB at the default 262,144 events, 120 MiB
at 3,145,728 and 160 MiB at the 4,194,304 maximum.
2026-10-27 20:05:07 +00:00
Dean bbb11b6974 Merge pull request #11062 from MarcZX10/marc/ci-nightly-sanitizers
ci: run every test under ASan and UBSan nightly
2026-10-28 05:58:34 +13:00
Adrià 961bfd88e9 Merge pull request #11420 from SHOnnay/docs/windows-path-length
docs: note the Windows path length limit on build files
2026-10-27 11:59:51 +01:00
guglia001 1bdb8388ed test(relinker): add a libFuzzer target for the whole conversion
ANYPS5_BUILD_FUZZERS builds relinker_conversion_fuzzer with AddressSanitizer
and UndefinedBehaviorSanitizer in relinker-only Clang builds on Linux. The
first input byte selects the target system, --to-intel and the unused-filter
level; the rest is the executable passed to Conversion::Convert, the path the
web converter takes. tools/relinker_fuzz_seeds.py writes the relinker test
fixtures as seeds, and CTest runs a short smoke run.
2026-10-27 10:12:35 +01:00
Dean e07c21ce68 Merge pull request #11157 from janzezno/feat/agc-frame-capture-linux
feat(agc): capture and replay frames on Linux
2026-10-27 21:20:55 +13:00
MarcZX10 85a62536c1 ci: drop the trailing colon from the sanitizer run's ASAN_OPTIONS
The workflow and BUILD.md said ASAN_OPTIONS must end with ':' because tests append their own options with string_append. That is wrong: add_asan_test_options appends ':<options>', so ASAN_OPTIONS=detect_leaks=0 already gives detect_leaks=0:detect_stack_use_after_return=0 for the fiber test. Use detect_leaks=0 and remove the claim.
2026-10-27 06:35:12 +00:00
MarcZX10 c1fa1e58d3 docs(dev): describe the nightly sanitizer workflow
Document in BUILD.md, next to -DANYPS5_ENABLE_ASAN, what the Sanitizers workflow builds and runs, where the known failures are listed and what the job summary reports, and how to repeat a run locally: end ASAN_OPTIONS with ':' because tests append their own options, and set UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 so undefined behavior fails the test.
2026-10-27 06:35:01 +00:00
Dean 07a9a43cfe Merge pull request #11059 from MarcZX10/marc/fix-libc-fp-contract
fix(libc): build libc without floating-point contraction
2026-10-27 18:30:44 +13:00
Dean c3fc606849 Merge pull request #11179 from MarcZX10/marc/build-tsan-option
build: add an ANYPS5_ENABLE_TSAN option for ThreadSanitizer builds
2026-10-27 10:39:03 +13:00
Dean 184c6f96fc Merge pull request #11153 from plexerPK/codex/vulkan-validation-gate
feat(tools): compare repeated Vulkan validation runs
2026-10-27 10:37:50 +13:00
janzezno c867473002 feat(agc): capture and replay frames on Linux 2026-10-26 16:11:45 +01:00
SAKIBUL HUDA ONNAY 1fd8cb28ce docs: note the Windows path length limit on build files 2026-10-26 18:21:30 +06:00
LeandroLP23andClaude Opus 5.5 a69872e516 fix(agc): hand a recorded submission to the driver before the recorder takes its next call
The recorder released its lock between recording a submission, flip or
suspend point and the driver accepting it. Another thread's delta could
then wait for the accepted work, read its blocks, and record itself
after a call whose work the driver had not accepted yet, so the replay
submitted that work before applying stale bytes over its result. The
entry points now pass the driver call to the recorder, which runs it
under the same lock right after recording the call.

agc_driver_frame_replay_concurrent submits copies from a second thread
during the capture and checks that every memory delta was read after
the submissions recorded before it had completed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 23:20:21 +01:00
LeandroLP23andClaude Opus 5.5 ada20294a6 fix(agc): read a frame capture's memory delta once the accepted submissions completed
A delta read its blocks with ReadCommittedUnsynced while GPU work
accepted before the call could still write them, so a capture could
hold a block from before a DMA copy that the replay then wrote back over
the copy's result. A delta with blocks to read now waits up to 10 s for
the accepted submissions and records the serials after the wait; the
capture stops with a warning when the work does not finish. The Windows
quarantine of agc_driver_frame_replay is removed.

Fixes #10711

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 22:36:36 +01:00
MarcZX10 52e0132a34 docs(build): name LLVM among the suppressed ThreadSanitizer libraries 2026-10-25 20:38:12 +00:00
MarcZX10 f8ef2caa34 docs(build): describe the ThreadSanitizer suppressions and guest memory reports 2026-10-25 20:38:12 +00:00
MarcZX10 378c58ea77 docs(build): document the ANYPS5_ENABLE_TSAN flag 2026-10-25 20:38:12 +00:00
plexerPK 34368b9e54 feat(tools): gate repeated Vulkan validation comparisons 2026-10-25 20:41:19 +01:00
Adrià 1a7a3dfd4f Merge pull request #9572 from JJenkx/windows/symbolize-sampler-stacks
feat(tools): symbolize the Windows samplers' stacks
2026-10-25 20:18:58 +01:00
MarcZX10 6c1ac043c2 docs(build): note that libc is built without floating-point contraction 2026-10-25 16:07:20 +00:00
Adrià bd0389635d Merge pull request #9471 from EnriqueDev2002/docs/macos-relinker-prerequisites
docs(build): add macOS relinker prerequisites
2026-10-25 16:16:28 +01:00
Dean 74986c28bd Merge pull request #10559 from xTRACKGOD/fix/trace-digest-interval-identity
fix(tools): detect host and title changes in interval digests
2026-10-25 19:15:31 +13:00
xTRACKGOD 8ee49632b0 fix(tools): detect host and title changes in interval digests 2026-10-24 15:17:58 +05:30
Adrià 5d3ab7791d Merge pull request #9016 from dantdmdarealguy/docs/build-python-launcher-windows
docs(build): run the Python tools with python or py -3 on Windows
2026-10-24 11:35:41 +02:00
Adrià 7be57380e3 Merge pull request #8619 from mantavisual/docs/build-antivirus-relinker-test-temp
docs(build): point the antivirus note at the relinker tests' test-temp
2026-10-24 11:31:10 +02:00
Adrià fe204e1a8d Merge pull request #8568 from mantavisual/docs/build-windows-script-policy
docs(build): note the Group Policy script block on libusb's version step
2026-10-24 11:26:29 +02:00
SamandClaude Opus 5.5 a70e108a03 fix(agc): capture memory committed during the frames and count flips per thread
The recorder took its ranges once, at the snapshot, so a title that
committed memory during the captured frames replayed submissions from
memory the capture never had. Each memory delta now adds the allocations
the registry gained since the last one as new ranges with their nonzero
64 KiB blocks, and the header counts them as late_ranges.

A submission ended a captured frame when the driver's flip count changed
while it was being submitted, and the count was global, so a submission
that overlapped another thread's flipping one ended the frame as well.
The count is now kept per thread.

agc_driver_frame_replay copies its second frame from a block committed
during the capture, and agc_driver_frame_capture_eop checks that a flip
submitted on another thread leaves this thread's count unchanged; both
fail without the fix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
SamandClaude Opus 5.5 268525d612 fix(agc): keep replayed memory, tokens and outputs faithful to the capture
- Order memory deltas and video output registration before the next
  recorded call, and serialize the deadlock breaker with delta application
- Capture the blocks holding shader code with each shader delta
- Reserve explicit and automatic EOP flip tokens under one lock
- Record video output unregistration so replay can close and reopen a handle
- Clear already mapped ranges before restoring the snapshot so elided zero
  blocks replay as zero

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
SamandClaude Opus 5.5 dbe034fdf8 fix(agc): end a captured frame once per EOP flip
An EOP flip reservation also ended a frame, and so did the submission
whose EOP release carries the reserved token, so a title flipping with
EOP releases counted each displayed frame twice: a capture of N frames
stopped after about N/2 and could start between the reservation and
the submission that flips. The reservation is now only recorded; a
frame ends at a CPU flip or at a submission that flips.

agc_driver_frame_capture_eop reserves and submits six EOP flips with
APS5_FRAME_CAPTURE_FRAMES=3 and checks that the capture starts after
the first flipping submission and holds three frames of one reservation
and one submission each.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
SamandClaude Opus 5.5 95d2a76583 feat(agc): capture frames at the driver boundary and replay them offline
APS5_FRAME_CAPTURE=<dir> makes the AGC driver record a few frames of a
title: the shader registrations and ABI resolutions, video output and
EOP flip reservations it made since it started, a snapshot of every
readable guest allocation (the title image included) taken at a frame
boundary once the driver is idle, and for the next frames each
submission, flip and suspend point with the thread that made it, its
serial progress and the guest pages the write tracker saw the CPU write
before it. At the end it stores the presented display buffers as
reference images. APS5_FRAME_CAPTURE_AT_FLIP, _TRIGGER and _FRAMES pick
the frames.

agc_frame_replay maps the captured memory at its addresses and replays
the calls of each captured thread on a thread of its own, in captured
order, through the current build of the driver with no title running.
It paces GPU work to the in-flight depth the title had, releases GPU
waits that the title's CPU threads released without calling the driver
(AgcDriverAwaitedWaits), and reports frame times, released waits and
how closely the replayed display buffers match the references.

Tests: agc_frame_capture (file format) and agc_driver_frame_replay
(two captured frames of CPU writes and DMA copies replayed and
compared). Docs: BUILD.md, ENVIRONMENT.md and the libSceAgcDriver debt
file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:09:44 +02:00
Sam 61711fe10f Merge remote-tracking branch 'origin/main' into fix/agc-capture-skip-float-probe
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
2026-10-23 20:24:13 +02:00
mantavisualandClaude Opus 5.5 6da3fa85e3 docs(build): point the antivirus note at the relinker tests' test-temp
The note told Windows users to set TEMP and TMP to a directory the scanner
excludes, but since 39dd854c8 CTest sets TMPDIR, TEMP and TMP of the
relinker tests to core/relinker/test-temp in the build directory, so those
variables no longer move the executables. Name that directory instead and
add windows_bss and windows_fixed_base, which fail the same way when the
scanner blocks the executables they run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 16:50:48 +03:00
Dean 72fe76ff89 Merge pull request #7920 from hugodearaujo/feat/agc-amd-buffer-marker-checkpoints
feat(agc): record GPU checkpoints through VK_AMD_buffer_marker
2026-10-23 21:20:57 +13:00
JJenkxandClaude Opus 5.5 cdc21a9897 fix(tools): bound symbol lookups to their section, keep inclusive counts and refuse unrecorded modules
Review of #9572 found three gaps:

- PeModule.name() checked that an RVA was in some code section, then
  bisected one list of every symbol, so an address in a later code
  section before that section's first symbol took the last symbol of an
  earlier section. Each code section now keeps its own sorted list.
- Address files keep both counters ('module offset self inclusive'):
  the inclusive count is kept and subtracted by --since, and the summary
  lists functions by inclusive samples as well, summed over each
  function's addresses (an upper bound when a function is on one stack
  more than once). The total comes from the '# N samples' line or from
  the 'thread <id> samples <n>' headings of APS5_SAMPLE_THREADS, which
  the loader previously misread as a stack line; --thread keeps one
  thread.
- The address writers of both samplers wrote no '# module' records, so
  those files skipped the size and timestamp check. Both now write them
  (through the helper the collapsed-stack writer uses), and the tool
  leaves a module unsymbolized when the samples have no record for it,
  unless --unverified is given.

Five new cases cover a second code section, inclusive totals, --since
on an address file, thread headings with --thread, and the missing
record with and without --unverified.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 01:49:21 -04:00
JJenkxandClaude Opus 5.5 59693ae54c feat(tools): symbolize the Windows samplers' stacks
The Windows samplers (APS5_SAMPLE_WORKER, APS5_SAMPLE_COMMITTER and
APS5_SAMPLE_THREADS) write every frame as module+0xRVA, and BUILD.md left
naming them to the reader ("for example with nm on the .prx"). Doing that
by hand means finding each module's image base, choosing between COFF
symbols and the export table, and keeping the files cumulative totals in
mind.

tools/symbolize_samples.py reads a collapsed-stack file or the address
file, opens each module it finds in --libs as a PE32+ image, and names
every frame module!function:

- From the COFF symbol table that the MinGW-built .prx and .dll keep:
  external and static symbols in code sections, at the section's RVA
  plus the symbol value. Addresses outside a code section, or before the
  first symbol, stay module+0xRVA.
- From the export table, prefixed with "~", for a module without
  symbols, such as the runtime DLLs.
- A module whose SizeOfImage or TimeDateStamp differs from the sampler's
  "# module" line is left unsymbolized, with a warning: its addresses
  would name the wrong functions.

--since subtracts an earlier copy of the same file, which keeps only the
samples taken between the two copies (the files hold totals since
start-up). --out writes the named stacks for speedscope or flamegraph.pl.
--demangle uses c++filt when it is on PATH. It needs no binutils
otherwise.

test_symbolize_samples (registered with CTest) builds small PE32+ images
with COFF symbols and with an export table, and covers short, string-table
and static names, the ignored section and data symbols, addresses outside
code, the export fallback, the size and timestamp check, --since with
--out, the address-file format and rejected lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 01:49:21 -04:00
Enrique VandClaude Fable 5.1 c5dd9c1dd6 docs(build): add macOS relinker prerequisites
Name the commands that provide the compiler, CMake and Ninja on macOS
next to the existing mention of AppleClang in the relinker-only section.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-22 05:46:48 -06:00
zaryabzip a542a13f00 feat(libSceVorbisDec): decode Ogg Vorbis with libvorbisfile 1.3.7
Add libogg 1.3.6 and libvorbis 1.3.7 as submodules, built from source as
hidden static libraries, and implement the 31 libvorbisfile exports on top
of them. Decoder state lives in a host table keyed by the guest
OggVorbis_File, guest callbacks are trampolined, and vorbis_info is
returned in its LP64 layout.
2026-10-22 09:51:31 +05:00
Kang, Harry Zixuan 726edc503b feat(windows): support MSYS2 GCC runtime builds 2026-10-21 20:29:55 -07:00
dantdmdarealguy 38f8c806b7 docs(build): run the Python tools with python or py -3 on Windows 2026-10-21 09:28:38 -05:00
Sam 0560c1f095 Merge remote-tracking branch 'origin/main' into fix/agc-capture-skip-float-probe 2026-10-21 09:43:30 +02:00
Dean 3b5a24c0d6 Merge pull request #8075 from johandavidcm/feat/agc-sample-committer
feat(agc): sample the draw committer with APS5_SAMPLE_COMMITTER
2026-10-21 14:12:36 +13:00