Skip to content

test(agc): accept compared shared pages after import cuts - #10785

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Sumaiter:fix-host-import-cut-watch
Oct 26, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Sumaiter:fix-host-import-cut-watch

Conversation

@Sumaiter

Copy link
Copy Markdown
Contributor

What

Update the host-import cut fixture for the compared-shared behavior introduced by #9159. Native write-watched ranges keep every previous assertion. An unwatched range is accepted only when collection is refused, no unchanged or untracked-hint proof is available, every page is reported as compared shared, and every page remains writable. Both paths still verify CPU stores through GPU readback. No production code changes.

Tested

Windows 11 Pro for Workstations 26200, WinLibs GCC 15.2.0, AMD Radeon RX 9070 XT (driver 32.0.32015.7029). Synthetic tests only; no title or homebrew run.

  • On unmodified main, agc_host_import_cut_lifetime reproduced the 1440 KiB failure. With this change it passes, including remapping and GPU readback.
  • agc_host_import_cut_lifetime, agc_reimport_bench, windows_write_watch, agc_rewatched_direct_shared, agc_import_alias_shared, agc_compared_shared_generations and agc_driver_compared_shared_snapshot pass with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Neither the baseline nor the changed focused log contains a missing-layer warning or a VUID- error.
  • Full build passed. Full ctest --output-on-failure --parallel 6: 2273 passed, 7 skipped, 8 failed. The same 8 fail when rerun serially: agc_driver_depth_plane_partial_store, agc_driver_division_output_modifiers, agc_driver_division_result_modifiers, agc_driver_f64_conversions, agc_driver_f64_transcendental, agc_driver_sample_order_grid_reference, guest_rtc, pad_sdl. These are separate test executables; this PR changes only Recorder.cpp and no production code.
  • python tools/check_conventions.py --base origin/main passed. python tools/pr_overlap.py --branch fix-host-import-cut-watch --repo boykopovar/AnyPS5 completed; the 23 conflicting PRs it could not compare were checked for the changed helper and fixtures, with no shared function found.

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 (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: agc_host_import_cut_lifetime fails on Windows since the merge of #9159 #10746
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 9070 XT, driver 32.0.32015.7029, Windows 11 Pro for Workstations 26200
  • AI-assisted: yes

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I reviewed the changed helper against the reported #10746 failure and the compared-shared behavior introduced by #9159. The test keeps the existing write-watch assertions when the range is watched; for the unwatched path it checks that collection and hints provide no proof, all pages are listed as committed and writable compared-shared pages, then verifies CPU stores through GPU readback. That matches the failure mode and keeps the test focused on the transition under test.

check_conventions.py and git diff --check pass on this head. I could not run the GPU fixture locally: CMake configuration stops because this checkout lacks the SDL2 submodule and the environment lacks XRandR support. I reviewed the submitted Windows validation report, including the focused Vulkan validation runs and its separately listed full-suite failures; I am not treating those eight failures as passing or as verified pre-existing.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1395 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5021 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6187 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6188 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6192 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6209 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6970 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6971 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6973 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6987 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6989 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6995 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7002 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7048 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7457 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7604 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7642 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 8484 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9402 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9508 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10026 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10193 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10442 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10443 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp

@Sumaiter

Copy link
Copy Markdown
Contributor Author

Follow-up on the eight full-suite failures:

No code was changed during this classification. AI-assisted with K3.1 Pro.

@ycbuzi

ycbuzi commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Windows run for #10746. 27839d8b7e merged onto main ebcde5245d (1a78f99a21, clean), Windows 11 Home 10.0.26200 (the issue's runs were on Windows 10), WinLibs MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1.

agc_host_import_cut_lifetime run 1 run 2 run 3
main ebcde5245d fails fails fails
this PR passes passes passes

main fails with the message from #10746: the larger side of an unmap of 1440 KiB at the start of the import's first 2 MiB run left the write watch. Correction (thanks @lgqdaxia): the test does use a Vulkan device. Its cases check that "the GPU and write tracking see the guest's bytes", but it doesn't log which adapter it picked, so the runs above don't establish the GPU (this machine defaults to ANYPS5_GPU=4070, an RTX 4070 SUPER on driver 616.92). Not run: the rest of the recorder suite. AI-assisted: yes (Claude Code)

@Jishnuraj07

Copy link
Copy Markdown
Contributor

Windows run on another NVIDIA GPU, with this PR's head 27839d8b7e merged onto main 75227c7cdc (clean merge).

Setup: Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON; NVIDIA GeForce RTX 5060, driver 617.42 (32.0.16.1742); Intel Core i5-14400F. All runs used VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (layer 1.4.363), ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1, with ctest -V.

  • agc_host_import_cut_lifetime: fails 3 of 3 on main at the larger side of an unmap of 1440 KiB at the start of the import's first 2 MiB run left the write watch; passes 3 of 3 with this PR.
  • The 60 tests matching texture|depth|host_import|plane: on main 58 pass, plus this test and agc_driver_depth_plane_partial_store (AGC: imported depth-plane partial-store test fails refresh-proof assertion on Windows (NVIDIA and AMD) #10664, unrelated) failing. With this PR all except agc_driver_depth_plane_partial_store pass, so there are no new failures.
  • Neither log reports was not found but was requested by env var VK_INSTANCE_LAYERS, and neither has a VUID- validation error.

AI-assisted: yes (Claude Code)

@lgqdaxia

Copy link
Copy Markdown
Contributor

Thanks for the additional Windows 11 red/green repeats. One detail about calling this CPU-only: on this PR's pinned head, requireImportServesGuest creates a readback buffer, records two Vulkan copies, calls recorder.Sync(), and checks the GPU-read bytes. A missing Selected GPU log line alone does not establish that no Vulkan device was used.

Could you add the adapter/driver information or the relevant device-initialization log from a passing run? The three repeats per side are still useful same-host evidence; this just keeps their scope clear.

AI-assisted source check; I have not rerun your GPU comparison.

@ycbuzi

ycbuzi commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

@lgqdaxia you're right, and I've corrected that line above. Rerunning the PR merge (1a78f99a21) with -V shows every case reporting that "the GPU and write tracking see the guest's bytes", so a device is used, but neither the test nor the recorder logs the adapter or driver: there's no Selected GPU or device-name line in the output. I ran it with ANYPS5_GPU=4070 (RTX 4070 SUPER, 616.92) and with ANYPS5_GPU=Radeon (RDNA2 iGPU, 32.0.21030.2001), both with ANYPS5_REQUIRE_VULKAN=1, and it passes both times, but from the log alone I can't confirm that the selection took effect. So the scope is: Windows 11, same host, red on main and green with this PR, adapter not logged. AI-assisted: yes (Claude Code)

@Bram910

Bram910 commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Independent confirmation on Windows 11, desktop RTX 3080, Ryzen 9 7950X, WinLibs GCC 15.2.0 r7, Release, on main 57f506f811 with this PR applied. agc_host_import_cut_lifetime fails 3/3 on unchanged main and passes 3/3 with this PR, plus 10/10 consecutive. The other 23 host-import, write-watch, compared-shared and depth-plane tests are unchanged (the sparse test skips as Linux-only). Combined with #10696, the full Windows suite passes apart from the 6 platform skips.

AI-assisted: yes (Claude Code)

@brummilab

Copy link
Copy Markdown

Another AMD Windows data point, a discrete RDNA2 card: Radeon RX 6600 XT (Navi 23, 0x73ff), AMD driver 32.0.21045.16010, Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, Vulkan SDK 1.4.363. main 5d48c6233 and this PR (head 27839d8b7) merged onto it, same machine.

agc_host_import_cut_lifetime, 3 runs each without the layer: main fails 3 of 3, this PR passes 3 of 3.

Validation run with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, tests matching host_import|import_alias|compared_shared|rewatched_direct|windows_write_watch|reimport_bench, each on its own with VK_KHRONOS_VALIDATION_LOG_FILENAME so the layer's log confirms it loaded:

Tests Passed Failed Skipped Layer loaded VUID- messages
main 19 17 1 1 13 0
this PR 19 18 0 1 13 0

The only failure on main is agc_host_import_cut_lifetime, which this PR fixes; agc_host_import_sparse skips on both. No validation errors on either arm.

AI-assisted: yes

@SeaSunPT

Copy link
Copy Markdown
Contributor

Tested on NVIDIA. The PR so far has AMD results only.

Windows 11 Pro 26200, Intel Core i5-14600K, NVIDIA GeForce RTX 5070 Ti (driver 610.88), WinLibs GCC 15.2.0 r7, Release. Head 27839d8b7 merged onto main a7a2eece4, compared with that main.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R "^(agc_host_import_cut_lifetime|agc_reimport_bench|windows_write_watch|agc_rewatched_direct_shared|agc_import_alias_shared|agc_compared_shared_generations|agc_driver_compared_shared_snapshot)$" -V, 3 runs each:

  • main: 6 of 7 pass every run. agc_host_import_cut_lifetime fails with "the larger side of an unmap of 1440 KiB at the start of the import's first 2 MiB run left the write watch" (agc_host_import_cut_lifetime fails on Windows since the merge of #9159 #10746).
  • This PR: 7 of 7 pass every run.
  • 0 VUID- lines and no missing-layer line in any log. The validation layer is Khronos vulkan-sdk-1.4.363.0, built from source with the same GCC (mimalloc off).

Full ctest -j 8 with ANYPS5_REQUIRE_VULKAN=1: 2374 of 2375 pass. The one failure is agc_driver_depth_plane_partial_store (#10664), which fails on main too.

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

Labels

agc libSceAgc* fix error Closes an issue (Fixes #N)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agc_host_import_cut_lifetime fails on Windows since the merge of #9159

9 participants