Skip to content

perf(agc): keep a resource set's import proof across registry changes that leave the imports in place - #7261

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
tibzejoker:perf/import-proof-reconcile
Nov 1, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
tibzejoker:perf/import-proof-reconcile

Conversation

@tibzejoker

@tibzejoker tibzejoker commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What

A reused resource set that reads imported buffers in place proves, before each use, that every import it was built against is still the same one (ShaderResources::Revalidate, the serial loop over its direct regions). An epoch gate skips that loop while the import table is unchanged since the set's last proof (HostImportsUnchanged). That proof is also tied to the guest allocation registry's generation, so any registry change fails it for every cached set, whether or not it touched an import. Each set then runs its serial loop, and the first HostImportSerial call reconciles the table with a fresh lease.

A title that maps and unmaps guest memory often moves the generation between most frames. Each cached set used after that pays the loop, its lock round trips and a lease, even though no import changed.

This PR adds HostImportsReconciledUnchanged. It reconciles the import table with the registry once, if the generation moved, then accepts the proof when no import was dropped (the existing epoch) and none was added (a new inserted count, also stored in HostImportsProof). Reconciling is what the serial loop's first lookup already did. After it, a set whose regions are all served by imports finds the same serials exactly when no import was added or dropped.

Revalidate uses the new check only for sets whose direct regions are all served by host imports and have no committed-span bound (CutRegions). Sets with a read-only image mirror region, or a region bounded by its committed span, keep the current check: their serial loop also checks things the import table does not track. The other users of HostImportsUnchanged (recipe presync, Texture.cpp) are unchanged.

Test: agc_driver_host_import_proofs (tests/execution/HostImportProofs.cpp). It imports a window through a GPU fill and takes a proof. It then checks that:

  • the proof holds across an unrelated registration and its removal;
  • it fails once a new import is made;
  • it fails once the imported range is mapped again.

Run with main's HostImportsUnchanged in place of the new check, it fails: "an unrelated registration broke the proof, although every import stayed in place".

Related: #6917 (keep the lease snapshot until the registry changes) and #6951 (memoize import run bounds) make each reconcile and lookup cheaper. This PR runs them less often. The three don't touch the same lines.

Tested

Windows 11 Pro (26200), RTX 4090 (NVIDIA 616.92), i9-13900K, MinGW GCC 15.2.0:

serial loops run / revalidations revalidate time per call committer µs per draw draws committed / 10 s
base 554k / 6.77M (8.2 %) 8.25 µs 38.2 219k
this PR 477k / 7.71M (6.2 %) 6.67 µs 34.4 240k

A stack sample of the draw committer before the change put HostImportSerial (with its GuestAllocationsAcquire) at 3 % of the committer's samples, all from this loop. The frame rate in this scene depends on where the save respawns the player (2-11 FPS within one run), so the committer figures are the comparison to read. The gain is one run each and larger than that 3 %, so take its size with care.

Performance capture

GTA V (PPSA04264), open world from the same save, RTX 4090, one warm-up run then one traced run per side, same session. Base 17eacab0ecac = main 47a266c + #6488 + #6848 (GTA V does not run on plain main) + #7189 + a local bench aid (keyboard pad input while an IME session is open). With the PR: 57dd68bc3900 = the same plus this change, cherry-picked onto that older base (one hunk adapted: only the inserted count). Traces: fork release perf-7261-20261019.

320 -> 392 presents in the 60 s window, p50 189.4 -> 145.9 ms. Read this with care: in the open world frame time follows where the save respawns (2 to 11 FPS within one run), and the trace buffer of queue worker 0 fills after a few seconds (trace_dropped). The committer cost per draw under Tested is the measurement this PR rests on.

{"commit":"17eacab0ecac","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"330:60"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 330:60","first_present":3685,"ms":60122.222},"presents":320,"frame_ms":{"p50":189.375,"p90":205.260,"p99":262.658,"max":323.808},"gpu_busy_ms_per_present":59.736,"worker_busy_pct":{"queue worker 0x0":3147.558,"queue worker 0x38":27.952,"queue worker 0x30":10.557,"queue worker 0x20":37.712,"queue worker 0x28":21.195},"top_phases_ms_per_frame":{"Driver.EndSubmission":5734.657,"Driver.Packet":356.391,"Driver.Packet.memory_wait":179.517,"Driver.Packet.draw":153.353,"Driver.Draw":151.856,"Driver.Draw.shader_compile_and_link":103.054,"Shader.DrawStage":80.386,"Shader.DrawStage.materialize":40.876},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":3.503,"events_lost":4071991,"totals_full":false}},"trace":"aps5-trace-17eacab0ecac-29712.json.gz"}
{"commit":"57dd68bc3900","dirty":false,"env":{"APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"330:60"},"gpu":"NVIDIA GeForce RTX 4090","driver":"NVIDIA 616.92","os":"Windows 10.0.26200","resolution":"3840x2160","window":{"spec":"seconds 330:60","first_present":4054,"ms":60030.641},"presents":392,"frame_ms":{"p50":145.892,"p90":178.473,"p99":305.486,"max":470.782},"gpu_busy_ms_per_present":59.003,"worker_busy_pct":{"queue worker 0x0":3653.455,"queue worker 0x20":37.797,"queue worker 0x38":21.886,"queue worker 0x28":22.423,"queue worker 0x30":13.899},"top_phases_ms_per_frame":{"Driver.EndSubmission":5447.114,"Driver.Packet":290.659,"Driver.Packet.memory_wait":146.116,"Driver.Packet.draw":122.834,"Driver.Draw":121.573,"Driver.Draw.shader_compile_and_link":76.443,"Shader.DrawStage":58.034,"Driver.Draw.draw_enqueued":30.671},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":3.977,"events_lost":3764105,"totals_full":false}},"trace":"aps5-trace-57dd68bc3900-39980.json.gz"}

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 RTX 4090, driver 616.92, Windows 11; AMD RX 9070 XT (amdvlk 32.0.32015.7029, Windows 11, by bunbeans2-arch: agc_driver_host_import_proofs 3 of 3 on 0c2a343d25 + main f7f03daf52, validation on, 0 VUID- lines)
  • AI-assisted: yes, AI-assisted (Claude Code)

🤖 Generated with Claude Code

https://claude.ai/code/session_01XBXM4pgkMHYEtqN1EQni2P

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp L2680
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp L2680
PR 10894 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp L2680
PR 13858 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp L2680

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 2434 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4449 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5021 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6182 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6194 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6223 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6548 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6565 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6804 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6918 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6970 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7457 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7689 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7844 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 8874 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 9012 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9176 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9287 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9289 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9445 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9592 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9712 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9884 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 9898 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 10025 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 10026 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10256 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10382 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10442 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10492 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 10497 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 12157 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12575 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 12855 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 13148 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13809 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 13863 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 13920 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp

@github-actions github-actions Bot added the agc libSceAgc* label Oct 17, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Review of e039bd7. The production change looks sound: I found no way for a kept proof to go stale. Every path that removes an import from the table bumps the epoch, the new inserted count catches new imports, and both only increase, so an old proof can't match by accident. Locally (main + this PR, NVIDIA), the 9 import/reuse tests pass, and dropping the inserted comparison makes host_import_proofs fail, as it should.

One ask, test only: the reconcile in HostImportsReconciledUnchanged isn't pinned by a test. With the refreshImports call removed, host_import_proofs still passes. The test's "mapped again" case (Mutation().Remove + Add) is caught by the unmap hook, which retires the overlapping imports and bumps the epoch directly (GuestBufferMemory.cpp:2112-2125), so it never depends on the reconcile.

The reconcile is what catches registry changes the hook doesn't see:

  • the waiter-drop early return (:2090-2099), which returns before the import loop;
  • a run change from a neighbouring registration, where sameRun/importRun differ although nothing overlapping was removed;
  • stale failed/failedJoins entries.

Without it, a proof would be kept over an import whose registered range has changed, which is the staleness this PR has to guard against, and nothing in CI would notice if the reconcile were lost.

Could you add a case where the registry changes so that an import no longer matches its run, without the unmap hook retiring it, and require the proof to fail? One option is registering a range adjacent to the imported window's run so that importRun grows, if that holds for a non-joined import. Please check that it fails with the refreshImports line removed, the same way as for HostImportsUnchanged.

@tibzejoker

Copy link
Copy Markdown
Contributor Author

Thanks for checking. You're right: the remap case goes through the unmap hook and never needs the reconcile. I'll add a case where a registry change breaks the import's run without the hook retiring it, and check that it fails both with the refreshImports line removed and with HostImportsUnchanged in its place.

AI-assisted (Claude Code).

@tibzejoker

Copy link
Copy Markdown
Contributor Author

Added in 21fe671. ProofsFollowTheRuns registers a range of 8 MiB minus 64 KiB at the start of an 8 MiB import window, imports it and takes a proof. It then registers the missing 64 KiB right after it. Now importRun covers the whole window as one run of two ranges, so the import's sameRun no longer matches. Nothing was unmapped, so the unmap hook never runs. The proof must fail.

  • With the refreshImports line removed from HostImportsReconciledUnchanged, the test fails: "a registration completed the import window of 0x2425b800000, but the proof over its import held".
  • With it in place, the test passes.

I first tried an adjacent range after a window-sized part of a larger block. That import covers only its own window, so sameRange checks just the owner and the proof rightly holds. The window has to be completed exactly for the run to change.

ctest -R "agc_driver|agc_masked|agc_shader": 524/524 pass, 2 skipped (RTX 4090). In a second full run, agc_driver_multisample_fill_host_only failed once under -j8. It passed 3/3 when run alone. It doesn't use host import proofs.

AI-assisted (Claude Code).

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 18, 2026
@blawesom

Copy link
Copy Markdown
Contributor

Rebase handoff — rebased onto current main (all three commits, authorship unchanged). One conflict in GuestBufferMemory.cpp: the auto-merge had duplicated the import-table emplace — main's settle-block tail and your counting form ended up as two consecutive emplace calls with yours unreachable. The merged version is your [placed, added] form with the inserted counter (verified with the PR's own proof test: the counter now increments across a new import, which the dead duplicate had broken) plus main's deferred-settle bookkeeping.

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; conventions pass; full suite green apart from the known main regression (agc_driver_tessellation segfault — Mesa, #5444), not this PR — your import-proof tests pass.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/7261
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is b978a6b8d.

@tibzejoker
tibzejoker force-pushed the perf/import-proof-reconcile branch from 21fe671 to 8920214 Compare October 18, 2026 10:42
@tibzejoker

Copy link
Copy Markdown
Contributor Author

@blawesom thanks for the rebase and for catching the duplicated emplace. I took your tree as is (git diff against b978a6b8d is empty), with one change: the GuestBufferMemory.cpp fix now sits in the first commit instead of the third, so every commit builds without the dead second emplace. Head is now 89202144f on current main.

On Windows (MinGW GCC 15.2, RTX 4090), ctest -R agc_driver_host_import: 6/6 pass, including agc_driver_host_import_proofs. Conventions pass.

AI-assisted (Claude Code).

@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line and removed needs rebase Conflicts with main, rebase needed perf numbers missing perf pull request without a before and after summary line labels Oct 18, 2026
@adriadam10 adriadam10 self-assigned this Oct 19, 2026
tibzejoker and others added 3 commits October 26, 2026 20:16
… that leave the imports in place

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XBXM4pgkMHYEtqN1EQni2P
…etes an import window

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XBXM4pgkMHYEtqN1EQni2P
@tibzejoker
tibzejoker force-pushed the perf/import-proof-reconcile branch from 8920214 to 0c2a343 Compare October 26, 2026 19:43
@tibzejoker

Copy link
Copy Markdown
Contributor Author

Rebased on current main 48c160c58b, head 0c2a343d25, no conflict, conventions pass. agc_driver_host_import_proofs passes on the RTX 4090 and the UHD 770 under the validation layer, with no VUID- line. The full ^agc run on the 4090 is 1078/1080; the 2 failures fail on main too. The body is updated.

@oneandonlydean you reviewed the reconcile logic on 2026-10-17. When you have a moment, could you take another look at this head? It has been ready since @blawesom's rebase. Thanks.

@TechLevelZero

TechLevelZero commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 0c2a343 merged onto main 0836dfd · tested 2026-10-31 22:56 UTC · 25 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,398 passed · 4 failed (0 new, 4 also fail on main) · 44 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,446 of 3,087 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 (925 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 52.5 s, ⚠️ agc_driver_graphics_maps_fallback 30.7 s
Failing on main too (4, not counted against this PR)
agc_driver_idle_store_yields
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_host_import_proofs
Validation IDs already present on main (4 IDs in 475 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (475 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 467 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 (44)
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_fresh: 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_f
Reproduce
git fetch origin 0c2a343d25693b31dc114a94eac0ceae1b832e6a 0836dfdf4fecb1e0326100c490476e15d3a74da5
git checkout 0836dfdf4fecb1e0326100c490476e15d3a74da5 && git merge --no-ff 0c2a343d25693b31dc114a94eac0ceae1b832e6a
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.

@bunbeans2-arch

Copy link
Copy Markdown
Contributor

An AMD RDNA 4 run on Windows of 0c2a343d25, since the GPUs tested are NVIDIA.

Windows 11 Pro 10.0.22631, AMD Radeon RX 9070 XT (1002:7550, driver 32.0.32015.7029, amdvlk64), MSYS2 UCRT64 g++ 16.1.0, Release. ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation; with VK_LOADER_DEBUG=layer the loader logs Insert instance layer "VK_LAYER_KHRONOS_validation" in every run of every test below that creates a Vulkan instance. This head merged onto main f7f03daf52, 3 runs:

  • agc_driver_host_import_proofs, which this PR adds, passes 3 of 3 with host import proofs tests passed.
  • No VUID- line.

AI-assisted: yes (Claude Code)

@oneandonlydean oneandonlydean self-assigned this Oct 30, 2026
@tibzejoker

Copy link
Copy Markdown
Contributor Author

Thanks @bunbeans2-arch, that adds AMD RDNA 4 on Windows (amdvlk) to Tested. The new agc_driver_host_import_proofs passes 3 of 3, the layer is inserted and there are 0 VUID- lines. I'll add it to the body.

AI-assisted: yes (Claude Code)

@oneandonlydean
oneandonlydean merged commit 3a1457d into boykopovar:main Nov 1, 2026
13 of 14 checks passed
oneandonlydean pushed a commit that referenced this pull request Nov 4, 2026
The conflict with #7261 in ShaderResources::noteReusable keeps both resets: main's importsReconcilable = false, then this PR's spaceReuse = false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants