Skip to content

perf(agc): bind the changed copy-back's buffers through push descriptors - #15792

Merged
oneandonlydean merged 11 commits into
boykopovar:mainfrom
imellag:perf/agc-changed-copy-back-descriptors
Nov 14, 2026
Merged

oneandonlydean merged 11 commits into
boykopovar:mainfrom
imellag:perf/agc-changed-copy-back-descriptors

Conversation

@imellag

@imellag imellag commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What

#6185 copies a staged region back through StagingCopyBack.comp, which reaches its three buffers through buffer device addresses. To have those addresses, every staging buffer and every shadow copy is now created with VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT (gpuCopyUsage).

On MoltenVK both halves of that cost time. MoltenVK keeps every buffer created with that usage in one device-wide list (MVKDevice::_gpuAddressableBuffers). In every encoder whose pipeline uses physical storage buffer addresses, it calls useResource on every buffer in that list (MVKCommandEncoderState.mm, encodeGPUAddressableBuffers). So the staging buffers make the list longer, and the kernel adds one more such encoder after each staged dispatch.

Stray (PPSA02100) stages about 2 GB per 10 s through these regions. It went from 11.4 to 9.7 fps between main a4eca2a056 and 1e658521a0. APS5_NO_CHANGED_COPY_BACK=1 alone restores 11.3 fps. With the variable set, though, 2 of 5 runs stopped at about 33 s on a queue 0x20 WAIT_REG_MEM that timed out, which is the rollback #6185 fixes. Local variants (not in this PR) split the cost:

copy-back fps
kernel, staging buffers with the address flag (main) 9.69, 9.71
APS5_CHANGED_COPY_ALWAYS=1 (kernel without its read of the import) 9.55, 10.00
plain copy, staging buffers with the address flag 10.80, 10.64
plain copy, no address flag 11.30

The kernel is the larger half, and the bytes it reads aren't what costs; the address flag is the rest.

This PR binds the kernel's buffers as descriptors where the device has VK_KHR_push_descriptor, as #12120's depth pass does:

  • StagingCopyBackBound.comp applies the same per-byte rule to std430 storage buffers. Each buffer is bound at its offset rounded down to minStorageBufferOffsetAlignment, and the dwords before the range are skipped through a base index in the push constants.
  • Recorder::RecordBoundChangedCopy pushes the four descriptors and dispatches. It splits a range on maxComputeWorkGroupCount as before, and on maxStorageBufferRange too.
  • With push descriptors, staging buffers and shadow copies no longer take the address flag, and the trace counter of APS5_TRACE_COPY_BACK is bound the same way.
  • Without push descriptors, the address kernel and its flag stay as on main. A device with push descriptors but without buffer device addresses now gets the changed copy-back too; on main it copied whole ranges.

APS5_NO_CHANGED_COPY_BACK and APS5_CHANGED_COPY_ALWAYS keep their meaning.

Tested

macOS 27.2, Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), x86-64 Release under Rosetta 2. main doesn't build on macOS on its own, so both sides use the support branch support/macos-boot-1103 merged with main b11c7bf84f, plus #15700, #15755 and #15756 for the build. The change side is that tree + these two commits.

New agc_bound_changed_copy (agc_driver_recorder_tests --bound-changed-copy-only): 70001 dwords at buffer offsets 4, 0x1008 and 0x10c, so every binding needs a base index. It checks every stored word against the per-byte rule, the count of words where both sides changed the same byte, and guard words before and after the target range. It passes. Its device enables VK_KHR_push_descriptor when the device has it; the context of the other recorder tests keeps pushDescriptors off as before.

The test runs the same check three times, on copies of the device's context (b004620164, after @frankea's review): with the device's limits (one dispatch), with maxComputeWorkGroupCount[0] set to 16 (1024 dwords per dispatch, 69 dispatches, a short last one), and with maxStorageBufferRange set to the offset alignment plus 1001 dwords (1001 dwords per dispatch, so each chunk's aligned binding and first dword differ from the previous one). Every word, the guards and the counter summed over all dispatches match in all three. On main merged at b30dcca60e, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation: agc_bound_changed_copy, agc_changed_copy, agc_bda_staging and agc_bda_staging_bound pass, no VUID- lines, no was not found but was requested by env var VK_INSTANCE_LAYERS. That tree needs #16591, #17767 and the BasicString.cpp std::min type to build on macOS; they are not part of this PR.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ctest -R '^(agc_changed_copy|agc_bound_changed_copy|agc_bda_staging|agc_read_written_staging|agc_copied_write_back|agc_copied_direct_ordering|agc_sparse_run_import_copied|agc_adaptive_staging|agc_draw_inputs_copied|agc_driver_copied_writer_.*|agc_driver_storage_flush_ordering|agc_driver_vertex_target_range_copied)$' -V:

Stray, main 1e658521a0 + the support branch + #11551 + #9356 (needed to reach gameplay on MoltenVK), 3840x2160, APS5_PROFILE_DRAW=1, the same scene, the two sides alternated. The copy-back code is the same at 1e658521a0 and b11c7bf84f. tools/trace_digest.py of the summaries, gameplay intervals only:

Base (1b81580dc875):

# seconds presents p50 p90 p99 GPU busy
5 44-54 94 103.7 125.3 153.1 83.4
6 54-64 94 103.4 120.2 181.8 67.8
7 64-74 91 104.7 128.3 164.3 61.9
8 74-84 92 104.3 125.9 162.1 64.6
9 84-94 98 98.8 116.0 149.0 57.9
10 94-104 100 96.7 118.2 147.8 54.5
11 104-114 99 95.9 126.5 150.7 56.9
12 114-124 101 96.5 116.1 132.5 54.0
13 124-134 100 97.0 115.4 161.4 54.6

This change (4e408effcaba):

# seconds presents p50 p90 p99 GPU busy
6 50-60 112 89.6 99.2 112.1 75.0
7 60-70 108 89.7 111.6 125.8 77.0
8 70-81 106 89.7 118.7 140.2 77.3
9 81-91 112 86.8 109.6 123.7 75.5
10 91-101 118 81.8 102.2 112.9 71.2
11 101-111 118 81.2 100.4 117.2 70.9
12 111-121 117 82.1 102.7 111.6 71.3
13 121-131 117 83.4 101.5 109.1 71.3

The aps5-summary.jsonl lines of interval 13 above, base (cbd-B-1) then this change (cbd-C-2):

{"commit":"1b81580dc875","dirty":false,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"Apple M4 Pro","driver":"MoltenVK 1.4.2","os":"Darwin 27.2.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":12,"memory_mib":24576,"title_id":"PPSA02100","title":"Stray","content_version":"01.002.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":1292,"ms":10055.045},"interval_start_s":123.986,"interval_end_s":134.041,"presents":100,"frame_ms":{"p50":96.995,"p90":115.367,"p99":161.439,"max":161.439},"gpu_busy_ms_per_present":54.590,"worker_busy_pct":{"queue worker 0x0":98.938,"queue worker 0x20":100.026},"top_phases_ms_per_frame":{"Driver.Packet":199.071,"Driver.Packet.memory_wait":84.902,"Driver.Packet.dispatch":43.533,"Driver.Packet.draw":30.892,"Driver.Draw":30.622,"Driver.Packet.prepare_memory":27.348,"Graphics.Draw":23.313,"Graphics.Draw.draw_and_resource_release":20.347},"trace_dropped":false,"trace":""}
{"commit":"4e408effcaba","dirty":false,"env":{"APS5_ASYNC_PIPELINES":"1","APS5_NO_PAD_INPUT":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_PLAYGO_UNLISTED_CHUNKS":"installed","APS5_PROFILE_DRAW":"1","APS5_TRACE_DIR":"<path>","APS5_TRACE_SUMMARY_EVERY":"10"},"gpu":"Apple M4 Pro","driver":"MoltenVK 1.4.2","os":"Darwin 27.2.0","cpu":"VirtualApple @ 2.50GHz","cpu_threads":12,"memory_mib":24576,"title_id":"PPSA02100","title":"Stray","content_version":"01.002.000","resolution":"3840x2160","window":{"spec":"summary_every 10","first_present":1520,"ms":10002.984},"interval_start_s":120.688,"interval_end_s":130.691,"presents":117,"frame_ms":{"p50":83.435,"p90":101.533,"p99":109.074,"max":115.191},"gpu_busy_ms_per_present":71.320,"worker_busy_pct":{"queue worker 0x0":98.740,"queue worker 0x20":100.050},"top_phases_ms_per_frame":{"Driver.Packet":168.899,"Driver.Packet.memory_wait":70.370,"Driver.Packet.dispatch":32.397,"Driver.Packet.draw":29.831,"Driver.Draw":29.561,"Driver.Packet.prepare_memory":26.333,"Graphics.Draw":22.742,"Driver.Draw.shader_compile_and_link":19.699},"trace_dropped":false,"trace":""}

The summary files of every run above, of the Lana and GoW runs below and of the variants in the table under What are attached as the release perf-bound-changed-copy-back-20261104, with a README.

Lana (PPSA19450) and God of War Ragnarök (PPSA28997) on the same trees, two rounds each: Lana 31.40 and 31.66 fps on the base, 31.67 and 31.53 with this change; GoW 54.23 and 54.49 fps, 54.36 and 53.69.

tools/check_conventions.py --base upstream/main passes. tools/pr_overlap.py --branch perf/agc-changed-copy-back-descriptors finds no overlapping lines among the PRs it could merge. It could not compare 73 PRs that conflict with main; of the 54 that share GuestBufferMemory.cpp or Recorder.cpp, two touch the changed copy-back:

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: Apple M4 Pro, MoltenVK 1.4.2 (Vulkan SDK 1.4.363.0), macOS 27.2
  • AI-assisted: yes

@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line build agc libSceAgc* labels Nov 4, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 1102a9d merged onto main b11c7bf · tested 2026-11-04 15:57 UTC · 22 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,850 passed · 6 failed (0 new, 3 also fail on main, 3 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,905 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 (985 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.2 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_driver_submit_progress: failed in 3 of the last 10 main runs
agc_submit_progress: failed in 4 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_bound_changed_copy
Validation IDs already present on main (13 IDs in 549 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (549 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 541 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 (1 test): 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 1102a9d2a84ea27dfc2cb6b2164a2cdc60ed67b1 b11c7bf84f5d2f636ff60166cc3371bd071e24d5
git checkout b11c7bf84f5d2f636ff60166cc3371bd071e24d5 && git merge --no-ff 1102a9d2a84ea27dfc2cb6b2164a2cdc60ed67b1
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 commented Nov 4, 2026

Copy link
Copy Markdown

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

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi imellag,

Thanks for the split by variant; it makes the cost easy to follow. I checked this head on Linux with an NVIDIA RTX card and the Khronos validation layer. The 15 copy-back tests pass with no validation messages. A shader broken on purpose (dropping & ~kept, or dropping the base index) fails agc_bound_changed_copy, so the new test does catch those.

One request, and one small point:

  1. The new copy-back path in GuestBufferMemory::RecordCopyBacks (the bound branch, the copySource handle and its offsets, and the staging and shadow buffers losing the address flag) has no test that goes through it. agc_bound_changed_copy calls Recorder::RecordBoundChangedCopy directly, and the test device context keeps pushDescriptors off for all the other recorder tests, so they still take the address kernel. Desktop drivers that expose VK_KHR_push_descriptor (NVIDIA, RADV) will now take the bound path by default, so it needs coverage. To check, I set context.pushDescriptors from the device in the shared test context and broke the bound shader again. agc_bda_staging then failed (address-based staging copy-back dword 2118 holds 0x22222222, expected 0x22222233), and with push descriptors off it passed. Could agc_bda_staging (or agc_changed_copy's copy-back case) also run with push descriptors on, for example as a second registered test with its own argument?

  2. Small point: when the device has no push descriptors, boundChangedCopyTests prints "skipped" and returns (tests/Recorder.cpp:1205-1206), and the program then exits 0 (line 15124 onward). ctest counts that as a pass, although SKIP_RETURN_CODE 77 is set (tests/cmake/agc_driver_recorder_tests.cmake:370). agc_changed_copy does the same on main, so this is optional. Returning 77 there would show the test as skipped.

@blawesom

blawesom commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Independent Linux/AMD run of head 1102a9d2a8 on both trees per the AGENTS protocol (RX 9070 XT, RADV GFX1201, Vulkan 1.4.354, CachyOS, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=ON).

Paired focused run (ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation)

tree copy-back set VUID- missing-layer line
main 9ab6a281ea 14/14 pass none none
head 1102a9d2a8 15/15 pass none none

The 15th is the new agc_bound_changed_copy; RADV exposes VK_KHR_push_descriptor, so it exercised the bound kernel rather than skipping. No new validation IDs on the change side.

Coverage experiment closing @oneandonlydean's first point

With one line in the shared harness — context.pushDescriptors = pushDescriptors; after the VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME check in tests/Recorder.cpp — every recorder test's context enables the bound kernel, and agc_bda_staging/agc_changed_copy then route their copy-backs through the production RecordCopyBacks bound path. On this RADV machine both pass green in that configuration. The mutation check also has teeth there: dropping & ~kept from StagingCopyBackBound.comp fails both agc_bda_staging (through the production path, word mismatch in the copied result) and agc_bound_changed_copy. So the flag in the shared context gives the end-to-end red/green you asked for, and a second registered variant of an existing copy-back test with the flag on would pin it in CI. The SKIP_RETURN_CODE 77 nit from your second point also still applies to boundChangedCopyTests.

Not run: the MoltenVK performance claim is outside this machine, and I did not produce Linux trace_digest numbers for the path switch; the paired validation above and the mutation red/green are what I can add from RADV.

AI-assisted: yes

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 1102a9d merged onto main b11c7bf · tested 2026-11-04 20:09 UTC · 33 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,836 passed · 9 failed (0 new, 8 also fail on main, 1 unstable on main) · 60 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,905 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 (985 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ public_headers 70.1 s, ⚠️ agc_driver_image_sample_unnormalized 41.2 s, ⚠️ agc_shader_sampler_limits 37.0 s, ⚠️ agc_driver_lazy_resolved_abi 35.8 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 8 of the last 10 main runs
Failing on main too (8, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_submit_progress
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validated but not compared (1, not in the main baseline's validation pass)
agc_bound_changed_copy
Validation IDs already present on main (8 IDs in 549 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (549 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 541 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
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 (60)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
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_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_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_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
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_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_storage_pending_key_refresh: skipped, refreshes over a pending key store are not testable here
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platf
Reproduce
git fetch origin 1102a9d2a84ea27dfc2cb6b2164a2cdc60ed67b1 b11c7bf84f5d2f636ff60166cc3371bd071e24d5
git checkout b11c7bf84f5d2f636ff60166cc3371bd071e24d5 && git merge --no-ff 1102a9d2a84ea27dfc2cb6b2164a2cdc60ed67b1
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

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

…ound

Apply review request from 2026-11-04: on a device with
VK_KHR_push_descriptor, GuestBufferMemory::RecordCopyBacks now takes the
bound copy-back, which no existing test reached because the shared test
context keeps push descriptors off.

agc_bda_staging_bound runs the agc_bda_staging case with the device's
push descriptors enabled in the test context, so the copy-back goes
through RecordBoundChangedCopy and StagingCopyBackBound.comp. It exits 77
on a device without push descriptors, as agc_bound_changed_copy now does
too instead of passing.
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi imellag,

Thank you for the push-descriptor copy-back and for the detailed Stray numbers. So it can land without another round trip, we added one test-only commit to your branch (18dea757c2, "test(agc): run the address-based staging test with push descriptors bound"):

  • agc_bda_staging_bound runs the existing agc_bda_staging case with the device's push descriptors turned on in the test context. On desktop drivers that expose VK_KHR_push_descriptor, RecordCopyBacks now takes the bound path, and before this no test went through that branch. With the bound kernel broken on purpose (changed & ~kept -> changed), it fails while agc_bda_staging still passes.
  • agc_bound_changed_copy now exits 77 on a device without push descriptors, so ctest shows it as skipped instead of passed.

No production code changed. On Linux with an NVIDIA RTX 4090 and the Khronos validation layer, the six copy-back tests pass with no validation messages. Feel free to revert or adjust it.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 18dea75 merged onto main 9ab6a28 · tested 2026-11-04 21:39 UTC · 27 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,852 passed · 6 failed (0 new, 3 also fail on main, 3 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,907 of 3,909 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 (984 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 (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 4 of the last 10 main runs
agc_submit_progress_no_timeline: 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 (2, not in the main baseline's validation pass)
agc_bda_staging_bound
agc_bound_changed_copy
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 18dea757c2a4fab1937ac4953c505af4a4c5708d 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c
git checkout 9ab6a281ea61c9e62a7eb07eb4cef8f19ede1c5c && git merge --no-ff 18dea757c2a4fab1937ac4953c505af4a4c5708d
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.

@imellag

imellag commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@oneandonlydean thanks for adding 18dea757c2. A second registration with push descriptors on is the right way to cover the bound branch of RecordCopyBacks, and the 77 exit fixes the skip being counted as a pass. I'm keeping the commit as it is.

@blawesom thanks for the paired RADV run and the mutation check through the production path.

The windows check was cancelled when it hit the 45-minute job limit, during "Build and run changed guest core/libs tests" (job 126874342625). It did not fail. Could a maintainer re-run it?

AI-assisted: yes

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 6, 2026
…py-back-descriptors

# Conflicts:
#	core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
@imellag

imellag commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

main 6ed10ccd1f is merged in at 92b3cd72a5. The only conflict was in tests/Recorder.cpp, where #13942 enables the portability subset next to this PR's push descriptor line; both are kept.

Rerun on macOS (Apple M4 Pro, MoltenVK 1.4.2, x86-64 Release under Rosetta 2) on a local support tree of main 6ed10ccd1f, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, same copy-back set as in the description plus agc_bda_staging_bound:

I also added the two aps5-summary.jsonl lines of the Stray runs to Tested.

AI-assisted: yes

@github-actions github-actions Bot removed perf numbers missing perf pull request without a before and after summary line needs rebase Conflicts with main, rebase needed labels Nov 6, 2026
@blawesom

blawesom commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Linux/RADV run of head 92b3cd72a5 with the validation layer, on top of the macOS run above.

Setup. CachyOS x86-64, kernel 7.3.1, AMD Radeon RX 9070 XT (RADV GFX1201), Mesa 26.2.5, Vulkan 1.4.363 loader with Khronos validation layer 1.4.363, GCC 16.2.1, Ninja, Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON. Head merged onto main 669f0673fae locally (clean). Both arms ran the focused set from the description plus agc_bda_staging_bound, sequentially on the same GPU with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU=9070 XT and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation.

Results.

  • Main arm: 14 of 14 pass. This head: 16 of 16 pass, including agc_bound_changed_copy and agc_bda_staging_bound.
  • RADV exposes VK_KHR_push_descriptor, so both new tests run the bound path: agc_bda_staging_bound prints address-based staging tests passed with push descriptors.
  • Neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS, and neither contains a VUID- line. Unlike the MoltenVK run, there is no VUID-VkDeviceCreateInfo-pProperties-04451 either, since RADV is not a portability driver.

That leaves the cancelled windows check (job 126874342625 hit the 45-minute limit during the guest core/libs tests, it did not fail) as the only outstanding piece for this head.

AI-assisted: yes

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 92b3cd7 merged onto main 9fb6149 · tested 2026-11-06 22:11 UTC · 27 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,025 passed · 4 failed (0 new, 3 also fail on main, 1 unstable on main) · 55 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 3,084 of 4,235 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 (1002 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_image_sample_unnormalized 35.4 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 1 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
Validation IDs already present on main (9 IDs in 602 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (602 tests): agc_driver, agc_driver_address_draw_space_reuse, agc_driver_address_draw_space_reuse_verify, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, and 594 more
VUID-VkShaderModuleCreateInfo-pCode-08737 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-VkShaderModuleCreateInfo-pCode-08739 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-VkShaderModuleCreateInfo-pCode-08741 (14 tests): agc_driver_dpp16_operands, agc_driver_dpp8_pk_fmac, agc_driver_dx10_clamp, agc_driver_f16_fma_denormal_modes, agc_driver_f16_fma_invalid_nan, agc_driver_float16_fma_rounding, agc_driver_float16_modifiers, agc_driver_float16_native, and 6 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_prepared_exports
VUID-VkPipelineShaderStageCreateInfo-module-parameter (1 test): agc_driver_float16_unused_nan_payloads
VUID-VkPipelineShaderStageCreateInfo-pSpecializationInfo-06849 (1 test): agc_driver_float16_unused_nan_payloads
Skipped (55)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_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_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_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_net_ctl_disconnected: 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_device_capability: 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_host_resolution_disabled: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_four_k: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_height_only: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_limit: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_malformed: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_width_only: 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 curre
Reproduce
git fetch origin 92b3cd72a506dc51e3c6d833a98e40bd414f649e 9fb6149d12d51e8dc769943c828f2f23635acb4d
git checkout 9fb6149d12d51e8dc769943c828f2f23635acb4d && git merge --no-ff 92b3cd72a506dc51e3c6d833a98e40bd414f649e
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 commented Nov 7, 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 9289 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp L7187
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp L16530
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp L910
PR 16648 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake L287
PR 16760 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake L462
PR 17943 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp L660-661, L720-721, L16398-16399
PR 18029 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp L660-661, L720-721, L16398-16399
PR 18082 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp L450-451, L610, L660
PR 18388 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp L7103-7104

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/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6209 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7085 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 7275 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7464 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 7508 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7514 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 7689 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8246 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 8592 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 9356 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 9387 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 9712 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
PR 9852 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10049 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10193 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 10359 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 10442 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10757 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 12157 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 12324 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12746 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12828 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 13148 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 13251 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 13809 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 13863 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 13920 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 13928 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 13929 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 13963 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 14262 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 15136 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
PR 15296 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15456 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 15529 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 15548 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 15570 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 15621 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 15719 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 16115 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 16286 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 16831 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 17255 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 17611 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 17796 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 18075 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 18076 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 18078 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 18173 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 18185 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
PR 18369 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 18390 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 18515 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 19071 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
PR 19100 core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Recorder.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 19697 core/libs/prx/libSceAgcDriver/CMakeLists.txt
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

@oneandonlydean oneandonlydean self-assigned this Nov 7, 2026
agc_bound_changed_copy was the only agc_driver_recorder_tests case missing from the Windows list that prepends libc's directory to PATH, so on the GPU-less runner it died at load with 0xc0000135 while every other case skipped. Add it to that list.

Credited fix-up on imellag's PR boykopovar#15792.
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi @imellag, thanks for the changed copy-back work. The Windows run failed on the new agc_bound_changed_copy test (exit 0xc0000135, DLL not found) because it was the one agc_driver_recorder_tests case missing from the Windows list that puts libc's directory on PATH. We added it to that list in one commit on your branch; nothing else in your changes was touched. Thanks!

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 9, 2026
# Conflicts:
#	core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 9, 2026
@frankea

frankea commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Test report for af2eb9a, from GT7 (PPSA01317) on an M5 Max under Rosetta + MoltenVK and from the RTX 4090 box. I found the same root cause independently while chasing a GT7 title-screen FPS regression, so here are the numbers in case they help the review.

GT7 on macOS (M5 Max, MoltenVK). Title screen, fresh boot each run, APS5_PROFILE_GPU=1, 2-minute window. The build is an integration branch (older main plus several unmerged PRs and a locally patched MoltenVK), so read the absolute numbers with that caveat. Only the copy-back change differs between rows.

Build FPS GPU draw class per present
Without the fix 0.92 721 ms
APS5_NO_CHANGED_COPY_BACK=1 2.09 144 ms
With this PR (2 runs) 1.68 / 1.88 146 / 137 ms

The draw/commit/barrier counts per frame are the same in every run; only the GPU time of the draw passes changes, which matches the per-encoder useResource of every buffer-device-address buffer in MoltenVK that the PR description names. The CPU-side spread between runs (about 0.2 FPS) is run-to-run noise on this machine. The copy-back fallback never triggered ("staged write-backs copy their whole ranges" absent) and no work was skipped.

RTX 4090 (Windows 11 10.0.26200.9711, NVIDIA driver 616.92, Vulkan SDK / validation layer 1.4.363.0, winlibs GCC 15.2.0). PR head merged locally onto main 5c26d4f, compared with main 5c26d4f on the same machine.

  • Full agc suite (ctest -R agc -j4): main 1567/1574, PR 1569/1576. The two new tests (agc_bda_staging_bound, agc_bound_changed_copy) pass. The same 7 tests fail on both builds (agc_driver_image_plane_address_on_line, agc_driver_image_sample_lod_clamp, agc_driver_image_sample_lod_clamp_shader_lane, agc_driver_msaa_dcc_clear_2/_4/_8, agc_driver_native_depth_publication), so nothing regresses.
  • Validation layer per CONTRIBUTING (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -V) on the changed-copy, bound changed-copy, read-written staging, bda staging (plain and bound), kept-bytes, recorded draw staging, recorder and bda tests: main 16/16, PR 18/18, also with APS5_NO_CHANGED_COPY_BACK=1. No VUID- lines and no "was not found but was requested" in any log. With VK_KHRONOS_VALIDATION_VALIDATE_SYNC=true on the changed-copy tests: no SYNC-HAZARD on either build. The loader log confirms the layer was inserted.

macOS tests (M5 Max, MoltenVK). The PR's commits cherry-picked onto the integration branch: --bound-changed-copy-only, --bda-staging-bound-only, --changed-copy-only, --read-written-staging-only, --bda-staging-only, the full recorder run, recorded draw staging and kept-bytes all pass, each also with APS5_NO_CHANGED_COPY_BACK=1. A 56-entry agc regression list gives the same result as before the change.

One coverage note. boundChangedCopyTests records one 70001-dword copy, and the per-dispatch cap is at least maxComputeWorkGroupCount[0]*64 dwords, so on any conformant device the loop runs once and done stays 0. Rebasing each chunk at offset + done*4, recomputing the aligned binding and first dword per chunk, a short last chunk, and summing the counter across dispatches are therefore untested. I read the loop and see no bug there; it is only missing coverage. Since the test builds its Recorder from a local copy of the context, lowering context.limits.maxComputeWorkGroupCount[0] in that copy (for example to 16, giving 1024-dword dispatches over an odd total) would exercise all of it without touching production code. I have a version of that check from my own attempt at this fix and can share it if useful.

AI-assisted: yes (Claude Code)

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

imellag commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

@frankea, thanks for the GT7 numbers and the 4090 run. Your coverage note was right: with real limits the loop ran once.

13cd4ad389 and b004620164 now run boundChangedCopyTests three times, on copies of the device's context:

  • the device's limits, one dispatch;
  • maxComputeWorkGroupCount[0] = 16, so 1024 dwords per dispatch: 69 dispatches over the 70001 dwords, the last one 369 dwords;
  • maxStorageBufferRange = the offset alignment + 1001 dwords, so 1001 dwords per dispatch. 1001 dwords isn't a multiple of the alignment, so each chunk's aligned binding and first dword differ from the previous chunk's.

Each run checks every word, the guard words on both sides and the counter summed over all dispatches. All three pass on MoltenVK (M4 Pro, main merged at b30dcca60e) under the validation layer, with no VUID- lines. The Tested section has the details.

AI-assisted: yes

@JJenkx

JJenkx commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Independent Linux AMD validation of head b0046201642b0709cdca29465aa8ca7f97988d8d, merged cleanly with main 145e689adab572c44a99369516565d28e85f6c12. Both SDKs also contain the same existing loader prerequisite, #18342 (b7c47a0a8afa); this is explicitly a matched integration comparison, not plain-main-only evidence.

Linux 7.2.14, GCC 16.2.1 Release, Ryzen 9 7950X, physical Radeon RX 6650 XT / RADV (Mesa 26.2.6). ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation; loader output confirms the layer was inserted and the physical AMD device was selected.

  • Six shared existing groups, three runs each on both SDKs: changed copy, read/written staging, BDA staging, copied-direct ordering, staged-clear/sampled-read, host-import proofs.
  • An additional shared production-path probe, three runs on each SDK, requires Context::pushDescriptors enabled and uses GuestBufferMemory::Upload/RecordCopyBacks with ordinary 1 MiB and atomic-designated 64 KiB ranges, both descriptor and BDA-overlay binding forms. It checks the real GPU repack output word-by-word and prefix/suffix guards. This does not test atomic instruction concurrency.
  • Candidate-only --bound-changed-copy-only, three runs: each completes the device-limit, 1024-word dispatch-limit and 1001-word range-limit variants, including every expected word, boundary guards and summed contested-word counters.

45 executions passed, zero skips, zero VUIDs, no missing-layer or copy-back fallback messages. Frozen SDK/fixture hashes were checked before and after. The complete suite held the shared GPU FIFO; its infrastructure reservation was released.

No game performance or full-title rendering result is claimed here. Exact generated CTest commands, JUnit, full logs, linkage proofs, probe source/build commands and source pins: downloadable evidence. SHA-256: 10ea3288616d494db5e23c092297c891a5a2b958500f2f89c0890769924eabca (27798 bytes). Downloaded archive and all 27 members verified.

AI-assisted: yes.

Additional initial native pair, Fobia: St. Dinfna Hotel (PPSA05626), same AMD machine, 3840x2160, fresh original save/settings plus identical warmed private shader/Mesa caches and scripted 300-second route. Baseline 46b9bfd80d09 (main145e + common loader18342); candidate bc0e5d68d5f3 (same + this PR). Full frozen SDKs; build revision stamps also differ. Written staging minimum16 KiB, default atomic/unit/BDA staging and pipeline0 in both. No GPU profiler or validation layer in these timing runs; the validation results above are separate.

275:10 trace window baseline this PR
FPS 31.987 30.845
Frame p50 / p90 / p99, ms 30.575 / 34.762 / 45.880 31.293 / 39.429 / 45.606
GPU busy per present, ms 19.257 20.094

No speedup demonstrated in this pair (-3.57% initial FPS difference); this is not a confirmed regression. The resource paths differed substantially: cumulative staging-shadow refusals42705 versus140, and staged copy-in60947070 versus127016338 KiB. Both logs report heap-budget pressure. I have not isolated that difference, so these numbers do not isolate descriptor dispatch cost. No reverse pair or default change follows from this result.

Both native exits0 (~303.4/303.5 s), complete traces with zero dropped events, matching source inputs/common seed/route/4K and no configuration differences in performance_compare.py. Twenty late compiler-process samples per arm observed no compiler. All asset/input/SDK/seed hashes and kernel/mount/process cleanup guards passed. Reviewed final compositor and X11 captures show comparable wall/reticle output; audio and full-title rendering remain unverified. No copy-back fallback message in either log.

Official trace summaries/digests, full traces/logs, cleanup receipts, exact harness and final paired captures, SHA-256 b38141ee18ad22d246c77b3662c34d8244065ea648513f5c9b73da34f9444d7a (19218229 bytes). Download and all32 members verified. No game assets or save files included.

AI-assisted: yes.

@imellag

imellag commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@JJenkx, thanks for the RADV runs; the 45 passing executions with all three dispatch-limit variants are the coverage this needed on a non-Apple device.

On the Fobia pair: no speedup is expected on RADV. The cost this PR removes is MoltenVK's: it calls useResource on every buffer created with VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT in every encoder that uses buffer addresses. RADV has no per-encoder cost like that, so here the change only swaps how the kernel reaches its three buffers. It does not change the refusal rule: a staging shadow is refused when the device-local heap is within an eighth of its budget, and dropping the address flag doesn't change a buffer's size. So 42705 against 140 refusals, and twice the staged copy-in, look like different heap headroom between the two runs rather than this change. I haven't isolated it either, so I agree with reading it as neither a speedup nor a regression.

AI-assisted: yes

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed perf numbers missing perf pull request without a before and after summary line labels Nov 14, 2026
…py-back-descriptors

# Conflicts:
#	core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 14, 2026
@oneandonlydean
oneandonlydean merged commit acf3fac into boykopovar:main Nov 14, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build perf numbers missing perf pull request without a before and after summary line perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants