Skip to content

perf(agc): keep constant RAM dumps and unregistered labels on the GPU without draining - #9898

Merged
oneandonlydean merged 20 commits into
boykopovar:mainfrom
savvaniss:perf/agc-stores-without-drains
Nov 3, 2026
Merged

oneandonlydean merged 20 commits into
boykopovar:mainfrom
savvaniss:perf/agc-stores-without-drains

Conversation

@savvaniss

@savvaniss savvaniss commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What

Get-fix#10, #11 and #21, moved upstream as one pull request: each removes a wait the queue worker or the committer made for a store the GPU was about to make. None is PS4-only, so it goes straight on main. Each is its own commit, in this order: c8e2a98755, df808a4807, f137c98218. After review and CI, main is merged in (last b7488e1ff5, in 3cd01b28ab) and the fixes follow, described under Follow-ups below.

1. Captures read recorded store bytes instead of waiting for the GPU (Get-fix#10)

A PS4 title that uses the constant engine builds its descriptor tables in constant RAM and dumps them to memory with DUMP_CONST_RAM before each draw. While GPU work is open, preparePacketMemory resolves such a store (Pm4::ResolveStore, up to 64 KiB, also COPY_DATA and DMA_DATA) and VulkanDevice::WriteLabelOnGpu records it into the batch as a vkCmdUpdateBuffer into the host import. The range is then a pending write. The next draw's resource capture reads the dumped table through the flush hook, which submits the batch and waits for the GPU, although the driver already holds the bytes it stored.

This commit lets a capture read those bytes instead of waiting:

  • The recorder's label table kept values only for stores up to LabelTableBytes (64). Wider stores were ranges only (wideLabels). They now keep their bytes and a record sequence too. markOverwritten flags them like table entries when later GPU work writes over them, and they leave with their batch as before.
  • Recorder::LookupStoredBytes composes a dword-aligned range from the newest recorded store of each dword. A table entry wins over wide stores, since a wide store erases the table entries it covers when it is noted. The lookup refuses a dword with no store, one a later GPU write covers, a label behind a completion action, any range under a queued label and, since 7aa3c8f63d, any store of a batch whose submit has started (see Follow-ups).
  • Driver::classifyPendingWrite answers KnownValue with those bytes when the caller passes a buffer for them. Callers that do are the capture's word reads (ShaderMemory), captureStable and validateCaptured. Callers that pass none, and every other pending write, sync as before. The store lands after everything recorded before it and before everything recorded after it, so its bytes are what the next draw reads on the GPU. An earlier CPU store to the range is overwritten by it there as well.
  • APS5_NO_STORED_KNOWN_VALUES=1 turns the path off. With APS5_VERIFY_KNOWN_VALUES=1 each served word is also read through the hook and compared. The [capture] profile line now reports those counts; before this they only reached the [copy] line, which a title without copy kernels never prints.

Nothing depends on the title: any resolved store, label or constant RAM dump that a capture reads is served the same way.

2. Labels in unregistered host memory are stored on the GPU (Get-fix#11, with its follow-up fix folded in)

A label or store into memory no host import covers (WriteLabelOnGpu reason 3) makes the recording thread wait for all recorded work (WaitIdle) and then write it with the CPU. c9ab6a7 chose that over a store at batch reap because a later label stored on the GPU could become visible first (#1458).

VideoOut's buffer labels hit that path on every PS4 flip. PatchFlip in libSceGnmDriver writes 1 to VideoOutBufferLabelAddress(handle) + index * 8 with WRITE_DATA before the flip packet. That address is bufferLabels inside VideoOut's host-side config object, and no guest allocation covers it. So once per frame the draw committer ran commitLabel, found no import and waited for the device under the GPU mutex. The queue worker then waited for the committer at the next DUMP_CONST_RAM. This is the ~69 ms per frame that #10's numbers showed as Driver.Packet.device_lock: that timer mark covers the draw pipeline drain.

This commit stores such labels on the GPU instead:

  • Graphics::UnregisteredHostImport imports the pages holding the label's bytes, rounded to the device's import alignment. It does so only when no guest allocation range overlaps them and, on Windows, every page is committed MEM_PRIVATE memory with exactly PAGE_READWRITE protection in a single allocation.
  • WriteLabelOnGpu uses that import when HostImportFor finds none. It records the store into the open batch as for any imported label, and Recorder::Keeps the import with that batch so the buffer outlives the store.
  • The GPU stores the label in stream order after the work before it, as the console's CP does. A later label cannot become visible first, and nothing waits.
  • Memory that fails the checks (image or mapped sections, read-only, guard or no-access pages, ranges spanning allocations, partly registered pages) or whose import fails still returns reason 3 and waits as today. Since c14d8edb47 Linux checks the pages too (one private anonymous read-write mapping in /proc/self/maps), and since cd2e19f6f9 the import is made only while no copied writer is listed and no completion store is pending.
  • The libSceAgcDriver debt entry for unimported labels now names what still waits.

Nothing depends on the title: any RELEASE_MEM, WRITE_DATA, DMA_DATA, COPY_DATA or DUMP_CONST_RAM target in host memory outside the guest registry takes this path (VideoOut's buffer labels, a label on a native thread stack).

The commit also carries the follow-up 75bc9a49b7 from Get-fix#11, which fixes a driver test the import broke. A DMA_DATA copy over 64 KiB into host memory that no import covers waits for the batches that write its source (Recorder::SyncThrough) and copies on the CPU, unless something can still store over its destination; then it drains the device. Before the first commit, a label into such memory was written by the CPU after a drain, so nothing was pending there. Now that label is a GPU store in the open batch, and agc_driver's copy behind a label into its destination drained.

  • The copy now waits for the batches that store into its destination, as it already did for its source, and then checks again.
  • Only what still stores there after that wait drains as before: a storage image's write-back, a unit shadow, or a label another queue has not recorded yet.

3. DUMP_CONST_RAM is queued behind pipelined draws (Get-fix#21)

A DUMP_CONST_RAM (PM4 0x83) on the graphics queue drained the draw pipeline. keepsDrawPipeline does not keep 0x83, so the queue worker waited until the committer had recorded every queued draw, then preparePacketMemory recorded the dump's GPU store itself. A PS4 title's constant engine dumps a descriptor table before many of its draws. On the board of Monopoly Plus (CUSA03312), APS5_PROFILE_DRAW's [draw] pipelined line counted 4,700 to 5,400 drains a second, nearly all by opcode 0x83, and the worker waited 3.0 to 3.5 s of every 10 s in them.

This commit queues the dump instead:

  • The worker copies the dumped constant RAM words when it reaches the packet (Pm4::ResolveStore, as before) and queues their store as a pipeline item (Driver::enqueueConstantRamDump). The committer records it in stream order with the draws around it through the same store path as a queued DMA_DATA store (Driver::commitStore, renamed from commitDmaStore).
  • The item keeps the bytes it stores. DrawPipeline::StoredBytes answers for a range from the newest queued item that writes it: that item's bytes when it is a store covering the whole range, unknown when it is any other item.
  • Driver::queryPendingWrite gives a capture those bytes as known values instead of draining, and drains as before when the answer is unknown. A page under a queued store is read word by word without draining. With APS5_VERIFY_KNOWN_VALUES=1 it drains first, so each served word is checked against the stored one.

The other reads the worker makes between the enqueue and the commit:

  • Cached draw and dispatch variant validation, fill inputs, dispatch inputs, predication and the 0x63/0x64/0x9f packets already drain on an overlap with any queued write (DrawPipeline::Overlaps); the queued store's range is one.
  • A WAIT_REG_MEM on a dumped word reads the queued value through DrawPipeline::PendingLabel, which reads the stored bytes of a store item as it does a label's.
  • The vertex-table decode of a program with an AGC header (Graphics::DecodeVertexStageInfo, attribute words and vertex V#s) drains and decodes again when its reads overlap a queued write. This branch first added that drain itself; main's fix(agc): drain the draw pipeline before a vertex table read overtakes a queued write #7691 (DecodeOrderedVertexStageInfo) now does it, and the merge keeps main's helper. PS4 programs have no AGC header, so this never runs for them.
  • Raw shader code and user-data callee code are read at addresses from registers, as with queued draws and fills before; a dump is not expected over shader code.

Dumps the worker cannot resolve, dumps outside writable guest memory, predicated dumps and dumps while labels are deferred take the old path. A dump of no words stores nothing and no longer drains. APS5_PIPELINE_DRAIN_DUMPS=1 restores the drain for every dump, like APS5_PIPELINE_DRAIN_FILLS for fills.

main's draw pipeline now also orders queued reads (Enqueue's reads, HeldReads), counts queued writes and runs draws through the optional draw finisher (APS5_DRAW_PIPELINE). EnqueueStore goes through the same enqueue, which drains a busy finisher first; a queued store item carries no reads; and StoredBytes refuses a range the finisher still holds as well as anything a queued non-store item writes.

Follow-ups after review and CI

  • 71bcb4a8d2 merges main 9c6d153dec. The resolution keeps main's draw pipeline, finisher and packet loop, and takes main's ordered vertex-table decode (fix(agc): drain the draw pipeline before a vertex table read overtakes a queued write #7691) in Draw.cpp. WriteLabelOnGpu keeps the unregistered import ahead of fix(agc): store a label behind pending copied write-backs without draining #8180's completion stores.
  • cd2e19f6f9 fixes the Linux CI failure of agc_driver_compute_pipeline_outside_gpu_mutex ("the first dispatch stored 0"):
    • Cause: the dispatch writes memory no import covers, which the driver holds as a CPU copy and writes back at the reap. The WRITE_DATA after it was stored by the GPU into an unregistered import, so the label was visible first.
    • Through fix(agc): store a label behind pending copied write-backs without draining #8180 such a label would instead be stored at the reap, where it can land over a store the host made once the GPU work was done. VideoOut stores 0 into the previous buffer's label after a flip.
    • Fix: the unregistered import is now made only while no copied writer is listed and no completion store is pending. Otherwise the label waits and is written by the CPU, as before this branch.
  • 7aa3c8f63d (first review, point 1): recorded store bytes are refused once their batch's submit has started.
    • Before, a guest that waited for a label behind a dump could rewrite the dumped range with the CPU, and a capture before the reap read the old bytes.
    • Each batch sets an atomic submitStarted before vkQueueSubmit. The lookup does not query the fence: captures run without the GPU mutex, and a label in the middle of a batch is visible before its fence signals.
  • c14d8edb47 (first review, point 3): on Linux, UnregisteredHostImport checks that the range lies inside one private anonymous read-write mapping (rw-p, inode 0). An import does not fail for every such page: AMD's Windows driver imports a mapped view of a section.
  • 0a08a3b019: main now queues queue-0 DMA_DATA by default (ce6865f). Its committed copy into host memory now waits for the batches that store into its destination, as the immediate path above does. agc_driver failed without it.
  • 3cd01b28ab merges main b7488e1ff5.
  • 0bc7829562 fixes the heap corruption XairRrR found (agc_driver_queued_constant_ram_dump aborting on Linux with free(): chunks in smallbin corrupted):
    • Cause: DrawPipeline::enqueue and DrawFinisher::Enqueue left retired items in a thread-local vector until the thread's next enqueue. At thread exit that vector is destroyed with the thread's other thread-locals, in reverse order of construction. ~ShaderMemory, reached from a retired draw item, returns its pages to pagePool(), also a thread-local on Linux. If the pool was constructed after the vector it is already gone, and the page goes into its freed buffer. ASan on the unfixed tree reports a heap-use-after-free at that emplace_back, from __call_tls_dtors.
    • This is destruction order at thread exit, not a lifetime problem during play, and it is not specific to queued dumps. The test's main thread enqueues and first touches the pool at its second enqueue. APS5_PIPELINE_DRAIN_DUMPS=1 only hid it, because the test then stops at its first assert, before that second enqueue. main has the same two vectors.
    • Fix: both vectors are emptied before Enqueue returns, after the lock is released, so nothing is left in them at thread exit. They keep their storage.
  • 70d8cce27d (first review, point 2, option B as chosen on this pull request): VideoOutDriver::Open waits for the driver (AgcDriverWaitIdle) before it replaces a closed port's configuration.
    • Without it, a close and reopen with a flip in flight could free VideoOutConfig::bufferLabels before the batch with PatchFlip's GPU store ran.
    • The wait runs without the driver mutex, and Open checks the port again afterwards, since another Open may have run meanwhile.
    • A queue stalled on something the title does only after sceVideoOutOpen returns stalls the reopen with it. That limit is in the libSceVideoOut debt file.
  • 4647d9c464: the Linux page check uses the PROCMAP_QUERY ioctl on /proc/self/maps (Linux 6.11 and later), and reads the file as text only when the ioctl fails.
  • fb1551442b merges main de2ba4cecb. Two conflicts, both lines added on each side: the recorder tests' PATH list in CMakeLists.txt and the argument dispatch in tests/Recorder.cpp. Both sides are kept.

The per-label import is not cached: an import that outlived its batch would pin memory its owner may free, and host memory has no hook to invalidate it. On the RX 9070 XT a label into unregistered memory costs about 300 us (a registered one 0.4 us), against the ~63 ms wait it replaces. The Linux check takes 0.4 us with the ioctl at any depth; the text fallback takes up to 11 ms at 20,000 mappings (about 0.6 us per mapping ahead of the label's).

Tested

Merge of main d1ae628bc2, 3 Nov, and a variant-validation fix. Head b8c3f25cdf (merge f070b16201). Conflicts: the [capture] profile line in ShaderMemory.cpp (main's line with this branch's known-value verified/mismatch counters), the option list in tests/Recorder.cpp (both kept) and the Windows PATH list in agc_driver_recorder_tests.cmake (main's list plus agc_recorder_stored_bytes). After the merge, agc_driver_queued_constant_ram_dump failed on AMD as oneandonlydean reported: a later draw reused a cached variant and Driver::validateVariant drained with DrainReason::Capture. b8c3f25cdf: when every queued item over the variant's runs is a store whose bytes the pipeline holds, validateVariant returns Differing without draining, so the capture serves the queued bytes; other overlaps, and APS5_VERIFY_KNOWN_VALUES, still drain. Comparing the queued bytes with the variant and keeping it when they matched was tried first and is wrong: the later data-word check reads guest memory that still holds the old table, and draw 1 wrote 64 instead of 255. Windows, WinLibs GCC, Release, AMD RX 9070 XT, validation layer, ANYPS5_NO_SHADER_CACHE=1: agc_driver_queued_constant_ram_dump fails on the merge without the fix (1 capture drain) and passes 3/3 with it, and passes with APS5_VERIFY_KNOWN_VALUES=1; 49/49 of the focused set pass (draw_cache_relocation*, draw_cache_reuse*, draw_data_hit_user_words*, dispatch_data_hit_words, draw_pipeline_*, the *_draw_pipeline variants of bda span, buffer load/store, copied writer, depth storage reuse, unsupported buffer type and write ranges, dumped_constant_capture, both unregistered_label_*, agc_driver_recorder, agc_recorder_*, agc_queued_write_groups); agc_recorder_kept_bytes was not built. No VUID-, 54 device lines all RX 9070 XT. check_conventions.py passed. Not rerun: the same set on main, Linux, the full suite, games, and a paired trace for the speed claim.

Merge of main f2d874c1fd, 1 Nov. Head a814af06ee. The only conflict was in the Linux includes of GuestBufferMemory.cpp: main's macOS udmabuf stand-in and this branch's <linux/fs.h> (for PROCMAP_QUERY) are both kept, with <linux/fs.h> on the non-Apple side. On the RX 9070 XT, 13 of 13 pass with no VUID- line and every device line naming it: agc_driver, agc_driver_pm4, agc_shader_memory, agc_driver_compute_pipeline_outside_gpu_mutex, agc_driver_draw_pipeline_retired_items, agc_driver_dumped_constant_capture, agc_driver_queued_constant_ram_dump, agc_driver_unregistered_label_behind_write_back, agc_driver_unregistered_label_on_gpu, agc_driver_vertex_table_read_order, agc_recorder_stored_bytes, agc_recorder_command_buffer_release, video_out_flip_reopen. Linux: WSL Ubuntu, g++ 15.2.0 compiled GuestBufferMemory.cpp and PipelineJournal.cpp only (the merge changed no struct under the size guards); nothing was linked or run there. Not rerun: the rest of the focused set, each test only once rather than three times, macOS, games.

Windows 11 Pro 26300, WinLibs GCC 15.2.0, Release, AMD Radeon RX 9070 XT (driver 32.0.31041.1004), Vulkan SDK 1.4.363.0. Every run used ANYPS5_GPU=AMD, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, with ctest -V, three times each, on main b7488e1ff5 and on this branch at 4647d9c464. The current head fb1551442b (main de2ba4cecb merged) had the smaller rerun in the last row and the note under the table.

  • Focused set: agc_driver, agc_shader_memory, agc_driver_pm4 and its mode and replay tests, agc_driver_compute_pipeline_outside_gpu_mutex, every pipelined, label, constant-store, copied-writer and DMA test with their draw-pipeline variants, agc_driver_vertex_table_read_order, the recorder tests and video_out_flip_*. That is 176 tests on main, plus this branch's 6 on the branch.

    tests passed skipped failed
    main b7488e1ff5, each of 3 runs 176 174 2 0
    branch 4647d9c464, runs 1 and 2 182 180 2 0
    branch 4647d9c464, run 3 182 179 2 1
    head fb1551442b, each of 3 runs 166 164 2 0
    • Rerun at fb1551442b: the focused set without its 17 video_out_flip_* tests, plus main's new agc_recorder_command_buffer_release, which is the 166 above. Both tests behind the conflicts passed in all three runs: agc_recorder_stored_bytes and agc_recorder_command_buffer_release. video_out_flip_reopen and main's new video_out_flip_padstatus ran once and passed. Same environment, no VUID- or missing-layer lines, and every device line names the RX 9070 XT.
    • Not rerun at fb1551442b: the other 16 video_out_flip_* tests, the mutations below, anything on Linux, and main de2ba4cecb, so the main comparison is still the b7488e1ff5 row.

    Notes on the runs at 4647d9c464:

    • The one failure is agc_driver_pm4_ring in run 3, after 0.05 s: "replace guest placeholder with private memory: Attempt to access invalid address", from Commit in libc's WindowsMappings.hpp while the process sets up the guest arena. This branch does not touch libc. I repeated the test 40 times on each build: 40 of 40 on both. I have not found the cause.
    • The skips are agc_driver_copied_writer_label_order and its drain variant: the device's minStorageBufferOffsetAlignment of 4 binds the record in place.
    • No log contains a VUID- line or was not found but was requested by env var VK_INSTANCE_LAYERS, and every device line names the RX 9070 XT.
  • New and changed tests, each failing without its part of the change. Every row was run on 4647d9c464, 3 of 3 runs, and not repeated at fb1551442b:

    test without
    agc_driver_dumped_constant_capture, dump read by the next capture with APS5_NO_STORED_KNOWN_VALUES=1: "the capture of the draw after a constant RAM dump recorded on the GPU waited for the GPU instead of reading the dumped words"
    agc_driver_dumped_constant_capture, CPU write after the dump's label 7aa3c8f63d's wide-store check, or the flag: "the draw after the guest rewrote a dumped constant to 0.5 once the label behind the dump had landed wrote 255"
    agc_recorder_stored_bytes 7aa3c8f63d's wide-store check: "a wide store is served after its batch was submitted"; its table check: "a label-table store is served after its batch was submitted"
    agc_driver_unregistered_label_on_gpu no unregistered import: "a label in unregistered host memory returned reason 3 instead of 0"; no MEM_PRIVATE check: "a label in a mapped view of a section returned reason 0 instead of 3"
    agc_driver_unregistered_label_behind_write_back, 8-byte label after a write-back !listed for labels: "its store landed over the 0 the host stored once the GPU work was done" (reason 5)
    the same, 16-byte store after a write-back !listed for stores: "held 0x6b6b0001 once the GPU ran its batch (reason 0), while the dispatch's record still held 0xc0001000"
    the same, 8-byte label after a completion store !storesPending for labels: "it landed over the 0 the host stored once the GPU work was done"
    the same, 16-byte store after a completion store !storesPending for stores: "held 0x1 once the GPU ran its batch (reason 0), while the earlier label in registered memory, stored when its batch is reaped, still held 0x0"
    agc_driver_queued_constant_ram_dump with APS5_PIPELINE_DRAIN_DUMPS=1: "a DUMP_CONST_RAM drained the draw pipeline 1 times"
    agc_driver 0a08a3b019: "a copy into host memory drained instead of syncing its source"
    agc_driver_draw_pipeline_retired_items the clear in DrawPipeline::enqueue: "a retired draw pipeline item stayed in the enqueuing thread's storage after Enqueue returned"; in DrawFinisher::Enqueue: "a finished draw finisher job stayed..."
    video_out_flip_reopen (a flip and a label store of the old configuration gated behind the queue) 70d8cce27d's wait: "reopen replaced the port's configuration while a flip and a label store of the previous one were in flight"
  • The CI failure, reproduced on the RX 9070 XT: a local copy of agc_driver_compute_pipeline_outside_gpu_mutex with its slots in VirtualAlloc memory (MEM_PRIVATE, so it is imported) failed "the first dispatch stored 0" in 5 of 5 runs with the import behaving as at bd31efba93, and passed 5 of 5 with cd2e19f6f9. The test file in this pull request is unchanged. On Windows the test's own static arrays are MEM_IMAGE and take the wait.

  • Linux, all at 4647d9c464, before the merge of de2ba4cecb (WSL Ubuntu, g++ 15.2, Release, Unix Makefiles, lavapipe with LLVM 21.1.8, no validation layer installed). I bypassed two configure checks in that copy only, for the XRandR and audio development files; nothing else differs from that commit.

    • Ran: the focused set as it exists on Linux, 157 tests: 133 passed, 24 skipped, 0 failed. Passed there include agc_driver, agc_driver_compute_pipeline_outside_gpu_mutex, agc_driver_queued_constant_ram_dump, agc_driver_copied_writer_label_order and its drain variant, and the Linux cases of agc_driver_unregistered_label_on_gpu.
    • Skipped there: all 16 video_out_flip_* tests including video_out_flip_reopen (SDL has no X11 or Wayland in that copy, so no Vulkan window), and 8 tests whose device needs are not met on lavapipe (host imports of watched memory, deferred settles, a pipeline cache). So the VideoOut reopen test has not run on Linux.
    • agc_driver_queued_constant_ram_dump: at the unfixed merge 3cd01b28ab, 5 runs gave 3 aborts with free(): chunks in smallbin corrupted, 1 segfault and 1 pass. At 4647d9c464, 20 of 20 pass.
    • ASan (ANYPS5_ENABLE_ASAN=ON): at 3cd01b28ab, a heap-use-after-free as described above. At 4647d9c464, 0 errors in agc_driver_queued_constant_ram_dump (3 runs), agc_driver_draw_pipeline_retired_items, both unregistered label tests, agc_driver_dumped_constant_capture and agc_driver_compute_pipeline_outside_gpu_mutex.
    • The page check, both paths, in a harness against real mappings: heap, private anonymous, read-only, a range into a read-only page, PROT_NONE, shared anonymous, a private file mapping, the stack and an unmapped address. 0 failures on either path. The text fallback has run only there, since this kernel (6.18) has the ioctl.
    • Graphics/src/PipelineJournal.cpp and core/shader/recompiler/ShaderDiskCache.cpp, with their Linux-only sizeof guards, compile. main was not built on Linux. The merge of de2ba4cecb changes neither file, nor a guard or guarded struct in AGC, and Linux was not compiled again at fb1551442b.

The numbers below were measured before the follow-ups. Since then, recorded store bytes are served only while their batch is open, and an unregistered label waits while a copied writer or completion store is pending. Each can bring back part of a wait the numbers show removed. No game was run for this update, and the title still needs #9432 to run on main, so this is not the main comparison MarcZX10 and XairRrR ask for.

Monopoly Plus (CUSA03312). The title doesn't run on main: it needs #9430 to #9432. As agreed on #6977, these numbers come from ps4/limbo-gpu at 93eeee0141 (#6977's head then), with and without the change, on the local stack the title needs to start: the Get-fix pull requests named with each pair, and local stand-ins for sceGnmDrawInitDefaultHardwareState200 and sceGnmUpdate*Shader. The base and change commits named with each pair are commits of that local stack, which isn't published. Base and change alternated on the same machine and scene.

  1. Captures, on the language screen. Pair: base 9c5c8619f7, change 2c09e4328d, both with fix(agc): PS4 display, textures and GCN instructions for CUSA03312 Get-fix/AnyPS5#1, fix(build): register relinker tests with CTest #2, Boot Demon's Souls to its first level: AGC recorder driver, runtime, audio, Bink fixes #5 and feat(random): implement sceRandomGetRandomNumber #8:
build fps frame p50 GPU busy ms/present shader_compile_and_link ms/frame capture_resources ms/frame device_lock ms/frame
base 6.08, 6.06, 6.07 163.6 to 164.5 ms 97.6 to 97.8 142.3 to 142.4 112.0 to 112.9 not in the top eight
change 8.33, 8.23, 8.36 119.1 to 121.5 ms 89.6 to 91.0 35.5 to 37.1 not in the top eight 67.7 to 69.2

Summary lines, written before the summary had trace and window:
Base: {"commit":"9c5c8619f7ab","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_RESIDENT_LINEAR":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:15","APS5_TRACE_SUMMARY_EVERY":"15"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.8.1 (LLPC)","os":"Windows 10.0.26300","resolution":"1920x1080","presents":92,"frame_ms":{"p50":163.553,"p90":169.755,"p99":179.944},"gpu_busy_ms_per_present":97.573,"top_phases_ms_per_frame":{"Driver.Packet":162.891,"Driver.Packet.draw":151.459,"Driver.Draw":151.119,"Driver.Draw.shader_compile_and_link":142.416,"Shader.DrawStage":140.547,"Shader.DrawStage.capture_resources":112.045,"Shader.DrawStage.prepared_invocation":17.515,"Shader.DrawStage.materialize":10.915}}
Change: {"commit":"2c09e4328dc6","dirty":false,"env":{...same...},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.8.1 (LLPC)","presents":125,"frame_ms":{"p50":119.541,"p90":122.234,"p99":126.64},"gpu_busy_ms_per_present":90.018,"top_phases_ms_per_frame":{"Driver.Packet":118.492,"Driver.Packet.device_lock":69.187,"Driver.Packet.draw":44.439,"Driver.Draw":44.12,"Driver.Draw.shader_compile_and_link":35.537,"Shader.DrawStage":33.836,"Shader.DrawStage.prepared_invocation":16.829,"Shader.DrawStage.materialize":9.906}}

  1. Labels, on the language screen. Pair: base 2c09e4328d, change 684cb22e80, both with fix(agc): PS4 display, textures and GCN instructions for CUSA03312 Get-fix/AnyPS5#1, fix(build): register relinker tests with CTest #2, Boot Demon's Souls to its first level: AGC recorder driver, runtime, audio, Bink fixes #5, feat(random): implement sceRandomGetRandomNumber #8 and Feat/sce module load #10. The fps stays the same, because the screen was GPU-bound then. The committer's ~63 ms per flip under the GPU mutex is gone.
build fps frame p50 GPU busy ms/present device_lock ms/frame memory_wait ms/frame presenter render_fence_wait ms/frame
base 8.34, 8.26, 8.37 119.2 to 121.0 ms 90.2 to 91.0 68.7 to 70.0 not in the top eight not in the top eight
change 8.33, 8.32, 8.30 120.1 to 120.4 ms 90.6 to 90.9 not in the top eight 63.9 to 64.1 57.6 to 57.8

Summary lines, written before the summary had window. The two traces they name are no longer on the machine that recorded them, so they cannot be attached; the digest below is what remains:
Base: {"commit":"2c09e4328dc6","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_RESIDENT_LINEAR":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:15","APS5_TRACE_SUMMARY_EVERY":"15"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.8.1 (LLPC)","os":"Windows 10.0.26300","resolution":"1920x1080","presents":126,"frame_ms":{"p50":119.365,"p90":120.376,"p99":141.206,"max":141.665},"gpu_busy_ms_per_present":90.208,"top_phases_ms_per_frame":{"Driver.Packet":118.356,"Driver.Packet.device_lock":68.705,"Driver.Packet.draw":44.898,"Driver.Draw":44.572,"Driver.Draw.shader_compile_and_link":36.066,"Shader.DrawStage":34.068,"Shader.DrawStage.prepared_invocation":16.661,"Shader.DrawStage.materialize":10.099},"trace_dropped":true,"trace":"aps5-trace-2c09e4328dc6-27408.json.gz"}
Change: {"commit":"684cb22e80c4","dirty":false,"env":{...same...},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.8.1 (LLPC)","os":"Windows 10.0.26300","resolution":"1920x1080","presents":125,"frame_ms":{"p50":120.123,"p90":121.942,"p99":123.349,"max":124.271},"gpu_busy_ms_per_present":90.867,"top_phases_ms_per_frame":{"Driver.Packet":118.599,"Driver.Packet.memory_wait":63.895,"Driver.Present":63.634,"Driver.Present.render_fence_wait":57.711,"Vulkan.Retire":57.71,"Vulkan.Retire.wait":57.702,"Driver.Packet.draw":44.046,"Driver.Draw":43.716},"trace_dropped":true,"trace":"aps5-trace-684cb22e80c4-28284.json.gz"}

tools/trace_digest.py of the two traces

Base, aps5-trace-2c09e4328dc6-27408:

seconds 120:15 from present 1906: 126 presents, frame p50 119.4 / p90 120.4 / p99 141.2 / max 141.7 ms, GPU busy 90.2 ms per present
AMD Radeon RX 9070 XT, AMD proprietary driver 26.8.1 (LLPC), Windows 10.0.26300, 1920x1080, commit 2c09e43, dropped: yes

{"commit":"2c09e4328dc6","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_RESIDENT_LINEAR":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:15","APS5_TRACE_SUMMARY_EVERY":"15"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.8.1 (LLPC)","os":"Windows 10.0.26300","resolution":"1920x1080","window":{"spec":"seconds 120:15","first_present":1906,"ms":15104.707},"presents":126,"frame_ms":{"p50":119.365,"p90":120.376,"p99":141.206,"max":141.665},"gpu_busy_ms_per_present":90.208,"worker_busy_pct":{"queue worker 0x0":98.822},"top_phases_ms_per_frame":{"Driver.Packet":118.356,"Driver.Packet.device_lock":68.705,"Driver.Packet.draw":44.898,"Driver.Draw":44.572,"Driver.Draw.shader_compile_and_link":36.066,"Shader.DrawStage":34.068,"Shader.DrawStage.prepared_invocation":16.661,"Shader.DrawStage.materialize":10.099},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.584,"events_lost":335566,"totals_full":false}},"trace":"aps5-trace-2c09e4328dc6-27408.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 2010: 141.7 ms at 12457 ms: batch (gpu) 92.7, Driver.Present (presenter) 0.6, Driver.Present.queue_present (presenter) 0.3, Vulkan.QueuePresent (presenter) 0.3
  • present 1975: 141.2 ms at 8238 ms: batch (gpu) 92.1, Driver.Present (presenter) 0.5, Driver.Present.acquire_image (presenter) 0.2, Vulkan.Acquire (presenter) 0.2
  • present 2000: 130.4 ms at 11250 ms: batch (gpu) 91.0, Driver.Present (presenter) 0.6, Driver.Present.acquire_image (presenter) 0.3, Vulkan.Acquire (presenter) 0.3

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 49.7 (41 %) 0.1 (0 %) 70.1 22.0 Driver.Packet 49.8, Driver.EndSubmission 0.0
presenter 0.3 (0 %) 0.1 (0 %) 119.5 0.0 Driver.Present 0.4
gpu 90.2 (75 %) 0.0 (0 %) 29.7 0.0 batch 90.2

Largest slices (ms per frame, inclusive, all threads): batch 90.2, Driver.Packet 49.8, Driver.Packet.device_lock 29.7, Driver.Packet.draw 19.4, Driver.Draw 19.3, Driver.Draw.shader_compile_and_link 15.5, Shader.DrawStage 10.4, Shader.DrawStage.prepared_invocation 3.9

Longest waits

  • Vulkan.Acquire.acquire_fence_wait (presenter) 0.8 ms at 7399 ms, present 1968
  • Driver.Packet.memory_wait (queue worker 0x0) 0.6 ms at 4656 ms, present 1945
  • Driver.Packet.memory_wait (queue worker 0x0) 0.5 ms at 2989 ms, present 1931
  • Driver.Packet.memory_wait (queue worker 0x0) 0.5 ms at 3586 ms, present 1936
  • Driver.Packet.memory_wait (queue worker 0x0) 0.5 ms at 6563 ms, present 1961
  • Driver.Packet.memory_wait (queue worker 0x0) 0.4 ms at 1434 ms, present 1918
  • Driver.Packet.memory_wait (queue worker 0x0) 0.4 ms at 2153 ms, present 1924
  • Driver.Packet.memory_wait (queue worker 0x0) 0.4 ms at 836 ms, present 1913

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 26579: 21.9 ms at 9759 ms, present 1987: GPU no ranges; recorded by no CPU slices
  • batch 26553: 21.8 ms at 9640 ms, present 1986: GPU no ranges; recorded by no CPU slices
  • batch 26469: 20.9 ms at 9283 ms, present 1983: GPU no ranges; recorded by no CPU slices

Change, aps5-trace-684cb22e80c4-28284:

seconds 120:15 from present 1897: 125 presents, frame p50 120.1 / p90 121.9 / p99 123.3 / max 124.3 ms, GPU busy 90.9 ms per present
AMD Radeon RX 9070 XT, AMD proprietary driver 26.8.1 (LLPC), Windows 10.0.26300, 1920x1080, commit 684cb22, dropped: yes

{"commit":"684cb22e80c4","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_RESIDENT_LINEAR":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"120:15","APS5_TRACE_SUMMARY_EVERY":"15"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.8.1 (LLPC)","os":"Windows 10.0.26300","resolution":"1920x1080","window":{"spec":"seconds 120:15","first_present":1897,"ms":15014.801},"presents":125,"frame_ms":{"p50":120.123,"p90":121.942,"p99":123.349,"max":124.271},"gpu_busy_ms_per_present":90.867,"worker_busy_pct":{"queue worker 0x0":98.818},"top_phases_ms_per_frame":{"Driver.Packet":118.599,"Driver.Packet.memory_wait":63.895,"Driver.Present":63.634,"Driver.Present.render_fence_wait":57.711,"Vulkan.Retire":57.71,"Vulkan.Retire.wait":57.702,"Driver.Packet.draw":44.046,"Driver.Draw":43.716},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":6.736,"events_lost":323367,"totals_full":false}},"trace":"aps5-trace-684cb22e80c4-28284.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 1954: 124.3 ms at 6868 ms: batch (gpu) 94.4, Driver.Present (presenter) 62.3, Driver.Present.render_fence_wait (presenter) 55.8, Vulkan.Retire (presenter) 55.8
  • present 1997: 123.3 ms at 12019 ms: batch (gpu) 94.4, Driver.Present (presenter) 63.6, Driver.Present.render_fence_wait (presenter) 59.5, Vulkan.Retire (presenter) 59.5
  • present 1910: 122.9 ms at 1566 ms: Driver.Packet (queue worker 0x0) 117.1, batch (gpu) 92.2, Driver.Packet.memory_wait (queue worker 0x0) 65.6, Driver.Present (presenter) 64.6

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
queue worker 0x0 22.7 (19 %) 28.7 (24 %) 68.7 22.3 Driver.Packet 51.3, Driver.EndSubmission 0.0
presenter 0.2 (0 %) 63.4 (53 %) 56.5 0.0 Driver.Present 63.6
gpu 90.8 (76 %) 0.0 (0 %) 29.4 0.0 batch 90.8

Largest slices (ms per frame, inclusive, all threads): batch 90.8, Driver.Present 63.6, Driver.Present.render_fence_wait 57.7, Vulkan.Retire 57.7, Vulkan.Retire.wait 57.7, Driver.Packet 51.3, Driver.Packet.memory_wait 28.7, Driver.Packet.draw 19.8

Longest waits

  • Driver.Packet.memory_wait (queue worker 0x0) 66.0 ms at 2289 ms, present 1916
  • Driver.Packet.memory_wait (queue worker 0x0) 65.6 ms at 1566 ms, present 1910
  • Driver.Packet.memory_wait (queue worker 0x0) 65.6 ms at 3615 ms, present 1927
  • Driver.Packet.memory_wait (queue worker 0x0) 65.4 ms at 1087 ms, present 1906
  • Driver.Packet.memory_wait (queue worker 0x0) 65.3 ms at 0 ms, present 1897
  • Driver.Packet.memory_wait (queue worker 0x0) 65.2 ms at 1807 ms, present 1912
  • Driver.Packet.memory_wait (queue worker 0x0) 65.0 ms at 3975 ms, present 1930
  • Driver.Packet.memory_wait (queue worker 0x0) 65.0 ms at 844 ms, present 1904

Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)

  • batch 25196: 22.1 ms at 11074 ms, present 1989: GPU no ranges; recorded by no CPU slices
  • batch 25249: 21.4 ms at 11312 ms, present 1991: GPU no ranges; recorded by no CPU slices
  • batch 25141: 21.2 ms at 10832 ms, present 1987: GPU no ranges; recorded by no CPU slices

In each trace the queue worker's event buffer filled 6.6 to 6.7 s into the 15 s window (trace_dropped_threads). Its later slices are missing from the trace, so the thread, slice and wait lists cover only that part of the queue worker's time.

  1. DUMP_CONST_RAM, on Monopoly's idle match board (perf(agc): queue DUMP_CONST_RAM stores behind pipelined draws Get-fix/AnyPS5#21 has the full runs). Pair: base 7cee08fdaf, change 4dbf61346d, both with fix(agc): PS4 display, textures and GCN instructions for CUSA03312 Get-fix/AnyPS5#1, fix(build): register relinker tests with CTest #2, Boot Demon's Souls to its first level: AGC recorder driver, runtime, audio, Bink fixes #5 to feat(random): implement sceRandomGetRandomNumber #8, Feat/sce module load #10 to fix: correct sscanf %x signedness and avoid a substr copy #15, fix(libc): only call what() on std::exception types in DefaultTerminate #19 and a port of perf(agc): write DMA_DATA fills of an idle GDS without draining #9385. The board goes from 3.8 to 5.5 fps with alternating builds, and from 5.0 to 6.9 fps when the drain is toggled within one run.

Summary lines. These runs set no APS5_TRACE_SECONDS, so they wrote no traces; the digest below reads their summary files:
Base (7cee08fdaf):

{"commit":"7cee08fdaf5c","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_RESIDENT_LINEAR":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"15"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.8.1 (LLPC)","os":"Windows 10.0.26300","resolution":"1920x1080","window":{"spec":"summary_every 15","first_present":3614,"ms":15055.351},"interval_start_s":241.412,"interval_end_s":256.468,"presents":59,"frame_ms":{"p50":254.65,"p90":261.307,"p99":267.663,"max":267.663},"gpu_busy_ms_per_present":41.305,"worker_busy_pct":{"queue worker 0x0":97.469},"top_phases_ms_per_frame":{"Driver.Packet":248.319,"Driver.Packet.draw":127.681,"Driver.Draw":126.316,"Driver.Packet.device_lock":94.639,"Driver.Draw.shader_compile_and_link":77.928,"Shader.DrawStage":71.931,"Shader.DrawStage.capture_resources":33.627,"Driver.Draw.draw_enqueued":32.303},"trace_dropped":false,"trace":""}

Change (4dbf61346d):

{"commit":"4dbf61346d53","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_RESIDENT_LINEAR":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"15"},"gpu":"AMD Radeon RX 9070 XT","driver":"AMD proprietary driver 26.8.1 (LLPC)","os":"Windows 10.0.26300","resolution":"1920x1080","window":{"spec":"summary_every 15","first_present":4141,"ms":15149.009},"interval_start_s":241.023,"interval_end_s":256.173,"presents":87,"frame_ms":{"p50":174.393,"p90":176.669,"p99":178.739,"max":178.739},"gpu_busy_ms_per_present":35.611,"worker_busy_pct":{"queue worker 0x0":96.217},"top_phases_ms_per_frame":{"Driver.Packet":167.135,"Driver.Packet.draw":139.377,"Driver.Draw":137.917,"Driver.Draw.shader_compile_and_link":81.631,"Shader.DrawStage":75.593,"Driver.Draw.draw_enqueued":40.305,"Shader.DrawStage.capture_resources":34.981,"Shader.DrawStage.materialize":29.453},"trace_dropped":false,"trace":""}
tools/trace_digest.py of the two runs' summary files

Base, 7cee08fdaf:

20 intervals, 0.0 to 302.0 s, 3852 presents
AMD Radeon RX 9070 XT, AMD proprietary driver 26.8.1 (LLPC), Windows 10.0.26300, 1920x1080, commit 7cee08f

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 0-15 887 16.7 16.9 17.0 192.5 1.5 99 % Driver.Packet 16.7
2 15-30 477 35.5 37.1 39.7 973.4 9.9 97 % Driver.Packet 30.5
3 30-45 412 36.0 37.5 41.5 109.5 13.7 96 % Driver.Packet 34.8
4 45-60 421 35.7 37.4 39.6 41.0 13.3 96 % Driver.Packet 34.2
5 60-75 379 38.7 47.1 51.3 112.0 13.6 96 % Driver.Packet 38.1
6 75-90 437 35.4 42.7 258.0 942.6 8.4 97 % Driver.Packet 33.4
7 90-105 65 248.7 259.8 491.9 491.9 37.8 97 % Driver.Packet 227.6
8 105-120 60 252.7 258.9 260.9 260.9 38.6 97 % Driver.Packet 245.9
9 120-136 59 254.7 261.6 265.9 265.9 38.5 97 % Driver.Packet 247.8
10 136-151 60 252.5 257.6 262.2 262.2 38.8 97 % Driver.Packet 245.5
11 151-166 60 253.0 260.1 278.8 278.8 40.0 97 % Driver.Packet 246.7
12 166-181 59 254.2 265.0 274.2 274.2 38.8 97 % Driver.Packet 248.4
13 181-196 59 254.5 260.8 266.2 266.2 39.2 97 % Driver.Packet 248.8
14 196-211 60 252.3 256.0 260.5 260.5 40.1 97 % Driver.Packet 245.4
15 211-226 60 254.0 258.9 264.2 264.2 42.0 97 % Driver.Packet 247.1
16 226-241 59 254.4 260.2 265.4 265.4 41.8 97 % Driver.Packet 247.8
17 241-256 59 254.7 261.3 267.7 267.7 41.3 97 % Driver.Packet 248.3
18 256-272 60 254.7 261.7 266.4 266.4 41.6 97 % Driver.Packet 247.1
19 272-287 59 255.2 262.2 266.5 266.5 40.9 97 % Driver.Packet 249.1
20 287-302 60 254.2 259.6 262.8 262.8 41.3 97 % Driver.Packet 246.9
p99 ms  .____+@+++++++++++++  0-491.9
gpu ms  .:---:%%%%@%%@@@@@@@  0-42.0

Change, 4dbf61346d:

20 intervals, 0.0 to 301.3 s, 4485 presents
AMD Radeon RX 9070 XT, AMD proprietary driver 26.8.1 (LLPC), Windows 10.0.26300, 1920x1080, commit 4dbf61346d53

# seconds presents p50 p90 p99 max GPU busy busiest worker largest phase
1 0-15 885 16.7 16.9 17.0 193.4 1.6 99 % Driver.Packet 16.7
2 15-30 506 32.6 34.0 35.4 950.5 10.6 97 % Driver.Packet 28.6
3 30-45 462 32.1 33.5 35.0 103.7 14.1 95 % Driver.Packet 30.8
4 45-60 475 31.6 32.6 33.8 34.0 13.7 95 % Driver.Packet 30.1
5 60-75 458 32.5 34.1 35.8 107.8 14.1 96 % Driver.Packet 31.2
6 75-90 487 32.2 33.9 159.4 824.9 9.6 96 % Driver.Packet 29.8
7 90-105 90 171.8 178.6 384.6 384.6 36.2 96 % Driver.Packet 161.2
8 105-120 86 174.8 178.0 183.1 183.1 35.8 96 % Driver.Packet 168.1
9 120-135 87 172.8 177.2 180.4 180.4 35.8 96 % Driver.Packet 165.7
10 135-150 87 173.3 176.4 179.9 179.9 36.3 96 % Driver.Packet 166.3
11 150-166 86 175.6 178.3 186.4 186.4 35.9 96 % Driver.Packet 168.6
12 166-181 86 174.9 177.4 182.0 182.0 35.9 96 % Driver.Packet 167.9
13 181-196 87 173.8 176.2 179.1 179.1 36.8 96 % Driver.Packet 166.6
14 196-211 84 177.5 190.9 200.3 200.3 36.5 96 % Driver.Packet 173.1
15 211-226 88 172.1 175.7 177.6 177.6 36.6 96 % Driver.Packet 165.5
16 226-241 87 172.9 175.8 177.8 177.8 36.6 96 % Driver.Packet 165.9
17 241-256 87 174.4 176.7 178.7 178.7 35.6 96 % Driver.Packet 167.1
18 256-271 86 175.3 178.4 183.0 183.0 35.3 96 % Driver.Packet 168.1
19 271-286 85 177.4 180.4 184.9 184.9 35.8 96 % Driver.Packet 170.3
20 286-301 86 175.0 177.8 180.2 180.2 35.5 96 % Driver.Packet 168.0
p99 ms  .____=@======+======  0-384.6
gpu ms  .----:@@@@@@@@@@@@@@  0-36.8

Row 17, 241 to 256 s, is the window of the summary lines above.

Merge of main cc26ab4438, 1 Nov. Head bebaf6e59d. The only conflict was libSceAgcDriver/CMakeLists.txt: main moved the AGC test registrations into tests/cmake, and tools/agc_test_split.py resolve moved agc_recorder_stored_bytes to the agc_driver_recorder_tests fragment. agc_recorder_stored_bytes, agc_recorder_read_list, agc_driver_queued_constant_ram_dump and agc_driver_graphics pass, 3 of 3 on the RX 9070 XT under the validation layer, no VUID- line. Not rerun: the other tests, Linux, games.

Merge of main b415263451, 1 Nov. Head 87e6918b69. Conflicts in Recorder.hpp, Recorder.cpp, tests/Recorder.cpp and docs/dev/debt/libSceVideoOut.md: this branch's LookupStoredBytes and main's UnlandedOwnLabel (with main's ANYPS5_PAD_IDENTIFY debt lines) sit side by side, and both test groups stay in the recorder runs. Windows, RX 9070 XT, same environment as above, one run of a focused set of 31: the recorder's agc_recorder_stored_bytes, agc_recorder_completion_labels and agc_recorder_command_buffer_release, agc_driver, agc_driver_same_queue_label_wait and the label-order, constant-store, idle-store and unregistered-label tests with their variants, video_out_flip_reopen and video_out_flip_padstatus. 29 passed and 2 skipped (agc_driver_copied_writer_label_order and its _drain variant: this device's minStorageBufferOffsetAlignment is 4). No VUID- line, and every selected-GPU line names the RX 9070 XT. Not rerun at this head: the other video_out_flip_* tests, agc_shader_memory, agc_driver_pm4 and its variants, Linux, and any title. The speed numbers above were not remeasured.

Merge of main 4f41f4c375, 3 Nov. Head f160886325. The only conflict was the Windows PATH list in agc_driver_recorder_tests.cmake: main's new agc_changed_copy and this branch's agc_recorder_stored_bytes are both kept. Windows, WinLibs GCC, Release, RX 9070 XT, ANYPS5_GPU=AMD ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation: 19 of 19 pass, 3 of 3 runs, no VUID- line, no skip (agc_driver_queued_constant_ram_dump, agc_driver_draw_cache_reuse and its six variants, agc_driver_draw_pipeline_retired_items, agc_driver_dumped_constant_capture, both agc_driver_unregistered_label_*, agc_driver_vertex_table_read_order, agc_driver_compute_pipeline_outside_gpu_mutex, agc_driver_pm4, agc_recorder_stored_bytes, agc_changed_copy, agc_driver, video_out_flip_reopen). Not rerun: the rest of the recorder set, Linux, games.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: CUSA03312 Hasbro Family Fun Pack (CUSA03312) #7198
  • GPUs tested: AMD Radeon RX 9070 XT, driver 32.0.31041.1004, Windows 11 Pro 26300; lavapipe (LLVM 21.1.8) on Linux for the subset under Tested
  • AI-assisted: yes

🤖 Generated with Claude Code

savvaniss and others added 3 commits October 22, 2026 23:19
…or the GPU

A COPY_DATA, DMA_DATA or DUMP_CONST_RAM store of up to 64 KiB that the
driver resolves while GPU work is open is recorded into the batch as a
vkCmdUpdateBuffer into the host import, and its range becomes a pending
write. The next draw's resource capture reads the dumped descriptor
table through the flush hook, which submits the batch and waits for the
GPU although the driver already holds the bytes.

The recorder now keeps the bytes of stores wider than the 64-byte label
table too, in record order, and flags them overwritten like table
entries when later GPU work writes over them. Recorder::LookupStoredBytes
composes a range from the newest store of each dword. It refuses a dword
without a store, one a later GPU write covers, a label behind a
completion action and a range under a queued label. Everything recorded
before the store lands first and the store lands before anything
recorded after it, so the bytes are what the next draw reads on the GPU.

classifyPendingWrite answers KnownValue for such a range when the caller
takes the bytes (captures, cached draw and dispatch validation), so the
capture reads them without the wait. Callers that pass no buffer, and
every other pending write, sync as before. APS5_NO_STORED_KNOWN_VALUES=1
turns the path off, and APS5_VERIFY_KNOWN_VALUES=1 checks each served
word against the GPU's; the [capture] profile line now reports both
counts.

Monopoly Plus (CUSA03312) dumps 144- to 512-byte descriptor tables from
constant RAM about 100 times per frame on its language screen, each
followed by a draw whose capture waited about 1 to 2 ms for the GPU.
That screen now runs at about 8.3 instead of 6.1 frames per second on
an RX 9070 XT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A label or store into memory no host import covers made the recording
thread wait for all recorded work and write it with the CPU (boykopovar#1458).
VideoOut's buffer labels live in host memory no guest allocation
covers, so every PS4 flip label drained the device under the GPU lock:
the draw committer waited about 63 ms per frame and the queue worker
waited for the committer at the next DUMP_CONST_RAM.

Such memory is now imported for the batch that stores into it, when its
pages are committed private read-write memory of one allocation and no
guest range overlaps them. The GPU stores the label in stream order, as
the console's CP does. Memory that fails those checks or the import
keeps the wait.

A DMA_DATA copy into host memory that no import covers waited for the
batches that write its source and copied on the CPU unless something
could still store over its destination, then drained the device. Such a
label is now a GPU store in the open batch, so the copy also waits for
the batches that store into its destination, then checks again. Only
what still stores there after that wait (a storage image's write-back,
a unit shadow, a label another queue has not recorded yet) drains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A DUMP_CONST_RAM on the graphics queue drained the draw pipeline: the
queue worker waited until the committer had recorded every queued draw,
then recorded the dump's GPU store itself. The constant engine of a PS4
title dumps a descriptor table before many of its draws, so on the
board of Monopoly Plus (CUSA03312) the worker drained about 5,300 times
a second and waited for the committer about a third of the time.

The worker now copies the dumped constant RAM words when it reaches the
packet and queues their store as a pipeline item, which the committer
records in stream order with the draws around it (Driver::commitStore,
formerly commitDmaStore). The item keeps the bytes it stores.
DrawPipeline::StoredBytes answers for a range from the newest queued
item that writes it: its bytes when that item is a store covering the
whole range, unknown when it is anything else.

queryPendingWrite gives a capture those bytes as known values instead
of draining, and drains as before when the answer is unknown. A page
under a queued store is read word by word without draining. With
APS5_VERIFY_KNOWN_VALUES=1 it drains first, so the served words are
checked against the stored ones.

The other reads the worker makes before the commit already drain on an
overlap with any queued write, the store's range included: cached
variant validation, fill and dispatch inputs and predication. A
WAIT_REG_MEM on a dumped word reads the queued value through
PendingLabel. The vertex-table decode of a program with an AGC header
read guest memory with no such check; it now drains and decodes again
when its reads overlap a queued write.

A dump of no words stores nothing and no longer drains. Dumps the
worker cannot resolve, dumps outside writable guest memory, predicated
dumps and dumps while labels are deferred take the old path.
APS5_PIPELINE_DRAIN_DUMPS=1 restores the drain for every dump.

agc_driver_queued_constant_ram_dump holds the committer while a draw,
a dump, a draw, a second dump of the same table and a draw are queued.
Each draw must read the table as of its place in the stream, the table
must hold the second dump, and nothing may drain. A second case dumps
a vertex attribute table under a draw whose AGC header reads it; the
decode must wait for the dump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line unblocks title Names a title ID on the Unblocks line labels Oct 22, 2026
@github-actions

Copy link
Copy Markdown

This pull request is labeled perf, so it needs the summary line of a capture on main and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both aps5-summary.jsonl lines, attach the two traces and add the output of tools/trace_digest.py.

@MarcZX10

Copy link
Copy Markdown
Contributor

The source review did not reveal a concrete correctness defect in the recorded-byte lookup or unregistered-import lifetime path: queued reads return bytes only from a covering store item, and the import is retained by the batch. One required item remains for the perf claim: CONTRIBUTING.md asks for the two aps5-summary.jsonl lines from main and the change on the same title, scene, and machine, plus both traces and tools/trace_digest.py output. The current Monopoly Plus measurements are explicitly from ps4/limbo-gpu on an unpublished local stack, with stand-ins, so they do not provide that comparison against current upstream main. Could you add a comparable baseline/change pair and artifacts, or clarify/remove the performance claim if that comparison cannot be produced? I did not run the local tests in this environment; the hosted Linux and Windows checks are skipped on this PR.

@oneandonlydean oneandonlydean self-assigned this Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 862 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1368 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1896 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Memory/WriteEvidence.cpp
docs/dev/ENVIRONMENT.md
PR 2434 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceVideoOut.md
PR 4448 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 4847 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5021 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp
core/libs/prx/libSceVideoOut/tests/Flip.cpp
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5609 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6146 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6185 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 6187 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp
core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
core/libs/prx/libSceAgcDriver/Execution/src/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6192 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6209 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6290 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6501 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
docs/dev/ENVIRONMENT.md
PR 6548 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6549 docs/dev/debt/libSceAgcDriver.md
PR 6615 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Memory/WriteEvidence.cpp
PR 6743 docs/dev/debt/libSceAgcDriver.md
PR 6782 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 6804 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6905 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 6913 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6918 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6924 docs/dev/ENVIRONMENT.md
PR 6926 docs/dev/debt/libSceAgcDriver.md
PR 6970 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6973 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6977 core/libs/prx/libSceVideoOut/tests/Flip.cpp
docs/dev/debt/libSceVideoOut.md
PR 6987 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6989 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6995 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7002 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7085 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/debt/libSceAgcDriver.md
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7275 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7369 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7449 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 7457 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 7464 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 7604 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 7622 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 7643 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 7668 docs/dev/debt/libSceAgcDriver.md
PR 7963 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
PR 7978 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 8004 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 8212 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8246 docs/dev/ENVIRONMENT.md
PR 8484 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 8707 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 8963 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 9012 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 9020 docs/dev/debt/libSceAgcDriver.md
PR 9154 docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceVideoOut.md
PR 9248 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
docs/dev/ENVIRONMENT.md
PR 9289 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
PR 9318 docs/dev/debt/libSceAgcDriver.md
PR 9335 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 9387 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 9432 core/libs/prx/libSceVideoOut/tests/Flip.cpp
docs/dev/debt/libSceVideoOut.md
PR 9489 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 9508 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 9592 docs/dev/debt/libSceAgcDriver.md
PR 9672 docs/dev/debt/libSceAgcDriver.md
PR 9673 docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/libSceVideoOut.md
PR 9674 docs/dev/debt/libSceAgcDriver.md
PR 9675 docs/dev/debt/libSceAgcDriver.md
PR 9676 core/libs/prx/libSceVideoOut/tests/Flip.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceVideoOut.md
PR 9700 docs/dev/debt/libSceAgcDriver.md
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 9742 docs/dev/debt/libSceAgcDriver.md
PR 9748 docs/dev/debt/libSceAgcDriver.md
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 9875 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
PR 9880 docs/dev/debt/libSceVideoOut.md
PR 9884 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9915 docs/dev/debt/libSceAgcDriver.md
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 9999 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10025 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 10043 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 10049 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10064 docs/dev/debt/libSceAgcDriver.md
PR 10069 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 10112 docs/dev/debt/libSceVideoOut.md
PR 10141 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 10159 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 10193 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 10233 docs/dev/debt/libSceAgcDriver.md
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp
PR 10256 docs/dev/debt/libSceAgcDriver.md
PR 10351 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10359 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
docs/dev/debt/libSceAgcDriver.md
PR 10442 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 10443 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
PR 10469 docs/dev/debt/libSceAgcDriver.md
PR 10472 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 10492 docs/dev/debt/libSceAgcDriver.md
PR 10497 docs/dev/debt/libSceAgcDriver.md
PR 10652 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10668 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 10678 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 10743 docs/dev/debt/libSceAgcDriver.md
PR 10757 docs/dev/ENVIRONMENT.md
PR 10779 docs/dev/debt/libSceAgcDriver.md
PR 10867 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10894 docs/dev/ENVIRONMENT.md
PR 10920 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 11104 docs/dev/debt/libSceAgcDriver.md
PR 11265 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11346 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/debt/libSceAgcDriver.md
PR 11351 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 11435 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 11436 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 11483 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11485 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 11551 docs/dev/debt/libSceAgcDriver.md
PR 11557 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 11587 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 11731 docs/dev/debt/libSceVideoOut.md
PR 11825 docs/dev/debt/libSceAgcDriver.md
PR 11847 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 11948 docs/dev/ENVIRONMENT.md
PR 11995 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 11998 docs/dev/debt/libSceAgcDriver.md
PR 12066 docs/dev/ENVIRONMENT.md
PR 12070 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 12120 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 12132 docs/dev/ENVIRONMENT.md
PR 12157 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12158 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 12172 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
PR 12323 docs/dev/ENVIRONMENT.md
PR 12324 docs/dev/ENVIRONMENT.md
PR 12452 docs/dev/debt/libSceAgcDriver.md
PR 12478 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
docs/dev/ENVIRONMENT.md
PR 12544 docs/dev/ENVIRONMENT.md
PR 12565 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
docs/dev/debt/libSceAgcDriver.md
PR 12567 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 12568 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 12662 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 12696 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 12720 docs/dev/ENVIRONMENT.md
PR 12745 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 12746 docs/dev/ENVIRONMENT.md
PR 12764 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 12792 docs/dev/debt/libSceAgcDriver.md
PR 12827 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12828 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12840 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 12848 docs/dev/ENVIRONMENT.md
PR 12849 docs/dev/ENVIRONMENT.md
PR 12855 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 12863 core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp
core/libs/prx/libSceVideoOut/tests/Flip.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceVideoOut.md
PR 12895 docs/dev/ENVIRONMENT.md
PR 12904 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 12921 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
PR 12930 docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceVideoOut.md
PR 12944 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12970 docs/dev/ENVIRONMENT.md
PR 12980 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 13021 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13023 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13041 core/libs/prx/libSceVideoOut/tests/Flip.cpp
docs/dev/debt/libSceVideoOut.md
PR 13044 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
PR 13125 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13145 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 13146 docs/dev/debt/libSceAgcDriver.md
PR 13147 docs/dev/debt/libSceAgcDriver.md
PR 13148 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13151 docs/dev/debt/libSceAgcDriver.md
PR 13159 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 13169 docs/dev/ENVIRONMENT.md
PR 13248 docs/dev/debt/libSceAgcDriver.md
PR 13251 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 13263 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
PR 13474 docs/dev/debt/libSceAgcDriver.md
PR 13599 docs/dev/debt/libSceAgcDriver.md
PR 13646 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 13707 docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13793 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13809 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13858 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13863 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13920 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13928 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13929 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 13942 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 13963 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13984 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
PR 13991 docs/dev/debt/libSceAgcDriver.md
PR 13994 docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/libSceVideoOut.md
PR 14005 docs/dev/debt/libSceAgcDriver.md
PR 14018 docs/dev/debt/libSceAgcDriver.md
PR 14042 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 14051 docs/dev/ENVIRONMENT.md
PR 14076 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14085 docs/dev/debt/libSceAgcDriver.md
PR 14106 docs/dev/debt/libSceVideoOut.md
PR 14212 docs/dev/debt/libSceAgcDriver.md
docs/dev/debt/libSceVideoOut.md
PR 14217 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14218 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14220 docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 14235 docs/dev/ENVIRONMENT.md
PR 14243 docs/dev/debt/libSceAgcDriver.md
PR 14248 docs/dev/debt/libSceAgcDriver.md
PR 14260 docs/dev/ENVIRONMENT.md
PR 14261 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 14262 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/ENVIRONMENT.md
PR 14263 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14264 docs/dev/ENVIRONMENT.md
PR 14265 docs/dev/debt/libSceAgcDriver.md
PR 14296 docs/dev/debt/libSceAgcDriver.md
PR 14299 docs/dev/ENVIRONMENT.md
PR 14302 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/debt/libSceAgcDriver.md
PR 14311 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/debt/libSceAgcDriver.md
PR 14330 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 14344 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 14367 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 14561 docs/dev/debt/libSceAgcDriver.md
PR 14621 docs/dev/debt/libSceAgcDriver.md
PR 14628 docs/dev/debt/libSceAgcDriver.md
PR 14709 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14794 docs/dev/ENVIRONMENT.md
PR 14815 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 14838 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 14868 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 14871 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14880 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14904 docs/dev/ENVIRONMENT.md
PR 14909 docs/dev/debt/libSceAgcDriver.md
PR 14914 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 14941 docs/dev/debt/libSceVideoOut.md
PR 14943 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 14944 docs/dev/debt/libSceAgcDriver.md
PR 14950 docs/dev/debt/libSceAgcDriver.md
PR 14954 docs/dev/debt/libSceVideoOut.md
PR 14963 docs/dev/debt/libSceAgcDriver.md
PR 14964 docs/dev/debt/libSceAgcDriver.md
PR 14976 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 14982 docs/dev/debt/libSceAgcDriver.md
PR 14993 docs/dev/debt/libSceAgcDriver.md
PR 15002 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15004 docs/dev/ENVIRONMENT.md
PR 15015 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/ENVIRONMENT.md
PR 15058 docs/dev/debt/libSceAgcDriver.md
PR 15059 docs/dev/ENVIRONMENT.md
PR 15064 docs/dev/ENVIRONMENT.md

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@savvaniss thanks for this, and for the clear write-up per commit. I read all three on f137c98. The ordering argument holds for each against GPU work recorded around the store. One gap needs closing before we can take it, plus two smaller questions.

1. Recorded store bytes can go stale after a guest CPU write (commit 1).
classifyPendingWrite now returns KnownValue from Recorder::LookupStoredBytes before the write-evidence checks. A recorded store stays in the label table until its batch is retired in finish(), not when its fence signals. Take a guest that waits on an EOP label behind the dump, then rewrites that memory with the CPU and submits a draw that reads it. If the old batch hasn't been reaped yet, the capture is served the old dump bytes. On main that capture took Sync, which is free once the fence has signaled, and read the current memory.
The existing known-value path already guards this: knownValueCurrent does GuestMemory::CollectWrites + UnchangedSince(begin, bytes, generation). Could you do the same here: record the guest-memory write generation when the store is noted (wide entries and table entries), and have storedBytesLocked refuse a range that changed since? A cheaper option is to refuse once the store's batch has signaled (unsignaled(serial) exists), since a plain read is then free and correct. Either way, please add a test that CPU-writes a recorded store's range before the batch is retired and expects the new bytes.

2. Lifetime of an unregistered label target (commit 2).
Before, the label was written by the CPU right after WaitIdle. Now the 8 bytes are written whenever the GPU runs the batch. The import is kept with the batch, but the host object that owns those bytes isn't (VideoOut's config, or a native thread stack). Can it be freed or reused before the batch completes, e.g. sceVideoOutClose with a flip in flight, or a thread returning? If teardown always drains the GPU first, a line saying where would settle it.

3. Linux page checks (commit 2).
On Windows, UnregisteredHostImport checks committed / private / PAGE_READWRITE / single allocation. On Linux it relies on the import failing. Is that guaranteed for read-only or file-backed pages on the drivers you tested? If not, a /proc/self/maps check would make the two platforms match.

Commit 3 looks right to me: the newest queued item must be a store covering the whole range, every no-buffer caller treats KnownValue as pending, and the reads you list drain on overlap. One note for later: LOAD_CONST_RAM (0x80) isn't implemented yet, and whoever adds it will need it to drain on overlap with a queued dump.

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Oct 23, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@savvaniss the exact-head CI on this PR fails agc_driver_compute_pipeline_outside_gpu_mutex on Linux with the first dispatch stored 0 (tests/execution/ComputePipelineOutsideGpuMutex.cpp:93). The same test passes on runs based on main, for example #9082 and #8212, and the test file is unchanged, so the change in this PR is what makes it fail. (The Windows guest_raise_in_system_call timeout is the known flake.)

What the test does: a compute dispatch writes 0x1234 to output, a WRITE_DATA then sets done to 1, and the test waits for done and reads output. Both words are static arrays, so they are in memory no import covers.

My reading of the diff, which I have not reproduced: before your second commit, a label into such memory waited for all recorded work and was written by the CPU, so every earlier store had landed first. Now WriteLabelOnGpu stores it on the GPU into a host import of the label's pages. The compute output is a storage-buffer write that the driver copies back to guest memory afterwards, so done can become visible before output. A guest that polls a label and then reads the data it published would see stale bytes, which is what this test checks.

One direction that would keep your speed-up: use the GPU-store path only while no write-back is outstanding in the open batch, and otherwise wait and write from the CPU as before. Another is to write such a label only after the batch's write-backs. The choice is yours.

To reproduce, build with a Vulkan device (lavapipe is enough) and run:

ctest -R agc_driver_compute_pipeline_outside_gpu_mutex --output-on-failure

It would be worth running the other agc_driver_* tests too: this one was not in the test selection used for the local merge check. After a fix I will run CI again on the exact head.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@savvaniss This PR now conflicts with main in core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawPipeline.hpp, core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp, core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPipeline.cpp, core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp, core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp, docs/dev/debt/libSceAgcDriver.md. Main’s queued-draw interface, finisher ordering and packet decoding overlap this PR’s queued stores and label handling. Could you reconcile store ordering and drain behavior with the current draw queue and packet paths?

savvaniss and others added 4 commits October 25, 2026 23:46
Main's draw pipeline now counts queued writes, keeps retired items and
drains the draw finisher before an enqueue; DrawPipeline::EnqueueStore
goes through the same enqueue, and StoredBytes refuses a range the
finisher still holds. boykopovar#7691's ordered vertex-table decode replaces this
branch's drain in Draw.cpp. boykopovar#8180's completion stores apply to an
unregistered host import as to any other: a label of 8 bytes or less
recorded while a copied writer is listed is stored at reap, after the
write-backs. APS5_PIPELINE_DMA is gone from ENVIRONMENT.md, as on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ack pending

agc_driver_compute_pipeline_outside_gpu_mutex failed on Linux: its
dispatch writes a buffer in host memory no import covers, which the
driver holds as a CPU copy and writes back when the batch is reaped,
and the WRITE_DATA after it went into an unregistered host import and
was stored by the GPU, so the label was visible before the dispatch's
result. With main's completion stores (boykopovar#8180) such a label would instead
be stored at the reap, where it can land over a store the host made once
the GPU work was done (VideoOut clears a buffer label after its flip).

The unregistered import is now made only while no copied writer is
listed and no completion store is pending. Otherwise the label or store
waits for the recorded work and is written by the CPU, as before this
branch. UnregisteredLabelBehindWriteBack checks a label and a 16-byte
store after a pending write-back and after a pending completion store,
and that a 16-byte store with neither pending still goes to the GPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tted

A capture read a recorded store's bytes (Recorder::LookupStoredBytes)
until the store's batch was retired. Once the batch is submitted the GPU
may run it, a guest that sees one of its labels may write over the
stored range with the CPU, and a capture before the reap then read the
old bytes where memory held the new ones.

Each batch now notes that its submit started before vkQueueSubmit, and
the lookup refuses a table entry or wide store of such a batch, so the
capture reads memory as it did before this branch. The note is an atomic
read under the label table mutex: captures run without the GPU mutex,
so the lookup does not query the batch's fence, which vkQueueSubmit uses
on the committer thread. Stores of the open batch, which the GPU has not
seen, are still served.

agc_recorder_stored_bytes checks that both kinds of entry are refused
after Submit; agc_driver_dumped_constant_capture rewrites a dumped
constant once the label behind the dump has landed and expects the next
draw to read the new value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Windows, UnregisteredHostImport takes only committed MEM_PRIVATE pages
with PAGE_READWRITE in one allocation. On Linux it took any range whose
host-pointer import succeeded, and an import does not have to fail for
read-only, file-backed or shared pages: an implementation may wrap the
pointer, and the store then faults or writes through to the file.

Linux now reads /proc/self/maps and imports the range only when it lies
inside one private anonymous read-write mapping (rw-p, inode 0). Other
platforms without the file refuse, so the label waits as before.

agc_driver_unregistered_label_on_gpu now also refuses a label in a
mapped view of a section on Windows, and on Linux a read-only page, a
private file mapping and a shared anonymous mapping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recorder keeps both this branch's LookupStoredBytes and main's UnlandedOwnLabel, with both test groups in --completion-labels-only and the full recorder run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 1, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 87e6918 merged onto main ba8dcc6 · tested 2026-11-01 11:52 UTC · 29 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,488 passed · 5 failed (0 new, 3 also fail on main, 2 unstable on main) · 45 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,538 of 3,148 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (937 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_graphics_maps_fallback 30.4 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 1 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 8 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (4, not in the main baseline's validation pass)
agc_driver_draw_pipeline_retired_items
agc_driver_dumped_constant_capture
agc_driver_queued_constant_ram_dump
agc_recorder_stored_bytes
Validation IDs already present on main (4 IDs in 480 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (480 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 472 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (45)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fps_limit: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_o
Reproduce
git fetch origin 87e6918b69298b409595dba1f1a1a4f844b7f1e9 ba8dcc6ae82a5c4443efd93bbb99dfa91faf7fa4
git checkout ba8dcc6ae82a5c4443efd93bbb99dfa91faf7fa4 && git merge --no-ff 87e6918b69298b409595dba1f1a1a4f844b7f1e9
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 1, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head a814af0 merged onto main f2d874c · tested 2026-11-01 19:44 UTC · 28 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,489 passed · 11 failed (0 new, 9 also fail on main, 2 unstable on main) · 55 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,555 of 3,168 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (942 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_graphics_maps_fallback 71.1 s, ⚠️ agc_driver_graphics 70.9 s, ⚠️ public_headers 68.3 s, ⚠️ agc_driver_lazy_resolved_abi 46.9 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_job_manager_compute_capacity: failed in 4 of the last 5 main runs
agc_driver_pipeline_journal: failed in 3 of the last 5 main runs
Failing on main too (9, not counted against this PR)
agc_driver_guest_memory_lifetime_direct
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_depth_buffer_clear
agc_driver_native_depth_clears
agc_driver_native_multisample_depth
agc_idle_publish_wait
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (4, not in the main baseline's validation pass)
agc_driver_draw_pipeline_retired_items
agc_driver_dumped_constant_capture
agc_driver_queued_constant_ram_dump
agc_recorder_stored_bytes
Validation IDs already present on main (5 IDs in 480 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (480 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 472 more
VUID-vkCmdCopyImage-srcImage-01548 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (55)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_pipeline_binary_vulkan: skipped, the device lacks VK_KHR_pipeline_binary
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not 
Reproduce
git fetch origin a814af06eea95d51748bcc209817e1791134ff2d f2d874c1fdccf781c0fa5d86619bb5dd8894b958
git checkout f2d874c1fdccf781c0fa5d86619bb5dd8894b958 && git merge --no-ff a814af06eea95d51748bcc209817e1791134ff2d
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head a814af0 merged onto main f2d874c · tested 2026-11-01 20:00 UTC · 35 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,502 passed · 7 failed (0 new, 4 also fail on main, 3 unstable on main) · 46 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,555 of 3,168 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (942 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.2 s, ⚠️ agc_driver_lookup_log_fits_build 53.6 s, ⚠️ agc_driver_graphics 49.3 s, ⚠️ agc_driver_graphics_maps_fallback 40.3 s
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 1 of the last 10 main runs
agc_submit_progress: failed in 5 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 7 of the last 10 main runs
Failing on main too (4, not counted against this PR)
agc_driver_dcc_keys_first_write
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (4, not in the main baseline's validation pass)
agc_driver_draw_pipeline_retired_items
agc_driver_dumped_constant_capture
agc_driver_queued_constant_ram_dump
agc_recorder_stored_bytes
Validation IDs already present on main (5 IDs in 480 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (480 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 472 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (46)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_pipeline_binary_vulkan: skipped, the device lacks VK_KHR_pipeline_binary
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_fps_limit: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL
Reproduce
git fetch origin a814af06eea95d51748bcc209817e1791134ff2d f2d874c1fdccf781c0fa5d86619bb5dd8894b958
git checkout f2d874c1fdccf781c0fa5d86619bb5dd8894b958 && git merge --no-ff a814af06eea95d51748bcc209817e1791134ff2d
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi savvaniss,

#9898 (head a814af06ee) conflicts with main in three places, all simple: the [capture] profile line in ShaderMemory.cpp (take main's line and add your two known-value counters), the option list in Recorder.cpp's main() (keep both sides), and agc_driver_recorder_tests.cmake (add agc_recorder_stored_bytes next to main's new agc_window_import_unmap).

The merge builds, but your new agc_driver_queued_constant_ram_dump test fails against current main 7feb37ee3e (it passed on this head's GPU run on 1 Nov): "a capture after a queued dump drained the draw pipeline 1 times instead of reading the queued bytes". The drain does not come from the capture path you changed. It comes from Driver::validateVariant (Dispatch/VariantValidation.cpp, reached through lookupDraw from finishDraw), which still calls Drain(DrainReason::Capture) whenever a queued write overlaps variant.runs. With main's recent shader preparation and sharing changes, a later draw in the test now reuses a validated variant instead of capturing again, so it takes that path. Main's branch-read refusal is not involved (0 refused reads, 0 redone captures with APS5_PROFILE_DRAW=1).

Could you merge main and decide how variant validation should treat queued writes whose bytes are known (for example the same StoredBytes check you use in WriteEvidence.cpp), or adjust the test if the drain is acceptable there? Thanks.

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — changes requested

This pull request does not merge cleanly into main (d1ae628): head a814af0 conflicts in

  • core/libs/prx/libSceAgcDriver/Execution/src/ShaderMemory.cpp
  • core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
  • core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake

Please rebase it onto current main. I will review the change once it merges cleanly.

savvaniss and others added 2 commits November 3, 2026 09:18
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lap a cached variant

validateVariant drained the draw pipeline whenever a queued write overlapped
the variant's runs. When every overlapping queued item is a store whose bytes
the pipeline holds, the variant is now reported as differing, so the capture
serves the queued bytes. Other overlaps, and APS5_VERIFY_KNOWN_VALUES, still
drain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@savvaniss

Copy link
Copy Markdown
Contributor Author

Thanks, that was the cause. b8c3f25cdf merges main d1ae628bc2 (the three conflicts resolved as you described) and changes Driver::validateVariant: when every queued item over a variant's runs is a store whose bytes the pipeline holds, it returns Differing instead of draining, so the capture reads the queued bytes. Any other overlap, and APS5_VERIFY_KNOWN_VALUES, still drains.

Keeping the variant when its words match the queued store does not work: the data-word check after it reads guest memory, which still holds the old table, and draw 1 then wrote 64 instead of 255.

On Windows with an RX 9070 XT, with the validation layer and ANYPS5_NO_SHADER_CACHE=1: agc_driver_queued_constant_ram_dump fails on the merge without the change (1 capture drain). With the change it passes 3/3, and it also passes with APS5_VERIFY_KNOWN_VALUES=1. 49/49 of the draw-cache, draw-pipeline and recorder tests listed in the description pass, with no VUID-. Not run: main with the same set, Linux, or a paired trace.

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — approved

The three blocking findings from my last review are resolved: heap corruption, conflicts with main, and the VideoOut use-after-free. The new commits are the retired-item clears (0bc7829562), the wait in VideoOut Open (70d8cce27d), PROCMAP_QUERY (4647d9c464), the variant-validation recapture (b8c3f25cdf) and merges of main up to d1ae628bc2. They build and pass here, and the negative controls for the new and changed tests fail as expected.

What changed since my last review

Since 0a08a3b019:

  • 0bc7829562 empties the thread-local reclaim vectors before Enqueue returns, and adds agc_driver_draw_pipeline_retired_items.
  • 70d8cce27d (option B, as the maintainer chose) makes VideoOutDriver::Open call AgcDriverWaitIdle before it replaces a closed port's configuration. It also reworks video_out_flip_reopen and adds entries to the debt files.
  • 4647d9c464 adds a PROCMAP_QUERY ioctl path for the Linux page check, falling back to the text parse.
  • b8c3f25cdf: validateVariant returns Differing instead of draining when only queued stores overlap a cached variant. This answers oneandonlydean's report of 2026-11-03.
  • Merges of main, the latest d1ae628bc2. The description and the author's reply were updated to match.

What I ran

  • Head b8c3f25cdf9de1f0ef2b9300a15964f738a33808, main d1ae628bc2f62459cce1e9872ba5632c938c71f2, merged with --no-ff (no conflicts).
  • Machine: Debian 13 VM, 32 vCPU Xeon Gold 6136, GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6, LLVM 19), kernel 6.12, so the PROCMAP_QUERY path is the one exercised.
git diff --check d1ae628bc2f62459cce1e9872ba5632c938c71f2...b8c3f25cdf9de1f0ef2b9300a15964f738a33808
python3 tools/check_conventions.py --base d1ae628bc2f62459cce1e9872ba5632c938c71f2
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  ctest --test-dir build -j8 --test-load 32 -V -R "queued_constant_ram_dump|retired_items|dumped_constant_capture|unregistered_label|stored_bytes|video_out_flip_reopen|compute_pipeline_outside|draw_cache_reuse|vertex_table_read_order|^agc_driver_pm4$|^agc_driver$"
ctest --test-dir build --repeat until-fail:20 -R "^agc_driver_queued_constant_ram_dump$" --output-on-failure
# negative control (below), then restore and rebuild
ninja -C build -j32 -l32 agc_driver_draw_pipeline_retired_items_tests agc_driver_queued_constant_ram_dump_tests
ctest --test-dir build -R "^(agc_driver_draw_pipeline_retired_items|agc_driver_queued_constant_ram_dump)$" --output-on-failure
git status --porcelain
Check Result
git diff --check clean
check_conventions.py All conventions checks passed.
Script build + selected tests (build.json) build OK; 2204 ran, 0 new failures, 0 timeouts; 7 known failures that also fail on main
Script validation comparison 770/771 tests with the layer loaded, layer never reported missing, 0 new VUID- vs main
Focused set, validation layer 17 passed, 1 skipped (video_out_flip_reopen: no display for a Vulkan window, SDL offscreen); 0 VUID- lines, 0 missing-layer lines
agc_driver_queued_constant_ram_dump, 20 repeats 20/20 pass, no abort
Longest test in the focused set agc_driver 11.7 s

Negative control

  • VariantValidation.cpp restored from main, which removes b8c3f25cdf. agc_driver_queued_constant_ram_dump then fails with "a capture after a queued dump drained the draw pipeline 1 times instead of reading the queued bytes". That is the failure oneandonlydean reported.
  • In DrawPipeline.cpp, the two ClearOnExit guards were replaced by the old reclaim.clear() at the start of Enqueue (a targeted revert: restoring the whole file from main would also remove StoredBytes). agc_driver_draw_pipeline_retired_items then fails with "a retired draw pipeline item stayed in the enqueuing thread's storage after Enqueue returned".
  • I restored both files from the merged tree and rebuilt; both tests pass again, and git status --porcelain is empty.
  • video_out_flip_reopen skips on this machine, so I did not revert the VideoOut wait.

Previous findings

  1. Heap corruption in agc_driver_queued_constant_ram_dump: Resolved.
    • I did not reproduce the abort here, so I relied on the outcome: 20/20 repeats pass on Linux.
    • The cause in 0bc7829562 matches the __call_tls_dtors backtrace from my last review.
    • The clears at DrawPipeline.cpp:178 and :312 are covered by a new test that fails without them.
  2. Conflicts with main: Resolved. The head merges cleanly into d1ae628bc2. The needs rebase label looks stale.
  3. VideoOut buffer-label use-after-free: Resolved (code read; the test is author-reported).
    • VideoOutDriver::Open (core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp:411-438) releases the driver mutex and calls AgcDriverWaitIdle (:430). It loops until the same closed configuration is seen twice, so a concurrent Open is handled.
    • The limit is recorded in docs/dev/debt/libSceVideoOut.md, and the AGC side in docs/dev/debt/libSceAgcDriver.md.
    • video_out_flip_reopen skips here (no display). Its pass on Windows and its failure without the wait are as the author reports.
  4. Non-blocking 1, cost of the Linux page check: Resolved.
    • GuestBufferMemory.cpp:4486-4495 uses PROCMAP_QUERY with query_flags 0, so it asks for the VMA covering the address. It accepts read|write with no shared or exec bit and inode 0, and refuses on ENOENT. This matches the text path's rw-p/inode-0 rule.
    • Not caching the per-label import is a reasonable choice for the lifetime reason the author gives; I accept it.
  5. Non-blocking 2, perf evidence: Still open.
    • There is still no main/change pair on current upstream, and no traces: the author says they were lost.
    • The description now says that the numbers predate the follow-ups.
    • Whether this blocks a perf merge is the maintainers' call. Nothing new from me.

New findings

Blocking

None.

Non-blocking

  1. A queued store over a cached variant now always counts as a cache miss (core/libs/prx/libSceAgcDriver/Execution/src/Driver/Dispatch/VariantValidation.cpp:113-116).
    • What happens: QueuedWritesOver returns Stored for any overlap where every queued item is a store, even a partial one. validateVariant then reports Differing without looking at the bytes.
    • Why it matters: in the pattern this PR targets (the same descriptor table dumped before every draw), each such draw recaptures instead of reusing the variant. These misses are counted, and in the dispatch path traced, as "captured memory changed" (DispatchLookup.cpp:171-174). The draw-cache statistics then mix them with real content changes.
    • Correctness: it is correct, since the capture serves the queued bytes. The author explains why comparing against the queued bytes alone failed: the data-word check reads stale guest memory.
    • Suggested fix: report these misses under their own outcome or counter, so profiles can tell them apart. The cost of the recapture is not measured.
  2. The dispatch path of the variant-validation change has no test. b8c3f25cdf also changes DispatchLookup's use of validateVariant, but only the draw path is covered, by agc_driver_queued_constant_ram_dump. Consider a dispatch case that reads a queued dump through a cached dispatch variant.

Not verified

  • video_out_flip_reopen on this machine (it skips: no display for a Vulkan window). Its result is author-reported (Windows, AMD).
  • The PROCMAP_QUERY fallback text path. This kernel has the ioctl.
  • Windows, any non-lavapipe GPU, and any title. The speed claims and the cost of recapturing instead of reusing a variant.
  • ASan runs. My Linux evidence for the heap fix is 20 clean repeats plus the negative control of the new test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 3, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head f160886 merged onto main 4f41f4c · tested 2026-11-03 16:52 UTC · 22 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,767 passed · 4 failed (0 new, 3 also fail on main, 1 unstable on main) · 48 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,819 of 3,811 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (936 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (5, not in the main baseline's validation pass)
agc_driver_draw_pipeline_retired_items
agc_driver_dumped_constant_capture
agc_driver_queued_constant_ram_dump
agc_driver_unregistered_label_behind_write_back
agc_recorder_stored_bytes
Validation IDs already present on main (4 IDs in 512 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (512 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 504 more
VUID-vkCmdCopyImage-srcImage-01548 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, and 1 more
VUID-vkCmdCopyImage-srcImage-01551 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, and 1 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (48)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not co
Reproduce
git fetch origin f160886325478a9d2b3136547abb9269c9613654 4f41f4c375f5abb487dbd184fbc150f31994d762
git checkout 4f41f4c375f5abb487dbd184fbc150f31994d762 && git merge --no-ff f160886325478a9d2b3136547abb9269c9613654
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 3, 2026
@oneandonlydean
oneandonlydean merged commit b52e86f into boykopovar:main Nov 3, 2026
13 of 14 checks passed
@github-actions github-actions Bot removed the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 3, 2026
@savvaniss

Copy link
Copy Markdown
Contributor Author

@XairRrR thanks for the two non-blocking points. This PR merged before I got to them, so both are in #15703.

  1. Separate miss reason. validateVariant now returns EntryOutcome::QueuedStores for a variant overlapped only by queued stores. The draw cache counts it as DrawMiss::QueuedStores and the dispatch cache as queuedStores, and both 10 s reports print it as "recaptured over queued stores", so profiles no longer mix it with changed content. agc_driver_queued_constant_ram_dump checks that the draws count it, and fails when validateVariant returns Differing again.

  2. Dispatch path. I added a dispatch case: a queue-0 dispatch whose cached variant reads a V# from a table that a queued DUMP_CONST_RAM rewrites. It showed that no dispatch reaches this PR's branch:

    • Queue 0: the pipeline is drained at the dispatch packet before the lookup (PacketExecution.cpp:469 after an opened gate, otherwise Dispatch.cpp:160).
    • Other queues: DrawPipeline::Active() is false (it's thread-local, set only on queue 0's worker), so validateVariant doesn't check queue 0's pipeline at all.
    • Branch removed: the case still passes.
    • Both packet drains removed: the dispatch reaches the branch and recaptures with no drain. With the branch also removed, it fails at its capture-drain check.

    So, as merged, the change affects only draws. feat(agc): count cache recaptures over queued stores as their own miss reason #15703 has the runs (RX 9070 XT, validation layer, 26 focused tests on main and the branch, no VUID- line).

AI-assisted: yes (Claude Code)

oneandonlydean pushed a commit that referenced this pull request Nov 8, 2026
…s reason

Since #9898, a cached variant whose runs only queued stores overlap is
recaptured instead of drained, and validateVariant reported that as Differing,
so the draw and dispatch caches counted those misses as changed content. It now
returns QueuedStores. The draw cache counts it as DrawMiss::QueuedStores and the
dispatch cache as queuedStores, both report it on its own, the dispatch trace
names it, and the dispatch differing classification leaves it out. Nothing else
changes.

agc_driver_queued_constant_ram_dump checks that the draws count such a miss,
and adds a dispatch whose cached variant reads a descriptor table that a queued
DUMP_CONST_RAM rewrites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf Performance change unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants