Commit Graph
91 Commits
Author SHA1 Message Date
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
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
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
Ethan Barcus a8e06fb008 Merge branch 'main' into feat/trace-bench-fields 2026-10-20 02:57:23 -05:00
Dean df6122881d Merge pull request #8067 from harry-z-kang/codex/relinker-static-mingw-tests
fix(build): allow static MinGW runtimes in relinker-only tests
2026-10-20 18:34:06 +13:00
Dean 964093ef36 Merge pull request #5710 from AMRYB/fix/web-release-pairing
fix(web): publish converter and libraries from one release
2026-10-20 17:47:07 +13:00
Dean a020d02560 Merge pull request #7718 from To3akaRin/codex/fix-syntax-check-dependency-flags
fix(tools): strip dependency options before syntax checks
2026-10-20 15:53:38 +13:00
To3akaRin c1c416fc43 docs(build): translate quick syntax checks into English 2026-10-20 09:09:09 +08:00
Kang, Harry Zixuan 995c10ec6b fix(build): allow static MinGW runtimes in relinker-only tests 2026-10-19 16:50:10 -07:00
Johan David e4898783b6 feat(agc): sample the draw committer with APS5_SAMPLE_COMMITTER
Queue 0's draw committer records the draws the packet worker hands
over. When the worker's APS5_SAMPLE_WORKER stacks wait in
DrawPipeline::Enqueue, the committer is the thread that bounds the
frame, and only APS5_SAMPLE_THREADS sees it: 40 addresses, 12 frames
deep, without whole stacks.

APS5_SAMPLE_COMMITTER=<file> attaches the worker's sampler to the
committer when its thread starts and writes the same two files. Both
use one start function, and StopWorkerSampler stops both.
2026-10-19 14:45:14 -05:00
RengundomandClaude Opus 5.5 88f8184102 fix(trace): write the benchmark file safely and off the presenter
Review of the benchmark report:

- The file is written to `<name>.tmp` and moved over the previous one, so a
  crash or kill during a rewrite keeps the last complete report.
- A dedicated writer keeps only the newest pending snapshot, so two reports
  can no longer be joined into one file when the writer falls behind.
- The report is formatted on the writer thread. The presenter hands over the
  kept intervals, which are shared and never copied, so the interval that
  closes no longer pays for formatting every earlier one.
- Hosts that are not x86 or report no CPU brand string leave the host fields
  out instead of failing every summary line.
- A `contentVersion` that is not a string, or does not fit, is left empty
  instead of failing the title's metadata.
- Tests cover the 240-interval rotation and `intervals_dropped`, the
  newest-only writer, the pending write on stop and the atomic replace.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 06:21:04 -05:00
hugodearaujo bec9850112 feat(agc): record GPU checkpoints through VK_AMD_buffer_marker 2026-10-19 08:15:43 -03:00
Adrià 13b4f66e12 Merge pull request #6665 from Dellz36/docs/windows-build-setup
docs(build): document Windows Python and Git Bash setup
2026-10-19 09:46:45 +02:00
eth-j17andClaude Opus 5.5 ca4303a155 feat(trace): record host, title and per-frame benchmark data
The summary line names the CPU, its thread count, physical memory and,
with param.json, the title ID, name and content version.

APS5_TRACE_BENCH=1 with APS5_TRACE_SUMMARY_EVERY rewrites
aps5-bench-<commit>-<pid>.json.gz at each interval with the time between
every two presents, so reports can be recomputed and checked from raw
frame times. param.json's contentVersion is read when present.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 01:01:13 -05:00
To3akaRin 7e8aa10ae6 fix(tools): strip dependency options before syntax checks 2026-10-19 10:43:00 +08:00
Amr Yasser e10616b17b fix(web): publish converter and libraries from one release 2026-10-18 23:26:42 +03:00
AlxcBTW 33fea9e1ba Merge main into pr/profile-windows 2026-10-18 19:49:54 +02:00
Adrià 84b7ef9de3 Merge pull request #6181 from MarcZX10/codex/document-guest-clock-scale-6172
docs(dev): describe the guest clock scale switch
2026-10-18 18:58:07 +02:00
AlxcBTW 0d699295a9 docs(agc): say which profile lines count per window and which since start 2026-10-18 12:36:32 +02:00
milescovielloandClaude Opus 5.5 f7cd8df309 fix(agc): trace the title threads that register shaders
Shader registration and the shader ABI resolves run on the title's own
threads, which never bound a trace buffer, so their Shader.Register and
Shader.Resolve* scopes were missing from every trace and summary. Those
entry points now bind the calling thread as `title` with the 32,768-event
buffer the shader preparation threads use.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 21:33:53 +00:00
MarcZX100 a2ed4abead docs(dev): clarify guest clock scale coverage 2026-10-17 17:50:36 +00:00
MarcZX100 c732321bd3 docs(dev): describe the guest clock scale switch 2026-10-17 17:50:36 +00:00
javierUDP 02c7da7677 fix: keep the Python tools and tests on Python 3.9
`Path.write_text(newline=...)` and `zip(strict=True)` were added in
Python 3.10. macOS ships 3.9.6 as /usr/bin/python3, the interpreter CMake
finds when no newer one is installed, so `prepare_release_notes` raised
TypeError when the release workflow wrote its notes and the
`pr_overlap_tools`, `release_package` and `linux_fixed_base` tests failed
on a stock macOS host. Writing the encoded text keeps the newline
translation off on every host, and the dynamic tag counts are compared
before the pairs are walked.
2026-10-17 10:31:10 -03:00
Dean 5bd85a44c2 Merge pull request #6876 from parl0v/docs/gputime-line
docs(build): describe the [gputime] line and its command classes
2026-10-17 16:47:31 +13:00
Adrià 7d728b1098 Merge pull request #6041 from wachi35676/docs/build-wasm-flag
docs(build): list the ANYPS5_BUILD_WASM flag
2026-10-16 23:17:04 +02:00
Adrià 4986aca62e Merge pull request #6002 from CrimsonMac/docs/bitdefender-raise-exception-deadlock
docs(build): note Bitdefender Advanced Threat Defense hanging guest_raise_exception
2026-10-16 22:48:06 +02:00
Adrià 7600f3dd18 Merge pull request #5903 from jotitadev/docs/build-relinker-macos-output
docs(build): list Mach-O among relinker-only outputs
2026-10-16 20:37:43 +02:00
Josip Parlov d67d37bde8 docs(build): describe the [gputime] line and its command classes 2026-10-16 17:32:43 +02:00
Dellz36 5338ff0631 docs(build): document Windows Python and Git Bash setup 2026-10-15 23:16:33 -04:00
Crimson b0c283daa8 docs(build): note Bitdefender Advanced Threat Defense hanging guest_raise_exception 2026-10-15 16:32:09 +03:00
Adrià FranchandClaude e0b9572e3b ci(windows): find the CA bundle of Git for Windows under ucrt64 too
Git for Windows 2.56 (runner image 20261002) moved from mingw64 to ucrt64,
so the fixed SSL_CERT_FILE path no longer exists and the WinLibs CMake
fails the FFmpeg download with status 60 on every Windows build. Take the
bundle from whichever of ucrt64 and mingw64 exists.

Co-Authored-By: Claude <[email protected]>
2026-10-15 15:20:44 +02: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
Muhammad Wasif Ali WasifandClaude Opus 5.5 895061ca62 docs(build): list the ANYPS5_BUILD_WASM flag
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 01:22:39 +05:00
Adrià 61cec42439 Merge pull request #5032 from kq62/docs-winlibs-link
docs(build): link the supported WinLibs release
2026-10-14 19:54:36 +02:00
Eli Yarson a53332472c feat(agc): report which trace threads dropped events and where their buffers filled
The trace summary line keeps `trace_dropped` as before: true when any
thread lost a slice, any thread's totals table was full, or the gpu
track was full. When it is true, the line now also carries
`trace_dropped_threads`, one entry per affected thread name, so the reader
can tell which thread lost data and how much. Threads that share a
name, such as the shader prepare threads, share one entry: losses are
summed, the earliest fill is kept and totals_full is true if any is.

Each entry has `events_full_after_s`, the seconds from the first
present of the window to the start of the first lost slice. It is
absent for `gpu` and in every summary line (windowed frames/seconds
and APS5_TRACE_SUMMARY_EVERY) whenever the first lost slice starts
outside the line's span of presents, including a slice whose scope
began before the window opened or one lost after the last present.
`events_lost` is the number of slices not recorded and is absent when
0; in interval lines it counts the buffer's losses since it started.
`totals_full` is true when the thread's totals table overflowed, which
makes the summary numbers incomplete; a thread with only `events_lost`
has complete totals.

The Chrome trace gets a `trace buffer full` instant event on a thread
at the point where its buffer filled.

BUILD.md documents the new fields and the event.

`trace_dropped` is unchanged, and when nothing drops the default output
is byte-identical to before.

Refs #5786
Depends on #5808
2026-10-14 18:54:44 +02:00
Jota 4cb3271fb2 docs(build): list Mach-O among relinker-only outputs 2026-10-14 12:10:46 -03:00
Adrià 69e7138acc Merge pull request #5808 from Ondra97/codex/feat-configurable-trace-capacity
feat(agc): configure trace event buffers
2026-10-14 16:10:27 +02:00
Adrià beb7e94048 Merge pull request #5453 from overlordxrz-source/feat/agc-device-fault
feat(agc): report device losses with VK_EXT_device_fault and dispatch checkpoints
2026-10-14 14:58:14 +02:00
Adrià e9a985db1a Merge pull request #4969 from fdfawef324/feat/agc-pm4-capture-replay
feat(agc): capture submissions and replay their decode and wait releases offline
2026-10-14 13:59:22 +02:00
Ondra97 1effd67b70 feat(agc): configure trace event buffers 2026-10-14 13:53:57 +02:00
1402c6c1d8 feat(agc): report device losses with VK_EXT_device_fault and dispatch checkpoints
A device that supports VK_EXT_device_fault reports, on the first
VK_ERROR_DEVICE_LOST a check sees, the fault description, the faulting
addresses (invalid reads and writes, or the instruction pointers of waves
still running when the device hung) and the vendor fault codes.
APS5_GPU_CHECKPOINTS=1 records a VK_NV_device_diagnostic_checkpoints
marker with the program address before each guest dispatch and prints the
last markers the GPU reached, which names the dispatch that hung. Without
either extension nothing changes.

Test: agc_device_fault drives the report through mock
vkGetDeviceFaultInfoEXT and vkGetQueueCheckpointDataNV entry points.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: overlordxrz-source <[email protected]>
2026-10-14 13:50:52 +02:00
Adrià 2a99157640 Merge pull request #4812 from AlxcBTW/feat/trace-summary-interval
feat(agc): add APS5_TRACE_SUMMARY_EVERY for summary lines of a long session
2026-10-14 12:24:56 +02:00
alfalfa-starandClaude Opus 5.5 040873f9dc feat(videoout): use native Wayland on Linux
Build SDL's Wayland backend next to X11 and ask SDL for "wayland,x11"
on Linux, so the window runs natively under a Wayland compositor instead
of through XWayland. SDL loads libwayland, xkbcommon and libdecor at run
time, so systems without them, or sessions without WAYLAND_DISPLAY, keep
using X11. SDL_VIDEODRIVER still overrides the choice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 07:24:34 +02:00
fdfawef324andClaude Opus 5.5 0286a767e2 feat(agc): capture submissions and replay their decode and wait releases offline
A hang with threads in Driver::waitMemory takes a ten-minute boot to
reproduce, and the existing switches show only the first submissions of
one queue (APS5_DUMP_QUEUE) or a rejected one (APS5_DUMP_REJECTED).

Capture. APS5_DUMP_SUBMITS=<dir> writes every submission the driver
accepts. <dir>/index.txt starts with "aps5-submissions 1" and "ordinal
queue type serial time_us dwords kind file held conditional", then one
line per submission: acceptance ordinal, queue id, graphics or compute,
serial, microseconds on the APS5_TRACE_GPU clock, dword count, kind,
file name, the dword offsets of the waits held at submit
(Submission::heldAtSubmit) and the COND_EXEC and predicated indirect
buffer ranges (Submission::conditionalEnds) as start:end, "-" for none.
<dir>/submission_<ordinal>.bin holds the copied dwords, indirect
buffers inlined. REWIND tails are listed as rewind with the serial of
their submission, suspend points as suspend without a file.
SubmissionCapture::Prepare copies the commands before the driver lock;
Take, under it after reserveOutputs, sets only the ordinal, time and
held waits and does not allocate; the file and then its index line are
written after the lock. A failed write reports the failure to the driver
(Driver::ReportFailure) and throws, so every later driver call throws
too. Unset, Submit tests a static pointer. An index written before the
held and conditional columns ("ordinal queue type serial time_us dwords
kind file") is read with both unknown.

Analysis. agc_pm4_replay <dir> [--full] decodes each submission and
throws on a packet the driver rejects (a corrupt capture). It does not
model cross-queue timing: a wait is released only when the capture
alone proves that the driver releases it (WaitMemory.cpp,
LabelHistory.cpp), and unknown, with the reason, when its outcome
depends on when another queue's stores run. A memory wait is released
when its compare always passes, when it was held at submit, when the
last store to the awaited bytes before it on its queue covers them with
an accepted value, is not conditional and no other queue stores to
those bytes anywhere in the capture, or when a RELEASE_MEM or
WRITE_DATA label earlier in the waiting submission that the label
history keeps (KeepsLabelStore, not conditional) stores an accepted
value and fewer than LabelStoreHistory other stores to the awaited
bytes can run between it and the wait: those between them on the
waiting queue and every store of another queue to those bytes, since
the history keeps the last stores per dword over all queues and finds
only a store that ran after the waiting submission entered the driver.
A REWIND is released when its tail is in the capture; one valid at
submit without a captured tail is unknown, because the driver reads the
valid bit again when the queue reaches it. A wait is unreleased when it was not held at submit and no
store that can run before it may write an accepted value (a store of
part of the awaited bytes or of a run-time value may; a store later on
its queue runs after it): the GPU does not release it, a CPU or shader
store could. A REWIND without a tail that was not valid at submit is unreleased. Every other wait is
unknown: "depends on cross-queue timing (stores on queue X at #...)"
when another queue stores to the awaited bytes, otherwise because the
last store before it on its queue is conditional, stores a run-time
value or part of the bytes, or overwrites an accepted store the capture
does not prove still in the label history. Without the held column a
wait that would be unreleased is unknown; without the conditional
column every packet after a COND_EXEC or predicated INDIRECT_BUFFER is
conditional to the end of its submission. The outcomes depend on the
order of each queue's stores and on which stores other queues make, not
on the submit order across queues. The report counts the outcomes,
routes and cross-queue unknowns, says when the index lacks the columns,
lists up to 32 unreleased and then unknown waits newest first with the
packets around them and their stores, then the last submissions of
each queue; exit code 1 when a wait is unreleased, 2 on errors.

Pm4 gains DecodeStores, DecodeWait, DecodeConditionalWrite,
DecodeConstantRamDump, the COPY_DATA and DMA_DATA field helpers, the
sample dump layout and RewindValid; Execute, ResolveStore, Validate,
DecodeMemoryCopy, the driver's sample dump, noteHeldAtSubmit and
executeRewindTail use them. LabelStoreHistory and KeepsLabelStore move
to LabelStores.hpp, used by noteLabelStore and the analysis.

Test. agc_driver_pm4_replay submits command buffers built with the
libSceAgc builders through the driver with the switch set and checks the
index, the held waits, the COND_EXEC range, the dwords, the decode and
the outcome of eight waits, including WRITE_DATA 1, WRITE_DATA 0,
WAIT == 1 in one submission, which the driver releases through its
label history. Hand-made captures check each release route, a store of
another queue to the awaited bytes that entered before or after
(unknown), the label history limit with later stores on the waiting
queue or on another queue, a fill the history does not keep, a store
in an earlier submission overwritten later, later stores, rejected
values and a missing rewind tail (unreleased), the six captures of the
reviews (none released but the wait held at submit), five groups of
waits in eight submission orders with identical outcomes, an index
without the held and conditional columns and corrupt captures. A
directory in place of the next submission file makes the write fail,
and the submit, the next submit and shutdown throw.
agc_driver_pm4_replay_tool runs the tool through
tests/Pm4ReplayTool.cmake and checks exit codes 1 and 2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 22:40:11 -04:00
sussy 08bd00c8cf docs(build): link the supported WinLibs release 2026-10-13 12:00:24 +03:00
AlxcBTWandClaude Opus 5.5 52c71b837c feat(agc): add APS5_TRACE_SUMMARY_EVERY for summary lines of a long session
APS5_TRACE_SUMMARY_EVERY=<seconds> appends one line to aps5-summary.jsonl
every <seconds> seconds, at a present, from the per-scope totals the trace
threads already keep. No event buffer is allocated unless a window switch is
set as well; then the window records its full trace on top of the intervals
and its own summary line holds only the time inside the window. Each line has
the fields of the window summary line for its interval plus interval_start_s
and interval_end_s.

tools/trace_digest.py prints a summary file with interval lines as one row
per interval with a text sparkline of the frame p99 and the GPU busy time.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 00:40:52 +02:00
Adrià 6d2f279863 Merge pull request #4607 from yunusshaikh7/feat/tracy-profiler
feat(agc): report performance timer scopes to Tracy with APS5_ENABLE_TRACY
2026-10-12 23:09:21 +02:00
Adrià 84659e16d0 Merge pull request #4632 from AlxcBTW/feat/trace-gpu-track
feat(agc): add the GPU, GPU mutex waits and shader preparation to the trace
2026-10-12 22:39:23 +02:00
Adrià 44ab0c39ee Merge pull request #3886 from PrintOrb/fix/videoout-high-frame-rate
fix(videoout): support permitted high-frame-rate output for Quake II
2026-10-12 22:23:31 +02:00