Skip to content

fix(agc): finish an idle store's write-back before returning - #16011

Merged
oneandonlydean merged 5 commits into
boykopovar:mainfrom
JJenkx:fix/agc-idle-store-waits
Nov 15, 2026
Merged

oneandonlydean merged 5 commits into
boykopovar:mainfrom
JJenkx:fix/agc-idle-store-waits

Conversation

@JJenkx

@JJenkx JJenkx commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What

The idle store (VulkanDevice::StoreIdleResults → StorageTexture::FlushAllPendingUntil("idle")) records each pending storage image's write-back into the open recorder batch. FlushPending synced the recorder after an idle flush only when it published unit shadows (db3af40). A plain write-back into the host import publishes none, so its copies stayed in the open batch until the store's final submit, and nothing waited for them. The same held for depth and stencil planes, which FlushDepthPlanes stores inside the idle FlushPending under the reason "depth plane store".

Nothing ties the idle store to a point the title can observe. A CPU store made after the idle flush returned and before the GPU ran the copy was overwritten with the image's contents.

FlushPending now syncs after an idle flush that stored any image or any depth or stencil plane, also when nothing is published. Other flush reasons are unchanged; the access that triggers them orders them.

One window remains, recorded in the queue-idle debt entry: a CPU store made while a piece's copies are running is still not ordered against them.

#13863 and #13920 re-indent the same block in FlushPending. That is a textual conflict only; neither changes this condition.

#6926 is related but separate. It orders host writes (GuestArena::HostWrite: file and APR reads, recv) after the GPU writes pending over their destination. This PR makes the idle store itself complete before it returns, which also covers the title's own CPU stores. Those do not go through a host-write scope.

Tested

Current integration and regression qualification — 2026-11-09. Head 71aae52449a184e854753088f04a77cbe16d1c93 includes main 7259cce11195f360698772da8c0b3af756bf7c8f and preserves the production idle-store fix. The storage fixture now compiles a real image-store shader and drives a retained VulkanDevice on the flushing thread. After the idle flush returns it asserts that the active recorder has no pending write for the stored range. It drains pending work before reporting a failure, so the old-source control has safe cleanup.

Linux 7.2.14-arch1-1, GCC 16.2.1 Release, AMD Radeon RX 6650 XT / RADV NAVI23, Mesa 26.2.6. With required Vulkan, no shader cache and the confirmed Khronos layer, the strengthened fixture passes 3/3, fails against exact main's Texture.cpp at the outstanding-write assertion, then passes 3/3 after exact restoration. Zero skips or VUIDs; all ten recorded source, module and executable hashes match after restoration. This addresses the later review that the earlier fixtures could pass without the fix; their old observations below retain their original pins and are not reliable negative controls on this refreshed tree. An initial attempt without the validation layer is explicitly excluded from this qualification.

Current main automatically registers execution fixtures. The recorded CTest JSON confirms agc_driver_storage_idle_store_completes is registered; the shared registration supplies SKIP_RETURN_CODE 77 and the Windows runtime PATH setup. No duplicate add_test was added. The existing depth-plane case is preserved, but no new negative-control claim is made for that case.

Build logs, frozen fixture, main/source control, exact restoration and validation receipts, SHA-256 e3db99d95de12d09ea6dbd5d1345dacd3b0cc58054b68cd5256ca6a65135ff9a (download and all 36 manifest files verified). No new Windows, title, FPS, full-SDK or hosted-CI pass is claimed; current full CI needs a maintainer dispatch.

Earlier qualifications retain their stated source/platform scope.

Linux 7.2.11, AMD RX 6650 XT (RADV Mesa 26.2.6), Release. The tests ran on main 1e24993fa3 with this commit. The branch is the same commit cherry-picked cleanly onto 7ad9749ed0; there Texture.cpp differs only by #12813's log gating.

Historical tests at the original pins

  • agc_driver_storage_idle_store_completes: a CPU store made after the idle flush returns must survive the image's write-back.
    • On main it fails 5 of 5 runs: 983,040 of 1,048,576 bytes are overwritten over 8 rounds.
    • With this change it passes 20 of 20 runs: 0 bytes are overwritten.
  • agc_driver_depth_plane_cpu_store_after_idle_flush (a new case in DepthPlanePartialStore): the same check for a depth plane.
    • On main it fails: unit 0 holds 0 of its 16,384 CPU-written texels.
    • With this change it passes, and so do the other 16 agc_driver_depth_plane* tests.

Full suites with this change

  • CPU: 2,962 of 2,962 passed.
  • GPU (agc_driver*, video_out*, vulkan*): 996 of 996 passed. Rerun on head 4ff434e1a4 (the follow-up that takes the GPU mutex in the idle wait only for an idle flush): 996 of 996, including both new tests.

Windows, RDNA3 (report by @DonRyuzaki): head 4ff434e1a4 on main d23df92b38, Windows 11, RX 7800 XT, WinLibs GCC 15.2, Release, validation layer on. agc_driver_storage_idle_store_completes passed 5 runs and agc_driver_depth_plane_cpu_store_after_idle_flush passed 3. Their layer reported only VUID-VkDeviceCreateInfo-pNext-pNext at device creation, also on a main control. They did not repeat the main-side failure.

Cost check on a slow title: Thymesia (PPSA05213) runs at about 6 FPS here. Its frame gaps exceed the 50 ms idle threshold, so idle stores start between frames, which is where this change adds waits. Eight 185 s runs with the same input, alternating in two orders, main 1e24993fa3 against the same base with this change, no compiler running. Median FPS after 90 s: main 6.47, 5.76, 5.60, 6.38 (mean 6.05); this change 6.29, 5.70, 6.38, 5.62 (mean 6.00). That is -0.9%, inside the spread of either arm, so I measured no cost. All eight runs exit 0. No performance claim either way.

Not claimed: no title result or performance change. I found the race while investigating an intermittent ASTRONEER (PPSA27623) load crash (#8746). This change does not stop that crash: 3 of 12 runs crashed with it, against about 4 of 11 on main.

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: AMD Radeon RX 6650 XT (RADV NAVI23), Mesa 26.2.6, Linux 7.2.14 (current qualification); AMD Radeon RX 7800 XT, Windows 11 (historical independent report linked above)
  • AI-assisted: yes

IL2P and others added 2 commits November 5, 2026 04:49
The idle flush (VulkanDevice::StoreIdleResults) records each pending storage
image's write-back into the open recorder batch. FlushPending synced the
recorder after an idle flush only when it published unit shadows, so a plain
write-back into the host import stayed in the open batch until the store's
final submit, unwaited. A CPU store made in between was then overwritten
with the image.

FlushPending now syncs after an idle flush that stored any image or depth or
stencil plane, also when nothing is published. Other flush reasons are
unchanged.

Tests: agc_driver_storage_idle_store_completes (CPU stores made after the
idle flush returns are not overwritten by its write-back) and
agc_driver_depth_plane_cpu_store_after_idle_flush (the same for a depth plane).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e flush

The depth-plane path of FlushPending took the GPU mutex for every flush reason that stored a plane, though only an idle flush waits. waitForIdlePublish now takes it itself after its idle check; its other callers already hold it.

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

Copy link
Copy Markdown
Contributor

I tested the updated head 4ff434e1a4 merged cleanly onto main d23df92b38 (local merge 5e4665548a) on Windows 11 build 26300 with an AMD Radeon RX 7800 XT, WinLibs GCC 15.2 Release. Required Vulkan, shader cache off, and the Khronos validation layer were active; loader logs confirm layer insertion and the Radeon was selected.

agc_driver_storage_idle_store_completes passed 5 separate runs, and agc_driver_depth_plane_cpu_store_after_idle_flush passed 3 (8/8, no skips). This adds Windows RDNA3 execution evidence to the author's Linux RX 6650 XT results. My older local validation layer reports only VUID-VkDeviceCreateInfo-pNext-pNext during device creation, an ID also present on a current-main control under the same setup; I cannot claim a zero-VUID run. I did not run the title or independently repeat the author's main-side failure. The updated head's hosted Build run 42023389094 is successful.

AI-assisted: yes.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 4ff434e merged onto main 1543e42 · tested 2026-11-05 16:18 UTC · 34 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,940 passed · 6 failed (0 new, 3 also fail on main, 3 unstable on main) · 54 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,000 of 4,077 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 (973 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 2 of the last 10 main runs
agc_submit_progress: failed in 1 of the last 10 main runs
agc_submit_progress_no_timeline: 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
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_driver_submit_progress: Failed in the parallel run; also passed only on retry in 4 other runs in the last 7 days
Validation IDs already present on main (9 IDs in 591 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (591 tests): agc_compute_pipeline_replay, 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, and 583 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 (54)
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_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 current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display 
Reproduce
git fetch origin 4ff434e1a4cfa23a9096ff2e431ad580c14361ef 1543e42a5674dd576f1aaccee59283cb4936808f
git checkout 1543e42a5674dd576f1aaccee59283cb4936808f && git merge --no-ff 4ff434e1a4cfa23a9096ff2e431ad580c14361ef
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.

# Conflicts:
#	docs/dev/debt/libSceAgcDriver.md
@JJenkx

JJenkx commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Merged main into this branch as 6956f9c0ab (no force-push). The conflict was in docs/dev/debt/libSceAgcDriver.md: this PR rewrites the "Queue-idle storage write-back" entry, and main added a new "CPU scanout decode" entry after it. Both are kept.

Re-checked on Arch Linux 7.2.11, RX 6650 XT (RADV Mesa 26.2.6): agc_driver_storage_idle_store_completes and agc_driver_depth_plane_partial_store pass, plain and with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, no VUID- messages. tools/check_conventions.py passes, and the head merges without conflicts into the current main.

Correction (same day): the validation run quoted above did not load the layer: on this host it is only found with VK_LAYER_PATH set, which that run lacked (the loader logged "was not found but was requested"). I re-ran it with VK_LAYER_PATH and VK_LOADER_DEBUG=layer; the loader inserted VK_LAYER_KHRONOS_validation 1.4.363, the tests listed above pass, and there are no VUID- messages.

AI-assisted: yes

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

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 6956f9c merged onto main 9fb6149 · tested 2026-11-06 22:24 UTC · 25 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 3,005 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,064 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 (992 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 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
Validated but not compared (1, not in the main baseline's validation pass)
agc_driver_storage_idle_store_completes
Validation IDs already present on main (9 IDs in 596 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (596 tests): agc_driver, agc_driver_address_draw_space_reuse, agc_driver_address_draw_space_reuse_transitions, 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 588 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 6956f9c0abbca182d122175cd1fc5eee0f8b2275 9fb6149d12d51e8dc769943c828f2f23635acb4d
git checkout 9fb6149d12d51e8dc769943c828f2f23635acb4d && git merge --no-ff 6956f9c0abbca182d122175cd1fc5eee0f8b2275
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 16368 core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_depth_plane_partial_store_tests.cmake L22
core/libs/prx/libSceAgcDriver/tests/execution/DepthPlanePartialStore.cpp L189

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/Texture.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 5925 docs/dev/debt/libSceAgcDriver.md
PR 6186 docs/dev/debt/libSceAgcDriver.md
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6209 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6280 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6804 docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 7002 docs/dev/debt/libSceAgcDriver.md
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 8246 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 9335 docs/dev/debt/libSceAgcDriver.md
PR 9356 docs/dev/debt/libSceAgcDriver.md
PR 9387 docs/dev/debt/libSceAgcDriver.md
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_depth_plane_partial_store_tests.cmake
core/libs/prx/libSceAgcDriver/tests/execution/DepthPlanePartialStore.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9895 docs/dev/debt/libSceAgcDriver.md
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 10049 docs/dev/debt/libSceAgcDriver.md
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10359 docs/dev/debt/libSceAgcDriver.md
PR 10743 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 11551 docs/dev/debt/libSceAgcDriver.md
PR 11825 docs/dev/debt/libSceAgcDriver.md
PR 12746 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 12904 docs/dev/debt/libSceAgcDriver.md
PR 13251 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 13809 docs/dev/debt/libSceAgcDriver.md
PR 13863 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13920 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13963 docs/dev/debt/libSceAgcDriver.md
PR 14944 docs/dev/debt/libSceAgcDriver.md
PR 15456 docs/dev/debt/libSceAgcDriver.md
PR 15529 docs/dev/debt/libSceAgcDriver.md
PR 15548 docs/dev/debt/libSceAgcDriver.md
PR 15621 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 16253 docs/dev/debt/libSceAgcDriver.md
PR 16260 docs/dev/debt/libSceAgcDriver.md
PR 16427 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 16483 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 17611 docs/dev/debt/libSceAgcDriver.md
PR 17915 docs/dev/debt/libSceAgcDriver.md
PR 17943 docs/dev/debt/libSceAgcDriver.md
PR 17956 docs/dev/debt/libSceAgcDriver.md
PR 18029 docs/dev/debt/libSceAgcDriver.md
PR 18173 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 18515 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
docs/dev/debt/libSceAgcDriver.md
PR 20041 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 20156 docs/dev/debt/libSceAgcDriver.md
PR 20186 docs/dev/debt/libSceAgcDriver.md
PR 20187 docs/dev/debt/libSceAgcDriver.md
PR 20315 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp

@oneandonlydean oneandonlydean self-assigned this Nov 8, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi @JJenkx,

The fix reads sound: waitForIdlePublish only runs for the idle reason, GpuMutex is recursive and StoreIdleResults already holds it on that path, so the added lock introduces no new lock order. The problem is that the new tests do not fail without the fix:

  • With core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp reverted to the base (e8b1bd3d7f), and the tests from 6956f9c0ab kept, agc_driver_depth_plane_cpu_store_after_idle_flush still passes, and agc_driver_storage_idle_store_completes_tests still reports 0 bytes overwritten in 8 rounds. So neither one shows that the unfixed idle flush returns before its write-back lands.
  • tests/execution/StorageIdleStoreCompletes.cpp is globbed into the agc_driver_storage_idle_store_completes_tests executable (libSceAgcDriver/CMakeLists.txt, the tests/execution/*.cpp loop), but no tests/cmake/*.cmake fragment has an add_test for it, so ctest never runs it.

Could you:

  1. Make at least one of the tests fail on the base. For example widen the window (hold or delay the copy so the write-back is still in flight when the flush returns), or assert on return that no recorder ticket for the stored range is outstanding. Please check it by reverting the Texture.cpp hunks.
  2. Register StorageIdleStoreCompletes with an add_test in a tests/cmake fragment (with the Windows PATH line and SKIP_RETURN_CODE 77 like its neighbours), or drop the file.

Reviewed at 6956f9c.

@JJenkx

JJenkx commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

@oneandonlydean Addressed at 71aae52449a1 on main 7259cce11195. The revised storage fixture uses the same active recorder for the GPU producer and idle flush, then checks for outstanding writes over the stored range at return. It passes 3/3 with the fix, fails with exact main Texture.cpp at that assertion, and passes 3/3 after restoration; source/module/executable hashes match. Khronos insertion is confirmed, with zero skips or VUIDs on RX 6650 XT / RADV. The original timing-only fixture is not used as a negative control for this tree.

Main now auto-registers all execution fixtures; the CTest JSON confirms this test and its inherited skip/runtime setup. The existing depth-plane case remains, with no new negative-control claim for it.

Exact logs, fixture, controls and hash receipts, SHA-256 e3db99d95de12d09ea6dbd5d1345dacd3b0cc58054b68cd5256ca6a65135ff9a (download/manifest verified). No new Windows/title/performance or full-CI pass claimed. AI-assisted: yes (Codex).

@JJenkx

JJenkx commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Fresh Linux qualification of unchanged topic 71aae52449a1 on main a96f77bdc14a (private integration 184cb668bb66). The fixture SDK also contains the separate HTTP2 topic, but its AGC binary is byte-identical to plain main, and neither fixture links HTTP2; the evidence includes that identity and linkage proof.

On the same RX 6650 XT/RADV, with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation for both sides:

  • Five shared depth-plane cases pass 3/3 on the baseline: 15 passing executions.
  • The two new regressions fail on the baseline for the intended reasons: the idle store returns with an outstanding recorder write, and a later CPU store is overwritten by the depth-plane store.
  • All seven cases pass 3/3 with this change: 21 passing executions, including both new regressions.
  • Across these arms: 0 skips, 0 VUIDs, no missing-layer message, 76 actual Khronos-layer insertions. Frozen binaries and test executables remain unchanged.

Source pins, production diff, exact commands, raw logs, XML, linkage and hashes, SHA-256 9f3e3e9715021520c5f937095c63964e38d0751ae3b8bdebf3c790d5113ccaab. The uploaded archive was downloaded again and all 22 manifest members verified. It contains synthetic test evidence only.

This is focused ordering-regression evidence at those pins, with no new title-unblock or FPS claim. AI-assisted: yes.

@NathanFahey23

Copy link
Copy Markdown
Contributor

Windows NVIDIA check of head 71aae52449, merged onto main 0effa485f9 (4e1d05172f, clean merge), since the NVIDIA runs so far are on Linux.

Setup: Windows 11 Home 10.0.26300, i9-13900K, WinLibs GCC 15.2.0, Release, RTX 4080 (10de:2704, driver 32.0.16.2101), ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, Khronos validation layer loaded. GPU set: ctest -R '^(agc_|shader|video_out|guest_video)' --parallel 4.

AI-assisted: yes

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants