Skip to content

fix(agc): wait for address-based writers before reading indirect draw records - #17850

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
adam25136:fix/agc-lease-cpu-reads
Nov 15, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
adam25136:fix/agc-lease-cpu-reads

Conversation

@adam25136

@adam25136 adam25136 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What

The driver reads some indirect draw records and counts on the CPU. These reads now first finish the earlier batches whose address-based builds can store to guest memory, as the CPU read of DISPATCH_INDIRECT arguments has done since #6786.

An address-based store (FLAT/GLOBAL, or through a descriptor the recompiler cannot resolve to a static buffer) is not recorded as a pending write: its batch holds a lease on the registered allocations, and the flush hook does not wait for it. So these reads could see guest memory from before such a store ran:

  • the CPU path in Driver::finishDraw (Execution/src/Driver/Draw/Draw.cpp), for the draws ClassifyIndirectDraw keeps off the GPU (for example an indexed draw without INDEX_BUFFER_SIZE);
  • the empty-draw skip in Driver::draw, where a stale zero count or stale empty records skip the draw;
  • the device's fallback in prepareDraw (Graphics/src/Draw.cpp), when the GPU does not read the records.

Only leases whose build can store are waited for. CountLeaseOutcome takes !ShaderResources::BdaReadOnly(), based on the bdaReadOnly flag WriteBack already uses to decide whether an address-based build breaks proofs. It comes from a scan of each stage's SPIR-V for stores and atomics through PhysicalStorageBuffer pointers; unreadable SPIR-V counts as storing. Graphics::FinishLeaseWrites finishes the recorder up to the newest such batch. The two driver sites take GpuMutex only while LeaseWritesMayBePending() reports a storing lease counted since the last such wait, so the queue thread stays off the mutex otherwise. FinishLeaseWork and FinishLeaseWrites share their submit-and-finish step (finishLeaseBatches). LeaseStats::writing counts the leases that can store, shown in the [address-sync] profile line.

The debt entry "CPU reads behind an address-based build" is cut to the reads that still do not wait: the non-indexed copy kernel's count record (oneandonlydean showed on #13599 that it is read without the lease wait), the record recordMeshArguments reads while recording, the awaitsTitle/orderReleased checks, and the draw reads behind a draw that queue 0's draw pipeline (on by default) has queued but not yet recorded. Such a draw counts its lease only when recorded, and DrawWriteRanges gives the pipeline no range for its address-based stores. That gap is left for a separate change.

New test IndirectDrawPendingProducer.cpp (agc_driver_indirect_draw_pending_producer, its _draw_pipeline and _plan_verify variants, and _gpu_indirect_disabled with APS5_NO_GPU_INDIRECT_DRAW=1). A one-thread compute dispatch writes the draw record or count with global_store_dwordx3, then a draw of a triangle covering the target follows. Every writer case checks that the producer's lease was deferred and counted as able to store, that the store landed, that every pixel was drawn, and that the draw took the expected path once without being skipped as empty. The cases: records the GPU reads; an indexed draw without INDEX_BUFFER_SIZE; an indexed count-indirect multi-draw whose count the empty-draw skip reads; a draw behind a dispatch that only loads through an address (global_load_dword), whose lease must not be counted as able to store; and, in _gpu_indirect_disabled, a draw the device's fallback reads. A producer on a compute queue behind a label wait was tried and left out: with the two driver waits reverted it still passed in all three registrations that run it, so it does not reliably show the bug.

No title has been seen to read such memory here; the change and the test come from the debt entry.

Overlap: tools/pr_overlap.py --branch (in a full clone, 1,978 open pull requests) lists four that change lines here:

It could not compare 75 more that conflict with main. In GitHub's patch of each, context lines included:

Tested

Windows 10 Pro 22H2 (19045), i9-12900KF, NVIDIA GeForce RTX 5080 (10de:2c02, driver 621.14), WinLibs GCC 15.2.0, Release, BUILD_TESTING=ON, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1. Head c95426ff42 merged onto main 52c33518f8 unless stated.

  • The new test, ctest -R '^agc_driver_indirect_draw_pending_producer' -V: all four registrations pass, each log with Selected GPU name=NVIDIA GeForce RTX 5080.
  • With parts of the change removed (each reverted afterwards, and the test exe rebuilt each time so the libSceAgcDriver.prx staged next to it was the one just built):
Removed Fails
the three waits the records and count cases (all three registrations that run them) and _gpu_indirect_disabled
the wait in the empty-draw skip the count case
the wait in finishDraw the records case
the wait in prepareDraw _gpu_indirect_disabled
writes forced to true the read-only case
writes forced to false every writer case

These ran on this change before its rebase onto 52c33518f8; the 27 commits it moved over change no libSceAgcDriver file.

  • Reverting only Execution/src/Driver/Draw/Draw.cpp (the two driver waits) in the merge: 3 of the 4 registrations fail; _gpu_indirect_disabled, which the prepareDraw wait covers, passes. Restored, all 4 pass.
  • agc_driver_pipelined_indirect_draw, agc_driver_indirect_arguments_pending_producer, agc_driver_indexed_copy_gpu_parameters, agc_driver_queued_indirect_read_order and agc_driver_empty_indirect_skip pass.
  • Selected tests: tools/select_tests.py picks 2,685 tests for the changed files, and select_tests.py ctest build --parallel 4 --timeout 120 on the merge fails 3. Two of them, agc_driver_quad_pixel_mask (AGC: agc_driver_quad_pixel_mask samples the wrong mip level under a partial quad mask on Windows (RTX 5060 Ti and Radeon 860M) #14237) and guest_kernel_sys_paths_symlinkat_patched (a timeout), fail in main 52c33518f8's full suite on this machine too (4,824 tests; it also times out guest_kernel_sys_paths_symlinkat, which is not selected). The third, agc_driver_unregistered_label_on_gpu, passed three reruns. It fails on main too, now and then, with the same message ("the label held 0x00000000 when a later label had landed"): run alternately, 1 of 150 runs on main and 2 of 150 with this change failed (2 of 579 on main overall). From its code, it reaches none of the changed functions. The 13 tests that skip skip on main too.
  • Validation: the selected tests matching ^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu (1,594 on the merge, 1,597 in main's run), through ctest -V --parallel 4 with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (1.4.367) and VK_LOADER_LAYERS_DISABLE=~implicit~; all pass except agc_driver_quad_pixel_mask on both sides. Neither log has a VUID- line or was not found but was requested by env var VK_INSTANCE_LAYERS. Both have the same 61 Undefined-Value-ShaderOutputNotConsumed/OutputNotWritten warnings in the same 14 tests, and the four new registrations have none. A rerun of them on this head with VK_LOADER_DEBUG=layer shows Insert instance layer "VK_LAYER_KHRONOS_validation" 8 times.
  • Built again with -DANYPS5_ENABLE_SPIRV_TOOLS=ON (as the Linux CI job builds): the four registrations pass in three runs, 1.47 to 1.61 s each.
  • python tools/check_test_registration.py build and python tools/check_conventions.py --base origin/main (with this title and description) pass.
  • Rebased onto main e37e9fa3f9 before opening (head 03334ebfd3, c95426ff42 with the debt entry's last sentence reworded); none of the 48 commits since 52c33518f8 touches libSceAgcDriver or the debt file, and the four registrations pass there.
  • Planet Zoo (PPSA18026), three pairs in alternating order on main 84f4ad4f06, with an earlier head of this change whose library code differs only in names, this profile line's wording and the shared helper; APS5_PROFILE_DRAW=1 APS5_TRACE_SUMMARY_EVERY=30 APS5_TRACE_BENCH=1 APS5_LOG_TIMESTAMPS=1, 3 to 3.5 minutes of the same scene each, both sides carrying one local line, sceAjmInitialize comparing only the low 32 bits of its reserved argument as fix(libSceAjm.native): stop checking sceAjmInitialize's reserved #16974 first proposed (it now drops the check; without the line this title faults in its Render thread). In every run with the change, the [address-sync] line counts 934 to 1,215 deferred leases and none by a build that stores through addresses, so the two driver sites never took the mutex. Frame times differed between runs of the same build by up to 13%, and between the two sides by less in both directions (mean 493.8 ms per present with the change, 499.3 without, after the first 60 s).

Not covered: AMD and Intel GPUs, Linux (the test's mmap allocation path is not run here), a PS5, a title whose address-based stores these waits catch, and the four reads the debt entry keeps open.

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: none
  • GPUs tested: NVIDIA GeForce RTX 5080, driver 621.14, Windows 10 22H2 (19045)
  • AI-assisted: yes

🤖 Generated with Claude Code

… records

An address-based store is not a pending write: its batch holds a lease
that the flush hook does not wait for. The driver's CPU reads of indirect
draw records and counts (the finishDraw CPU path, the empty-draw skip and
prepareDraw's device fallback) now first finish the batches whose leases
come from builds that can store through addresses (not BdaReadOnly), as
the DISPATCH_INDIRECT CPU read does with FinishLeaseWork. The queue-thread
sites take GpuMutex only while such a lease may be unfinished.
FinishLeaseWork and the new FinishLeaseWrites share the submit-and-finish
step. LeaseStats counts the leases that can store. The debt entry is cut
to the reads that still do not wait.

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

github-actions Bot commented Nov 9, 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 1368 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 1896 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
PR 4040 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4448 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 4472 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 4847 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5609 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6280 docs/dev/debt/libSceAgcDriver.md
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 6804 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 7002 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7275 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 7449 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7464 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7643 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8004 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 8246 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 9335 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9356 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9387 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9508 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 9895 docs/dev/debt/libSceAgcDriver.md
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 10049 docs/dev/debt/libSceAgcDriver.md
PR 10193 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10359 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10442 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 10652 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 10678 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 10743 docs/dev/debt/libSceAgcDriver.md
PR 10867 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11435 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11436 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11452 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 11483 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 11825 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 12157 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12828 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 12904 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13148 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13809 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13863 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13920 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13928 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13929 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13963 docs/dev/debt/libSceAgcDriver.md
PR 14032 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 14217 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14218 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 14944 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 15296 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15343 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 15456 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 15529 docs/dev/debt/libSceAgcDriver.md
PR 15548 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 15570 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15621 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 16483 docs/dev/debt/libSceAgcDriver.md
PR 16753 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 16831 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 17338 docs/dev/debt/libSceAgcDriver.md
PR 17611 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 17915 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 17943 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 17956 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 18029 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 18173 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 18388 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 18390 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 18515 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 19100 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 19119 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 19351 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 19722 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 19883 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
PR 20156 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 20187 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
docs/dev/debt/libSceAgcDriver.md
PR 20315 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cpp
core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp

@EagleBearerYS

Copy link
Copy Markdown
Contributor

On the order with #12840 (BDA stores into writable heap mirrors), which conflicts with this PR only in docs/dev/debt/libSceAgcDriver.md: this PR can go first, and #12840 resolves the conflict after it. The merge keeps this PR's rewritten "CPU reads behind an address-based build" entry, followed by #12840's two entries. The code merges without a conflict.

Both PRs change how GuestBufferMemory.cpp handles builds that store through addresses (FLAT/GLOBAL), so #12840 runs this PR's agc_driver_indirect_draw_pending_producer and agc_driver_indirect_draw_pending_producer_gpu_indirect_disabled with its store pages on the merged tree.

#12840's checklist will say Depends on: #17850 (merge order only).

@adam25136

Copy link
Copy Markdown
Contributor Author

@EagleBearerYS I agree with the order you proposed ("this PR can go first, and #12840 resolves the conflict after it"). tools/pr_overlap.py --branch, run on this branch before it was opened (head c95426ff42 on main 52c33518f8), also found #12840 conflicting with it only in docs/dev/debt/libSceAgcDriver.md (L262, the entry this PR rewrites), and in no code file. This PR doesn't need #12840, so its Depends on stays none.

AI-assisted: yes. Claude Code ran tools/pr_overlap.py and drafted this reply; a separate review agent checked it.

@JJenkx

JJenkx commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Windows GPU check of head 03334ebfd3, merged onto main 4b71464421 (e111295fca, clean merge). Run through the Windows FIFO, job f066636abde246a4940ebb2b96eb501a, exit 0 with cleanup verified.

Setup: Windows 11 Enterprise 22621, AMD Radeon RX 6700 XT (driver 32.0.21045.16010), WinLibs GCC 15.2 UCRT, Release, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1.

These four tests pass in 3 of 3 runs each, 12 of 12, none skipped:

  • agc_driver_indirect_draw_pending_producer
  • agc_driver_indirect_draw_pending_producer_draw_pipeline
  • agc_driver_indirect_draw_pending_producer_plan_verify
  • agc_driver_indirect_draw_pending_producer_gpu_indirect_disabled

All 408 test and .prx hashes matched the prepared build when the job started.

AI-assisted: yes.

@oneandonlydean
oneandonlydean merged commit db17ef2 into boykopovar:main Nov 15, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants