Skip to content

feat(agc): reuse unchanged untracked draw input copies - #13793

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
Celegans12:feat/agc-owned-draw-inputs
Nov 9, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
Celegans12:feat/agc-owned-draw-inputs

Conversation

@Celegans12

@Celegans12 Celegans12 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

What

Stacked on #13784; please review the last commit only.

Untracked vertex/index copy fallbacks always reread guest bytes. Reuse an exact address/size/use snapshot when libc write-watch tokens and AGC write evidence still hold. Flush pending writes before lookup, capture the proof before reading, and validate that original proof when keeping the copy. Entries share the existing input-cache limits. Refused ranges copy normally. On non-Windows platforms the draw path bypasses owned-token lookup and arming, because the current libc token implementation is Windows-only.

The branch is restacked on #13784, including its pending-page merge fix. In-place inputs and zero-padded reads keep their existing paths. Trace summaries count arm outcomes, proof checks, arena calls, requested blocks, reuse, invalidation and input-pool evictions; an unbound event marks the trace incomplete. Requested blocks are not exact syscall counts. No title or performance claim.

#9875 also changes draw-copy range metadata; #9712 changes copy allocation policy; #12921 handles untracked shader-resource proofs. #13809 extends these owned proofs to storage. The current overlap scan could not complete 98 shared-file comparisons; 29 include implementation files and need composition review if those branches land.

Tested

After restacking on the bounded parent, the current-main storage-stack merge passed 10 selected Windows tests and seven Linux tests three times each. Linux cannot exercise Windows write-watch.

Based on main 66e1f7f plus #13784 4b26f5d61b. Exact merge with main 93dbd0f82a: Windows 11 / MinGW-w64 GCC 15.2.0, NVIDIA RTX 3080 Laptop, validation 1.4.363: six focused tests passed three times; Ubuntu llvmpipe, validation 1.3.275: five passed three times. No reported VUIDs or skips. Linux lacked asynchronous UFFD write protection and uses the non-owned fallback.

The two-block fixture checks requested-block counts; trace-window, unbound-thread and input-pool eviction fixtures check summary output and incomplete captures. On the earlier head db033149f7, late-arm and late-stamp mutants failed both owned-input tests; restored candidate passed. Three neighboring cases passed once per platform on that earlier head.

Not tested: macOS runtime, title scenes, console behavior, title performance or tracing overhead. No real-scene block count is claimed.

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: feat(libc): track guest memory with windows write-watch tokens #13784
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA RTX 3080 Laptop, 610.62, Windows 11; lavapipe LLVM 22.1.8, Windows 11; lavapipe Mesa 25.2.8 / LLVM 20.1.2, Ubuntu 24.04
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 31, 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 9712 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp L941
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake L440
PR 9875 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp L134, L136, L941
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp L1449, L1491-1493
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp L3394, L3416-3417
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp L5808
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake L440
PR 14262 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake L440
PR 15570 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp L941
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake L440
PR 15792 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake L440
PR 16116 core/libs/prx/libSceAgcDriver/Graphics/include/RuntimeSwitches.hpp L14
core/libs/prx/libSceAgcDriver/Graphics/src/RuntimeSwitches.cpp L20, L27
PR 16372 core/libs/prx/libSceAgcDriver/Graphics/include/RuntimeSwitches.hpp L14
core/libs/prx/libSceAgcDriver/Graphics/src/RuntimeSwitches.cpp L20, L27
PR 16373 docs/dev/debt/libSceAgcDriver.md L425
PR 16752 docs/dev/debt/libSceAgcDriver.md L425
PR 16760 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp L134, L941
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp L1449
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp L5808
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake L440
PR 16831 core/libs/prx/libSceAgcDriver/Graphics/include/RuntimeSwitches.hpp L14
core/libs/prx/libSceAgcDriver/Graphics/src/RuntimeSwitches.cpp L20, L27
PR 16879 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp L64
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp L136
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp L1446-1447, L1492-1493
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp L29, L3314-3315, L3394
PR 16897 docs/dev/ENVIRONMENT.md L340

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
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1896 docs/dev/ENVIRONMENT.md
PR 4472 docs/dev/ENVIRONMENT.md
PR 5021 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6186 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 6188 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6192 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6209 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 docs/dev/debt/libSceAgcDriver.md
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6804 docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 6924 docs/dev/ENVIRONMENT.md
PR 6995 docs/dev/debt/libSceAgcDriver.md
PR 7002 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7085 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
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 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 docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 7457 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 7464 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 7514 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/Graphics/src/Recorder.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.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 docs/dev/ENVIRONMENT.md
PR 8004 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
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
docs/dev/debt/libSceAgcDriver.md
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 9387 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.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 9852 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
PR 9884 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 9893 docs/dev/debt/libSceAgcDriver.md
PR 9895 docs/dev/debt/libSceAgcDriver.md
PR 9915 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 10049 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10233 docs/dev/debt/libSceAgcDriver.md
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 10351 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10359 docs/dev/debt/libSceAgcDriver.md
PR 10442 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
docs/dev/ENVIRONMENT.md
PR 10469 docs/dev/debt/libSceAgcDriver.md
PR 10492 docs/dev/debt/libSceAgcDriver.md
PR 10497 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10757 docs/dev/ENVIRONMENT.md
PR 10894 docs/dev/ENVIRONMENT.md
PR 11435 docs/dev/ENVIRONMENT.md
PR 11436 docs/dev/ENVIRONMENT.md
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 11452 core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 11551 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 11587 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
docs/dev/debt/libSceAgcDriver.md
PR 11825 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 12324 docs/dev/ENVIRONMENT.md
PR 12544 docs/dev/ENVIRONMENT.md
PR 12828 core/libs/prx/libSceAgcDriver/Execution/include/PerformanceTrace.hpp
core/libs/prx/libSceAgcDriver/Execution/src/PerformanceTrace.cpp
PR 12849 docs/dev/ENVIRONMENT.md
PR 12863 docs/dev/ENVIRONMENT.md
PR 12904 docs/dev/debt/libSceAgcDriver.md
PR 13148 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
PR 13251 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 14212 docs/dev/debt/libSceAgcDriver.md
PR 14344 docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 14561 docs/dev/debt/libSceAgcDriver.md
PR 14944 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 14964 docs/dev/debt/libSceAgcDriver.md
PR 15059 core/libs/prx/libSceAgcDriver/Graphics/include/RuntimeSwitches.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/RuntimeSwitches.cpp
docs/dev/ENVIRONMENT.md
PR 15136 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 15169 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 15456 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.md
PR 15529 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 15621 docs/dev/debt/libSceAgcDriver.md
PR 15710 docs/dev/debt/libSceAgcDriver.md
PR 15917 docs/dev/ENVIRONMENT.md
PR 16115 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/RuntimeSwitches.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/RuntimeSwitches.cpp
docs/dev/ENVIRONMENT.md
PR 16260 docs/dev/debt/libSceAgcDriver.md
PR 16301 docs/dev/debt/libSceAgcDriver.md
PR 16363 core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
docs/dev/debt/libSceAgcDriver.md
PR 16364 docs/dev/debt/libSceAgcDriver.md
PR 16501 docs/dev/debt/libSceAgcDriver.md
PR 16880 docs/dev/debt/libSceAgcDriver.md
PR 17024 core/libs/prx/libSceAgcDriver/Graphics/include/RuntimeSwitches.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/RuntimeSwitches.cpp
docs/dev/ENVIRONMENT.md
docs/dev/debt/libSceAgcDriver.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

@JJenkx

JJenkx commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Windows GPU run of head a7ee78e76d, merged onto main 828ac0b2ae (clean merge, local only).

Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, Radeon RX 6700 XT with AMD proprietary driver 26.10.1 (Vulkan 1.4.315), WinLibs GCC 15.2.0 UCRT r7, Ninja, Release, BUILD_TESTING=ON. Khronos validation layer 1.4.363 requested for every test (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation).

  • All 108 CTest entries of agc_driver_recorder_tests, guest_owned_memory_tests, which builds the test files this PR changes: pass, 3 of 3 runs each (--repeat until-fail:3), no failures, no skips.
  • They create Vulkan instances on the RX 6700 XT: the validation layer was inserted 276 times across the runs and reported no VUIDs.

AI-assisted: yes (Claude Code).

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head a7ee78e merged onto main de83e8f · tested 2026-10-31 07:57 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,991 passed · 6 failed (0 new, 3 also fail on main, 3 unstable on main) · 42 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 3,039 of 3,048 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 (1201 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_lookup_log_fits_build 59.9 s, ⚠️ agc_driver_bda_device 54.1 s, ⚠️ agc_driver_pipeline_journal 51.9 s, ⚠️ agc_driver_graphics_maps_fallback 31.2 s
Intermittent validation messages (1, seen once in the parallel run, not reproduced when the test was re-run alone 2 times; not counted against this PR)
agc_driver_depth_clear_hle: VUID-vkCmdCopyBuffer-commonparent (6x)
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_depth_clear_hle: failed in 1 of the last 10 main runs
agc_submit_progress: failed in 6 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 (2, not in the main baseline's validation pass)
agc_owned_draw_inputs
agc_owned_draw_inputs_verify
Validation IDs already present on main (5 IDs in 702 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (702 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, and 694 more
VUID-vkCmdCopyImage-srcImage-01548 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-vkCmdCopyImage-srcImage-01551 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (42)
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_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
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_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_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
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_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_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 plat
Reproduce
git fetch origin a7ee78e76d7ad0880f71343f43381e312f944612 de83e8f27015b91327029755f1ea5b60b74d940b
git checkout de83e8f27015b91327029755f1ea5b60b74d940b && git merge --no-ff a7ee78e76d7ad0880f71343f43381e312f944612
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.

@blawesom

blawesom commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

GPU test run on PR head a7ee78e76d7ad0880f71343f43381e312f944612 (stacked on #13784). Environment: CachyOS (kernel 7.2.10), AMD Radeon RX 9070 XT (RADV GFX1201), Vulkan 1.4.354, Mesa 26.2.4, GCC 16.2.1, env ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1. Test output prints Vulkan device: AMD Radeon RX 9070 XT (RADV GFX1201).

Limitation: no Vulkan validation layer is available on this machine, so no VUID comparison is possible; runs are functional-only.

Negative control: the two new ctest names (agc_owned_draw_inputs, agc_owned_draw_inputs_verify) do not exist in main (cd087bd12c) or in the #13784 head (bd01f8d75b) test registries. On both baseline binaries, --owned-draw-inputs-only is an unrecognized flag that is silently ignored: the binary runs its full default suite and exits 0, never printing the new focused assertions. So the tests cannot "fail" on the baselines in a comparable sense; instead I confirmed the PR-head binary reaches the new focused path and prints Owned draw input tests passed in both normal and APS5_VERIFY_OWNED_DRAW_INPUTS=1 modes, which neither baseline reaches.

Test head a7ee78e7 (run1/run2/run3) main cd087bd12c #13784 head bd01f8d75b
agc_owned_draw_inputs Pass / Pass / Pass not present (flag ignored, full suite exit 0) not present (flag ignored, full suite exit 0)
agc_owned_draw_inputs_verify Pass / Pass / Pass not present (flag ignored, exit 0) not present (flag ignored, exit 0)
agc_driver_recorder Pass / Pass / Pass (4.15s / 4.52s / 4.15s) Pass (4.28s) not run via ctest
guest_owned_memory Pass / Pass / Pass not registered on main ctest not built

Focused findings: none. All focused tests passed on every PR-head run, and agc_driver_recorder passes on the main baseline, so pre-existing behavior is intact. python3 tools/check_conventions.py --base origin/main passes.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 31, 2026
@Celegans12
Celegans12 force-pushed the feat/agc-owned-draw-inputs branch from a7ee78e to 4380bb4 Compare November 1, 2026 12:10
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 1, 2026

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

Review of the consumer commit on top of #13784.

  1. The stated purpose is to skip rereading guest bytes for untracked vertex/index copies, but the PR carries no number for it: "No title or performance claim", "Not tested: titles ... or performance", "Unblocks: none". The change is on by default (APS5_NO_OWNED_DRAW_INPUTS is an opt-out, Draw.cpp calls ArmOwnedDrawInput for every untracked copy). A default-on change to the draw path needs the title/scene where untracked copies dominate and tools/trace_digest.py summaries of main and the change from the same machine. As written the cost is certain (arm + proof capture on every untracked copy, GetWriteWatch per 64 KiB block under the mapping mutex) and the benefit is unmeasured.

  2. On Linux GuestArenaArmOwned returns false, so every copy still goes through the old path and pays the extra ArmOwnedDrawInput attempt (including PendingWriteOverlaps and AssertGpuLockHeld). Linux gets overhead and no reuse. Please show that the refused path is free, or gate the attempt on a capability query once.

  3. The reuse hit rate is not observable. Please add a counter (armed / reused / refused / invalidated) so a trace can show whether the cache is doing anything on a real title; otherwise the entries sit in the existing input-cache budget and may evict copies that were being reused by the current path.

  4. The negative control cited is the historical 6a691f build with a transplanted fixture, not main plus this commit, and the late-arm/stamp controls were "not rerun". For a correctness-by-proof feature (stale vertex data reaching the GPU if a proof is wrong) I would want the mutants re-run on this head.

Also, since this is stacked, please make sure #13784 is settled first; its mapping-mutex cost and unbounded token maps carry straight into this one.

@Celegans12
Celegans12 force-pushed the feat/agc-owned-draw-inputs branch from 4380bb4 to db03314 Compare November 2, 2026 00:02
@Celegans12

Copy link
Copy Markdown
Contributor Author

@CnRJay I restacked this on #13784 and changed the draw path in db033149f7 so non-Windows builds skip the owned-token lookup and arm attempt entirely. They still use the normal copy path. I also avoid trying to keep an empty proof.

Both owned-input tests passed three times each on Windows/NVIDIA and Linux/llvmpipe with validation enabled. On Linux, the previous compiled draw object references both owned-token operations and the updated object references neither. I reran the late-arm and late-stamp controls on Windows: each made both tests fail at the intended assertion, and both passed after I restored the candidate. Three neighboring draw-copy and pending-write tests passed on each platform.

I haven't measured a title or added the requested reuse counters yet; the parent also still has the map-growth and per-block-cost questions described in its review. Would you take a look at the Linux gate and the refreshed controls when you have a chance? I'm continuing with the remaining items.

@Celegans12
Celegans12 force-pushed the feat/agc-owned-draw-inputs branch from db03314 to 38e401f Compare November 2, 2026 02:02
@Celegans12

Copy link
Copy Markdown
Contributor Author

@CnRJay I added the requested draw-input observability: the trace summary now records arm attempts and outcomes, proof and arena checks, requested 64 KiB blocks, reuse, invalidations, and capacity evictions. An event on an unbound thread or a full totals table marks the trace incomplete. trace_digest.py keeps the counts for interval summaries. The requested-block numbers are an upper bound on work entering libc; a refusal or early exit can process fewer blocks.

On the exact merge with main 93dbd0f82a, the six focused Windows/NVIDIA tests and five Linux/llvmpipe tests passed three times each with validation enabled, with no reported VUIDs or skips. The fixtures include a two-block input, an unbound event and an entry-cap eviction. Linux could not use asynchronous UFFD write protection, so it exercised the non-owned fallback. The earlier late-arm and late-stamp controls were run on db033149f7, not this revision.

I still don't have a title-scene comparison, real-scene block counts or tracing-overhead measurements. #13784's long-lived map growth and per-block cost also remain open. Would you take a look at whether the counters and their limitations provide the observability you asked for?

Keep exact vertex and index snapshots when libc write-watch tokens and
driver write evidence still prove their bytes unchanged. Capture proofs
before reading and retain the existing copied path for refused ranges.

Count owned-input arm, refusal, reuse, invalidation and cache eviction
in trace summaries, including incomplete accounting and interval output.
Exercise write evidence, trace loss and bounded-pool eviction paths.

AI-assisted: yes
@Celegans12
Celegans12 force-pushed the feat/agc-owned-draw-inputs branch from 38e401f to f23fc63 Compare November 2, 2026 02:25
@Celegans12

Copy link
Copy Markdown
Contributor Author

@CnRJay I restacked this on #13784's bounded token and pending maps in f23fc639f9; the draw changes themselves are unchanged. On a current-main merge of the complete storage stack, the selected draw, storage, trace and limit tests passed three times on Windows (10 tests) and Linux (seven tests). Linux uses the non-owned fallback. I haven't measured a title or per-frame cost.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head f23fc63 merged onto main 93dbd0f · tested 2026-11-02 03:19 UTC · 37 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 ✅ 3,099 passed · 6 failed (0 new, 3 also fail on main, 3 unstable on main) · 51 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 3,156 of 3,165 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 (1238 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_bda_device 66.9 s, ⚠️ agc_driver_lookup_log_fits_build 53.2 s, ⚠️ agc_driver_graphics_maps_fallback 33.7 s, ⚠️ agc_driver_graphics 33.0 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 6 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 7 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_owned_draw_inputs
agc_owned_draw_inputs_trace
agc_owned_draw_inputs_trace_eviction
agc_owned_draw_inputs_trace_unbound
agc_owned_draw_inputs_verify
Validation IDs already present on main (5 IDs in 715 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (715 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, and 707 more
VUID-vkCmdCopyImage-srcImage-01548 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-vkCmdCopyImage-srcImage-01551 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (51)
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_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
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_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_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
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 pla
Reproduce
git fetch origin f23fc639f979a2183622a81e45f0170109927d24 93dbd0f82aea684e95f15f06e7d42c0064af18cf
git checkout 93dbd0f82aea684e95f15f06e7d42c0064af18cf && git merge --no-ff f23fc639f979a2183622a81e45f0170109927d24
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
@Celegans12

Copy link
Copy Markdown
Contributor Author

@CnRJay @TechLevelZero I merged current main through 98346b748c, retaining both the owned draw-input tests and main's window-import test registration. Eight selected owned-input, draw-input and window-import tests passed on Windows with Vulkan validation enabled. Conventions and git diff --check passed. Could you rerun the updated head when convenient?

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

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head d46a537 merged onto main f06d7fd · tested 2026-11-02 16:42 UTC · 39 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 ✅ 3,473 passed · 6 failed (0 new, 3 also fail on main, 3 unstable on main) · 52 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 3,531 of 3,544 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 (1306 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.3 s, ⚠️ agc_driver_bda_device 71.0 s, ⚠️ agc_driver_graphics_maps_fallback 30.7 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 3 of the last 10 main runs
agc_submit_progress: failed in 8 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 7 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_owned_draw_inputs
agc_owned_draw_inputs_trace
agc_owned_draw_inputs_trace_eviction
agc_owned_draw_inputs_trace_unbound
agc_owned_draw_inputs_verify
Validation IDs already present on main (4 IDs in 751 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (751 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, and 743 more
VUID-vkCmdCopyImage-srcImage-01548 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-vkCmdCopyImage-srcImage-01551 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (52)
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_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
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_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
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 suppor
Reproduce
git fetch origin d46a5371e902fb4877c64b35c8cddfacbb0f5273 f06d7fdcee89af69f69f5d807ea5a34279f4285c
git checkout f06d7fdcee89af69f69f5d807ea5a34279f4285c && git merge --no-ff d46a5371e902fb4877c64b35c8cddfacbb0f5273
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.

@mashingaan

Copy link
Copy Markdown
Contributor

A concrete Windows workload to consider for the missing real-scene measurement is Astro Bot PPSA21567 in issue #14820. Its report measures roughly 3,000 draws per frame and about 88 ms of draw-committer work in a 102 ms frame. That does not establish that untracked vertex/index fallbacks are frequent there, so the new OwnedDraw.arm_attempt, OwnedDraw.arm_success, and OwnedDraw.reused counts would be useful to decide whether this change helps that scene. If you can run the same capture on main and this head, please include those counts with the frame-time summaries. Low reuse or unchanged frame cost would also be valuable evidence for whether the default-on path should stay enabled.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 4, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 1de614a merged onto main b11c7bf · tested 2026-11-04 16:27 UTC · 28 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,855 passed · 4 failed (0 new, 3 also fail on main, 1 unstable on main) · 49 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,908 of 3,894 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 (986 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 3 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_owned_draw_inputs
agc_owned_draw_inputs_trace
agc_owned_draw_inputs_trace_eviction
agc_owned_draw_inputs_trace_unbound
agc_owned_draw_inputs_verify
Validation IDs already present on main (13 IDs in 548 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (548 tests): agc_driver, agc_driver_address_draw_space_reuse, 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, and 540 more
VUID-VkShaderModuleCreateInfo-pCode-08737 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
VUID-VkShaderModuleCreateInfo-pCode-08739 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
VUID-VkShaderModuleCreateInfo-pCode-08741 (8 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_float16_fma_rounding, agc_driver_float16_unused_nan_payloads, agc_driver_packed_alu, agc_driver_packed_f16_denormal_modes, agc_driver_packed_float16_native
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 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
VUID-VkPipelineShaderStageCreateInfo-module-parameter (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849 (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (49)
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_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
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 av
Reproduce
git fetch origin 1de614a1d1d24de81c1ea7cd70efd8db3d4477c9 b11c7bf84f5d2f636ff60166cc3371bd071e24d5
git checkout b11c7bf84f5d2f636ff60166cc3371bd071e24d5 && git merge --no-ff 1de614a1d1d24de81c1ea7cd70efd8db3d4477c9
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 4, 2026
@blawesom

blawesom commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

GPU validation-layer run of head 1de614a1d1d on the current main merge, closing the gap from my earlier functional-only run: the Khronos validation layer is now available on this machine, so this is the full VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation protocol on RADV.

Setup. CachyOS x86-64, kernel 7.3.1, AMD Radeon RX 9070 XT (RADV GFX1201), Mesa 26.2.5, Vulkan 1.4.363 loader, GCC 16.2.1, Ninja, Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON. PR head merged onto main 669f0673fae locally (one conflict in docs/dev/debt/libSceAgcDriver.md, both sides kept, main's entries first). Both arms ran the same focused set — every agc_driver_recorder_tests entry, guest_owned_memory and the trace_digest tests — sequentially on the same GPU with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU=9070 XT. The test output prints Vulkan device: AMD Radeon RX 9070 XT (RADV GFX1201) on both arms.

Results.

  • Main arm: 213 of 213 passed, 24 skipped. PR arm: 219 of 219 passed, 24 skipped; the six extra entries are this PR's (agc_owned_draw_inputs, _verify, _trace, _trace_unbound, _trace_eviction and the recorder entry that carries them), all passed. The skipped sets are identical on both arms.
  • Neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS; the layer is confirmed active (both logs carry the same WARNING-VkImageSubresourceRange-layerCount-compatibility lines, 10 on each arm).
  • Neither log contains a VUID- line, so the change adds no new validation errors on RADV.

One scoping note, matching db033149f7: non-Windows builds skip the owned-token lookup and arm attempt entirely, so on Linux these runs exercise the non-owned fallback path, the new trace counters and the absence of validation regressions; the owned reuse path itself remains covered by the Windows run above.

AI-assisted: yes

@slopezjur

Copy link
Copy Markdown
Contributor

GPU test results for this PR on real hardware (CI runs GPU tests on lavapipe only).

Setup: NVIDIA GeForce RTX 4080 SUPER, driver 621.14, Vulkan 1.4, Windows 11 Pro, Ryzen 7 7800X3D, WinLibs GCC 15.2.0, Release. This PR's head 1de614a1d1 merged onto main 52dfa45ecc, compared with main 52dfa45ecc alone.

Command, run on both: ctest --test-dir build -R '^(agc|shader|recompiler|video_out)' -j 6 -V with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation.

main this PR
Passed (12 skipped on each) 1525/1525 1530/1530
VUID- validation errors 0 0
Validation layer loaded yes yes
  • New tests, all passing: agc_owned_draw_inputs, agc_owned_draw_inputs_trace, agc_owned_draw_inputs_trace_eviction, agc_owned_draw_inputs_trace_unbound, agc_owned_draw_inputs_verify
  • The same 12 tests skip on both (device-dependent skip code 77), e.g. agc_driver_msaa_dcc_compared_import_*, agc_host_import_sparse.
  • Neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS.

This covers correctness and validation only, not performance.

🤖 Generated with Claude Code

@oneandonlydean
oneandonlydean merged commit 3d61c0b into boykopovar:main Nov 9, 2026
14 of 15 checks passed
winstrex added a commit to winstrex/AnyPS5 that referenced this pull request Nov 9, 2026
Resolve the conflicts with boykopovar#13793: its owned draw inputs keep their own
proof; the plain snapshots keep the forget serial, and an owned input's
entry records the forget serial read when its proof was armed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
winstrex added a commit to winstrex/AnyPS5 that referenced this pull request Nov 9, 2026
Resolves the overlap with the owned draw inputs of boykopovar#13793: an owned entry keeps the vertex window it was copied from and the lowest index, and is only reused by a draw that starts inside that window.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants