Skip to content

feat(libSceAgcDriver): GPU-readback staging for writable-copy write-back - #23596

Open
nydal91 wants to merge 1 commit into
boykopovar:mainfrom
nydal91:wolverine-copy-readback-writeback
Open

nydal91 wants to merge 1 commit into
boykopovar:mainfrom
nydal91:wolverine-copy-readback-writeback

Conversation

@nydal91

@nydal91 nydal91 commented Nov 19, 2026

Copy link
Copy Markdown

What

RecordCopyBacks GPU-copies a writable copy region of at least APS5_COPY_READBACK_MIN_KIB (default 64 KiB) into a staging buffer at completion, and WriteBack diffs that staging instead of the write-combined copy buffer, so a large descriptor write-back no longer reads uncached memory at ~10 MiB/s. The heap-mirror readback path is unchanged (same eligibility, same RecordReadback); the loop is restructured to serve both kinds from one merged-writes pass. APS5_TRACE_COPY_BACKS traces, once per range of at least 1 MiB, why a readback was or was not recorded; APS5_TRACE_BIGBUF write-back lines gain readback=. The staging uses the default HOST_VISIBLE|HOST_COHERENT memory type: Context::BufferMemoryType prefers cached GTT but falls back to the non-cached VRAM aperture when that heap's budget is exhausted, so APS5_HOST_IMPORT_MIB must leave headroom (5000 MiB on a 16 GB / 8 GiB-GTT box; 6000 fills GTT and the stall returns). Debt fragment records the headroom sensitivity and the unmeasured console equivalence.

Tested

Linux PikaOS 4 (kernel 7.3.3), Intel Core Ultra 7 265KF, AMD Radeon RX 6950 XT (RADV Mesa 26.3.0), Vulkan 1.4.363, validation layer 1.4.363.

  • Focused ctest A/B, main (7c83656) vs this branch, same machine/GPU: ctest --test-dir build -R "agc_driver_.*(copy|write_back|writeback|staging|bigbuf|mirror)" -V --timeout 300 with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer. Both logs show Insert instance layer "VK_LAYER_KHRONOS_validation" (51 inserts each) and no missing-layer line; 36/36 passed in both arms, zero VUID- errors in either, no new VUID types or test+VUID pairs (work/vuid_compare.py comparison; logs kept locally, available on request).
  • Title run, Marvel's Wolverine PPSA03671 v01.001.005, 300 s at APS5_HOST_IMPORT_MIB=5000, 1920x1080 fifo: the 248 MiB descriptor write-back runs 110x with readback=1 and no stall; at 6000 MiB GTT fills and the ~10 MiB/s stall returns (frame ~490), as the debt fragment records.
  • Supplementary: the same code inside a fuller local bring-up stack passed a 6047-test ctest comparison against main with zero VUID- validation errors in either arm.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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: AMD Radeon RX 6950 XT, RADV Mesa 26.3.0, Linux PikaOS 4 (kernel 7.3.3)
  • AI-assisted: yes

RecordCopyBacks GPU-copies a writable copy region of at least
APS5_COPY_READBACK_MIN_KIB into a staging buffer at completion, and WriteBack
diffs that staging instead of the write-combined copy buffer, so a large
descriptor write-back no longer reads uncached memory at ~10 MiB/s.
APS5_TRACE_COPY_BACKS traces the per-range decision; APS5_TRACE_BIGBUF reports
readback=. The staging prefers cached GTT but falls back to the non-cached VRAM
aperture when GTT is full, so APS5_HOST_IMPORT_MIB must leave headroom (5000 MiB
on a 16 GB / 8 GiB-GTT box; 6000 fills it and stalls again).

Verified on Marvel's Wolverine (PPSA03671 v01.001.005): the 248 MiB write-back
runs 110x with readback=1 and no stall at 5000 MiB; at 6000 MiB GTT fills and
the ~10 MiB/s stall returns. Heap-mirror readback behaviour is unchanged.

Debt: docs/dev/debt/changes/wolverine-copy-readback-writeback.md
@nydal91

nydal91 commented Nov 19, 2026

Copy link
Copy Markdown
Author

Focused ctest A/B results (same machine/GPU, sequential runs, validation layer 1.4.363):

 1/36 Test #1497: agc_driver_alias_copy_label Passed    0.43 sec
 2/36 Test #1503: agc_driver_bc_block_copy Passed    0.19 sec
 3/36 Test #1540: agc_driver_copied_writer_copy Passed    0.12 sec
 4/36 Test #1542: agc_driver_copy_input_lifetime Passed    0.12 sec
 5/36 Test #1543: agc_driver_copy_surface_bytes Passed    0.28 sec
 6/36 Test #1554: agc_driver_depth_compare_copy Passed    0.18 sec
 7/36 Test #1555: agc_driver_depth_copy_draw Passed    0.25 sec
 8/36 Test #1794: agc_driver_image_srgb_sample_copy Passed    0.15 sec
 9/36 Test #1817: agc_driver_indexed_copy Passed    1.39 sec
10/36 Test #1818: agc_driver_indexed_copy_gpu_parameters Passed    0.28 sec
11/36 Test #1831: agc_driver_label_after_import_copy Passed    0.13 sec
12/36 Test #1935: agc_driver_period_copy Passed    0.24 sec
13/36 Test #1939: agc_driver_pipelined_clock_copy Passed    0.01 sec
14/36 Test #1997: agc_driver_recorded_draw_staging ***Skipped   0.21 sec
15/36 Test #2013: agc_driver_resident_heap_mirror Passed    0.40 sec
16/36 Test #2081: agc_driver_stencil_copy_draw Passed    0.24 sec
17/36 Test #2093: agc_driver_storage_guest_copy_release Passed    0.13 sec
18/36 Test #2097: agc_driver_storage_write_back_no_window Passed    0.13 sec
19/36 Test #2098: agc_driver_storage_write_back_overhang Passed    0.25 sec
20/36 Test #2101: agc_driver_stream_copy Passed    1.59 sec
21/36 Test #2105: agc_driver_table_copy Passed    0.28 sec
22/36 Test #2118: agc_driver_unregistered_label_behind_write_back Passed    0.13 sec
23/36 Test #2295: agc_driver_copied_writer_copy_draw_pipeline Passed    0.12 sec
24/36 Test #2296: agc_driver_copied_writer_copy_plan_verify Passed    0.12 sec
25/36 Test #2298: agc_driver_copy_surface_bytes_no_alias Passed    0.27 sec
26/36 Test #2317: agc_driver_depth_plane_partial_store_image_copy Passed    0.14 sec
27/36 Test #2318: agc_driver_depth_plane_partial_store_buffer_copy Passed    0.14 sec
28/36 Test #2446: agc_driver_frame_replay_rewind_copy Passed    0.81 sec
29/36 Test #2539: agc_driver_pm4_rewind_copy Passed    0.01 sec
30/36 Test #2551: agc_driver_guest_memory_lifetime_copy Passed    0.11 sec
31/36 Test #2578: agc_driver_image_srgb_sample_copy_forced Passed    0.14 sec
32/36 Test #2596: agc_driver_image_table_reuse_retaken_mirrored_depth_surface Passed    0.15 sec
33/36 Test #2725: agc_driver_period_copy_no_hle Passed    0.25 sec
34/36 Test #3056: agc_driver_storage_write_back_overhang_draw_pipeline Passed    0.23 sec
35/36 Test #3057: agc_driver_storage_write_back_overhang_plan_verify Passed    0.26 sec
36/36 Test #3128: agc_driver_small_copy_sync Passed    0.21 sec

main:   layer inserts 51, missing-layer lines 0, totals ('100', '0', '36')
change: layer inserts 51, missing-layer lines 0, totals ('100', '0', '36')
distinct VUIDs: main 0, change 0
NEW VUID types in change: 0
NEW test+VUID pairs in change: 0
failed/timeout tests: main 0, change 0

Overlap disclosure: pr_overlap.py --branch failed closed (154 open PRs share files, all uncomparable against base). Manual pass over the 36 that share GuestBufferMemory.cpp/.hpp: none implements copy-readback staging for writable copies (--names on RecordCopyBacks, WriteBack, copyReadbackMinBytes, copyReadbacks also clean). Line-level merge coordination only: #12840 edits the adjacent heap-mirror write-back path in WriteBack, #15296 changes the recorder.Keep call on the heap-mirror staging line this PR restructures; #9852/#13863/#13920 add call sites or tests, #20315 debt prose. The heap-mirror readback behaviour is unchanged by this PR.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@nydal91 I read 16a62f7. Staging the copy through a GPU readback is a sound direction for the 248 MiB Wolverine write-back, and the 36 existing ctests passing A/B is good. Before this can pass I need these:

  1. A test where a writable copy of 64 KiB or more writes back through the staging buffer, and that fails without the change. agc_driver_recorded_draw_staging was skipped in your run, so nothing exercises the new path yet.
  2. The length mismatch: as I read it the readback covers up to min(end, bufferEnd), which can be shorter than the WriteBack range. The non-sparse path then throws on the Require, and the sparse path subspans with no size check. Please clamp the write-back range to what was read back, or check the size before subspan.
  3. The staging buffer: every completion allocates up to 248 MiB, adds an ALL_COMMANDS to TRANSFER barrier and does a device-to-host copy. Please reuse the buffer across frames and use cached host memory, since you saw the stall return at 6000 MiB when it fell back to the non-cached aperture.
  4. The APS5_TRACE_COPY_BACKS trace block (static mutex and set) and its env doc are unrelated to this change. Please drop them.

Since this runs for any title with a writable copy of 64 KiB or more, please also add paired PPSA21564 runs inside a perf window with frame time and GPU time with and without the change, against its noise floor, and one more title that hits this path. #12840 and #15296 touch the same lines, so a rebase may be needed.

@Jazeupoi Jazeupoi 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.

Tested on NVIDIA, since the description's runs are on RADV.

Setup: Windows 11 Pro (build 26300), AMD Ryzen 5 3400G, NVIDIA GeForce RTX 2060 (driver 621.24), WinLibs GCC 15.2.0 r7, Release. Base main cac6e5714d with #22373 (it only adds setenv for the AGC tests on Windows); "this PR" is the same tree with head 16a62f705a merged. Your focused set, ctest -R "agc_driver_.*(copy|write_back|writeback|staging|bigbuf|mirror)" -V -j1 (36 tests), 3 runs each, with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1:

result layer inserted not found lines VUID-
base 36/36, 3/3 runs 51 per run 0 0
this PR 36/36, 3/3 runs 51 per run 0 0

To check that the new path runs on this driver, one more run of the same set on this PR with APS5_TRACE_COPY_BACKS=1: two ranges of at least 1 MiB took the staging readback (code=6, writable buffer region, not a heap mirror), a 16 MiB range in agc_driver_indexed_copy and one in agc_driver_stream_copy, and both tests passed. Ranges between 64 KiB and 1 MiB are not traced, so I can't say how many of those took it.

On point 1 of the review above: on this machine agc_driver_recorded_draw_staging runs and passes on both arms (it is not skipped), and the two existing tests above already send a 16 MiB writable copy through the staging buffer. None of the 36 fails on the base, though, so this does not give the failing-without-the-change test that was asked for.

AI-assisted: yes (Claude Code)

@MarcZX10 MarcZX10 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 — no blocking findings

The changed code and documentation were inspected at head 16a62f705a2d90f2911c9c8eff66c96a7bef0326; I found no verified blocking defect.

What I ran

I inspected the prepared diff and the relevant changed-file sections using the pinned repository reader. No build or tests were run.

Results

Check Result Note
Changed-code review passed All four changed files inspected
Build and tests not run No command execution available
Negative control not run No test harness run

Findings

Blocking

None.

Non-blocking

None.

Sources

Changed implementation at the reviewed head

Not verified

Build and test results were not independently verified. The description reports test runs and performance observations; console equivalence is stated as unmeasured. The full GuestBufferMemory.cpp text was excluded from the review bundle; its changed sections were read through the pinned reader. The other changed files were read in the included bundle or at their changed sections.

To get this to a good state

Nothing is required.

@domx4q

domx4q commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Ran the focused copy/write-back set from the Tested section with the Khronos validation layer on Linux and an NVIDIA GPU, since CI runs the GPU tests only on lavapipe.

Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release, NVIDIA GeForce RTX 4090 (vendor 0x10de, device 0x2684, Ada), proprietary driver 620.70.06, Vulkan 1.4.357, Khronos validation layer 1.4.363.1. Head 16a62f705a is based on a newer main, so its one commit was cherry-picked onto main ded746ea12 (clean, as ea206b8967). Main baseline is a Release build of ded746ea12 on the same machine.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer \
ctest --test-dir build -R 'agc_driver_.*(copy|write_back|writeback|staging|bigbuf|mirror)' -V --timeout 300
main ded746ea12 this PR
Result 36 of 36 passed 36 of 36 passed
Insert instance layer "VK_LAYER_KHRONOS_validation" 51 51
was not found but was requested by env var VK_INSTANCE_LAYERS 0 0
VUID- none none

No test skips on either side; agc_driver_recorded_draw_staging runs and passes here. To see whether the new path runs at all, I repeated the PR run with APS5_TRACE_COPY_BACKS=1: agc_driver_indexed_copy and agc_driver_stream_copy each record one writable-copy readback (code=6, 0x1000400 and 0x1000800 bytes, direct=0 mirror=0 gpuCopy=0 buffer=1 writable=1) at the default 64 KiB threshold, and both pass with the layer on and no VUID-. With APS5_COPY_READBACK_MIN_KIB=0, so every writable copy goes through the staging buffer, all 36 still pass with no VUID-. Both tests also pass on main, so this shows the staging write-back gives the same results under validation, not that a test fails without the change (point 1 of the review still stands).

No new VUID- errors; all focused tests pass on Ada.

AI-assisted: yes (Claude Code)

@EagleBearerYS

Copy link
Copy Markdown
Contributor

On the order with #12840 (BDA stores into writable heap mirrors), which conflicts with this PR in one hunk of GuestBufferMemory.cpp's RecordCopyBacks: both change the loop that records the heap-mirror readbacks. Since your Wolverine bring-up builds on #12840, #12840 can go first, and this PR then resolves the conflict keeping both sides. If this PR lands first, #12840 takes the same resolution in its next merge of main.

The two compose. #12840 runs the loop over declaredReadbacks, the declared writes without the spans it adds for stores through an address, and those spans only cover writable heap mirrors. This PR's writable-copy branch (mirror == nullptr) therefore sees the same writes either way. The merged hunk is this PR's restructured loop, with its heapMirror/writableCopy branches and traces, iterating #12840's declaredReadbacks, and with #12840's AddressStoreTallies().readbackBytes line kept in the heapMirror branch under addressStores. WriteBack and the rest of the file merge without conflicts.

Whichever goes second runs #12840's agc_driver_bda_store_heap_mirror* tests and this PR's copy write-back tests on the merged tree.

@github-actions

github-actions Bot commented Nov 20, 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 1896 docs/dev/ENVIRONMENT.md
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4472 docs/dev/ENVIRONMENT.md
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6924 docs/dev/ENVIRONMENT.md
PR 7275 docs/dev/ENVIRONMENT.md
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 7643 docs/dev/ENVIRONMENT.md
PR 8246 docs/dev/ENVIRONMENT.md
PR 9289 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 docs/dev/ENVIRONMENT.md
PR 9387 docs/dev/ENVIRONMENT.md
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 9712 docs/dev/ENVIRONMENT.md
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 10492 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 10497 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 11435 docs/dev/ENVIRONMENT.md
PR 12157 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12324 docs/dev/ENVIRONMENT.md
PR 12544 docs/dev/ENVIRONMENT.md
PR 12746 docs/dev/ENVIRONMENT.md
PR 12827 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12849 docs/dev/ENVIRONMENT.md
PR 12863 docs/dev/ENVIRONMENT.md
PR 12944 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13148 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13809 docs/dev/ENVIRONMENT.md
PR 13863 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 13920 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 14260 docs/dev/ENVIRONMENT.md
PR 14262 docs/dev/ENVIRONMENT.md
PR 15295 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15296 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15297 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15456 docs/dev/ENVIRONMENT.md
PR 15529 docs/dev/ENVIRONMENT.md
PR 15548 docs/dev/ENVIRONMENT.md
PR 15570 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 16217 docs/dev/ENVIRONMENT.md
PR 16354 docs/dev/ENVIRONMENT.md
PR 16371 docs/dev/ENVIRONMENT.md
PR 16372 docs/dev/ENVIRONMENT.md
PR 16427 docs/dev/ENVIRONMENT.md
PR 16793 docs/dev/ENVIRONMENT.md
PR 16831 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 16953 docs/dev/ENVIRONMENT.md
PR 17259 docs/dev/ENVIRONMENT.md
PR 17261 docs/dev/ENVIRONMENT.md
PR 17555 docs/dev/ENVIRONMENT.md
PR 17556 docs/dev/ENVIRONMENT.md
PR 17557 docs/dev/ENVIRONMENT.md
PR 17558 docs/dev/ENVIRONMENT.md
PR 17611 docs/dev/ENVIRONMENT.md
PR 17719 docs/dev/ENVIRONMENT.md
PR 17729 docs/dev/ENVIRONMENT.md
PR 17943 docs/dev/ENVIRONMENT.md
PR 18029 docs/dev/ENVIRONMENT.md
PR 18082 docs/dev/ENVIRONMENT.md
PR 18173 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 18226 docs/dev/ENVIRONMENT.md
PR 18293 docs/dev/ENVIRONMENT.md
PR 18693 docs/dev/ENVIRONMENT.md
PR 18829 docs/dev/ENVIRONMENT.md
PR 20041 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 20172 docs/dev/ENVIRONMENT.md
PR 20248 docs/dev/ENVIRONMENT.md
PR 20518 docs/dev/ENVIRONMENT.md
PR 20519 docs/dev/ENVIRONMENT.md
PR 20580 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 21211 docs/dev/ENVIRONMENT.md
PR 21303 docs/dev/ENVIRONMENT.md
PR 21460 docs/dev/ENVIRONMENT.md
PR 21649 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 22025 docs/dev/ENVIRONMENT.md
PR 22071 docs/dev/ENVIRONMENT.md
PR 22190 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 22424 docs/dev/ENVIRONMENT.md
PR 22434 docs/dev/ENVIRONMENT.md
PR 22546 docs/dev/ENVIRONMENT.md
PR 22550 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 22647 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 22692 docs/dev/ENVIRONMENT.md
PR 22697 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 22944 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 23234 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 23242 docs/dev/ENVIRONMENT.md
PR 23244 docs/dev/ENVIRONMENT.md
PR 23739 docs/dev/ENVIRONMENT.md
PR 23811 docs/dev/ENVIRONMENT.md
PR 23975 docs/dev/ENVIRONMENT.md
PR 24176 docs/dev/ENVIRONMENT.md
PR 24327 docs/dev/ENVIRONMENT.md
PR 24445 docs/dev/ENVIRONMENT.md
PR 24510 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 24523 docs/dev/ENVIRONMENT.md
PR 24661 docs/dev/ENVIRONMENT.md
PR 24714 docs/dev/ENVIRONMENT.md
PR 24735 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 24756 docs/dev/ENVIRONMENT.md
PR 24936 docs/dev/ENVIRONMENT.md
PR 25534 docs/dev/ENVIRONMENT.md
PR 25703 docs/dev/ENVIRONMENT.md
PR 26365 docs/dev/ENVIRONMENT.md
PR 26613 docs/dev/ENVIRONMENT.md
PR 26686 docs/dev/ENVIRONMENT.md
PR 26802 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 26819 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 26913 docs/dev/ENVIRONMENT.md
PR 27133 docs/dev/ENVIRONMENT.md
PR 27164 docs/dev/ENVIRONMENT.md
PR 27288 docs/dev/ENVIRONMENT.md
PR 27451 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 27471 docs/dev/ENVIRONMENT.md
PR 27688 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 27811 docs/dev/ENVIRONMENT.md
PR 27833 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 27864 docs/dev/ENVIRONMENT.md
PR 27872 docs/dev/ENVIRONMENT.md
PR 27887 docs/dev/ENVIRONMENT.md
PR 27984 docs/dev/ENVIRONMENT.md
PR 28043 docs/dev/ENVIRONMENT.md
PR 28051 docs/dev/ENVIRONMENT.md
PR 28059 docs/dev/ENVIRONMENT.md
PR 28077 docs/dev/ENVIRONMENT.md
PR 28102 docs/dev/ENVIRONMENT.md
PR 28119 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28140 docs/dev/ENVIRONMENT.md
PR 28142 docs/dev/ENVIRONMENT.md
PR 28150 docs/dev/ENVIRONMENT.md
PR 28166 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28186 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28193 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28240 docs/dev/ENVIRONMENT.md
PR 28252 docs/dev/ENVIRONMENT.md
PR 28289 docs/dev/ENVIRONMENT.md
PR 28293 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28295 docs/dev/ENVIRONMENT.md
PR 28296 docs/dev/ENVIRONMENT.md
PR 28299 docs/dev/ENVIRONMENT.md
PR 28332 docs/dev/ENVIRONMENT.md
PR 28333 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28372 docs/dev/ENVIRONMENT.md
PR 28384 docs/dev/ENVIRONMENT.md
PR 28387 docs/dev/ENVIRONMENT.md
PR 28390 docs/dev/ENVIRONMENT.md
PR 28391 docs/dev/ENVIRONMENT.md
PR 28411 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 28427 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28434 docs/dev/ENVIRONMENT.md
PR 28470 docs/dev/ENVIRONMENT.md
PR 28476 docs/dev/ENVIRONMENT.md
PR 28487 docs/dev/ENVIRONMENT.md
PR 28488 docs/dev/ENVIRONMENT.md
PR 28490 docs/dev/ENVIRONMENT.md
PR 28590 docs/dev/ENVIRONMENT.md
PR 28622 docs/dev/ENVIRONMENT.md
PR 28624 docs/dev/ENVIRONMENT.md
PR 28631 docs/dev/ENVIRONMENT.md
PR 28673 docs/dev/ENVIRONMENT.md
PR 28702 docs/dev/ENVIRONMENT.md
PR 28704 docs/dev/ENVIRONMENT.md
PR 28738 docs/dev/ENVIRONMENT.md
PR 28765 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 28766 docs/dev/ENVIRONMENT.md
PR 28768 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 28775 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28777 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28786 docs/dev/ENVIRONMENT.md
PR 28787 docs/dev/ENVIRONMENT.md
PR 28793 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28805 docs/dev/ENVIRONMENT.md
PR 28807 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28808 docs/dev/ENVIRONMENT.md
PR 28814 docs/dev/ENVIRONMENT.md
PR 28837 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28845 docs/dev/ENVIRONMENT.md
PR 28857 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28893 docs/dev/ENVIRONMENT.md
PR 28914 docs/dev/ENVIRONMENT.md
PR 28920 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28921 docs/dev/ENVIRONMENT.md
PR 28925 docs/dev/ENVIRONMENT.md
PR 28931 docs/dev/ENVIRONMENT.md
PR 28934 docs/dev/ENVIRONMENT.md
PR 28936 docs/dev/ENVIRONMENT.md
PR 28939 docs/dev/ENVIRONMENT.md
PR 28941 docs/dev/ENVIRONMENT.md
PR 28943 docs/dev/ENVIRONMENT.md
PR 28948 docs/dev/ENVIRONMENT.md
PR 28953 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 28955 docs/dev/ENVIRONMENT.md
PR 28958 docs/dev/ENVIRONMENT.md
PR 28960 docs/dev/ENVIRONMENT.md
PR 28962 docs/dev/ENVIRONMENT.md
PR 28964 docs/dev/ENVIRONMENT.md
PR 28971 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 28973 docs/dev/ENVIRONMENT.md
PR 28980 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 28982 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 28983 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 28985 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 28986 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 28995 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 28999 docs/dev/ENVIRONMENT.md
PR 29000 docs/dev/ENVIRONMENT.md
PR 29014 docs/dev/ENVIRONMENT.md
PR 29022 docs/dev/ENVIRONMENT.md
PR 29032 docs/dev/ENVIRONMENT.md
PR 29033 docs/dev/ENVIRONMENT.md
PR 29036 docs/dev/ENVIRONMENT.md
PR 29037 docs/dev/ENVIRONMENT.md
PR 29038 docs/dev/ENVIRONMENT.md
PR 29042 docs/dev/ENVIRONMENT.md
PR 29052 docs/dev/ENVIRONMENT.md
PR 29053 docs/dev/ENVIRONMENT.md
PR 29057 docs/dev/ENVIRONMENT.md
PR 29059 docs/dev/ENVIRONMENT.md
PR 29066 docs/dev/ENVIRONMENT.md
PR 29067 docs/dev/ENVIRONMENT.md
PR 29068 docs/dev/ENVIRONMENT.md
PR 29069 docs/dev/ENVIRONMENT.md
PR 29070 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 29072 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 29073 docs/dev/ENVIRONMENT.md
PR 29074 docs/dev/ENVIRONMENT.md
PR 29076 docs/dev/ENVIRONMENT.md
PR 29084 docs/dev/ENVIRONMENT.md
PR 29085 docs/dev/ENVIRONMENT.md
PR 29086 docs/dev/ENVIRONMENT.md
PR 29087 docs/dev/ENVIRONMENT.md
PR 29089 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
docs/dev/ENVIRONMENT.md
PR 29090 docs/dev/ENVIRONMENT.md
PR 29091 docs/dev/ENVIRONMENT.md
PR 29093 docs/dev/ENVIRONMENT.md
PR 29094 docs/dev/ENVIRONMENT.md
PR 29095 docs/dev/ENVIRONMENT.md
PR 29096 docs/dev/ENVIRONMENT.md
PR 29097 docs/dev/ENVIRONMENT.md
PR 29098 docs/dev/ENVIRONMENT.md
PR 29101 docs/dev/ENVIRONMENT.md
PR 29102 docs/dev/ENVIRONMENT.md
PR 29103 docs/dev/ENVIRONMENT.md
PR 29104 docs/dev/ENVIRONMENT.md
PR 29105 docs/dev/ENVIRONMENT.md
PR 29106 docs/dev/ENVIRONMENT.md
PR 29107 docs/dev/ENVIRONMENT.md
PR 29108 docs/dev/ENVIRONMENT.md
PR 29110 docs/dev/ENVIRONMENT.md
PR 29113 docs/dev/ENVIRONMENT.md
PR 29115 docs/dev/ENVIRONMENT.md
PR 29116 docs/dev/ENVIRONMENT.md
PR 29117 docs/dev/ENVIRONMENT.md
PR 29118 docs/dev/ENVIRONMENT.md
PR 29119 docs/dev/ENVIRONMENT.md
PR 29120 docs/dev/ENVIRONMENT.md
PR 29121 docs/dev/ENVIRONMENT.md
PR 29123 docs/dev/ENVIRONMENT.md
PR 29186 docs/dev/ENVIRONMENT.md
PR 29211 docs/dev/ENVIRONMENT.md

@throny

throny commented Nov 22, 2026

Copy link
Copy Markdown

GPU test run: ✅ no new failures or validation errors on Windows / NVIDIA

Basis: built and ran · this PR's head 16a62f705a merged onto main 851212fb98 · Windows 11 Pro 26300, RTX 4080 (10de:2704, driver 610.88), WinLibs GCC 15.2.0 r7, Release

Checked

  • The agc_* tests tools/select_tests.py selects for this change: 1973 of 1974 passed, run with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer (Khronos validation layer, nightly 1.4.369, newer than the 1.4.335 minimum).
  • The loader logged Insert instance layer "VK_LAYER_KHRONOS_validation" 1890 times and never was not found but was requested by env var VK_INSTANCE_LAYERS.
  • 0 VUID- messages, the same as a full agc_* run of main 851212fb98 on this machine with the same settings.
  • The failure is agc_driver_store_over_untracked, which also fails intermittently on main here (agc_driver_store_over_untracked is flaky on Windows: the second-store case sometimes finds no saved guest bytes #22670), not this change.

Findings: none from this run; this is a correctness run on a GPU, not a code review or a speed measurement.

AI-assisted test run (Claude Code) · head 16a62f705a · base main 851212fb98

@ligmaSec ligmaSec left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A writable-copy readback can cause RecordCopyBacks to skip the barrier needed by a later changed-copy dispatch in the same call. The readback sets recording after a barrier with destination TRANSFER / TRANSFER_READ. The gpuCopy loop emits its barrier covering COMPUTE_SHADER / SHADER_READ only when recording is false. If the batch has both a staged writable copy and a changed copy, the compute dispatch can read shader results without the dependency that the changed-copy-only path supplies. The heap-readback path already shared this flag. The new writable-copy case makes the same problem possible without a heap mirror. Could the first barrier cover both consumers, or could the compute path track its dependency independently?

Source review of 16a62f705a. The local merge into current main conflicts in GuestBufferMemory.cpp.

AI-assisted: yes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs needs rebase Conflicts with main, rebase needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants