Skip to content

test(agc): fix two stale expectations in the full recorder run - #3103

Merged
adriadam10 merged 2 commits into
boykopovar:mainfrom
fma-rc:test/recorder-full-run
Oct 11, 2026
Merged

adriadam10 merged 2 commits into
boykopovar:mainfrom
fma-rc:test/recorder-full-run

Conversation

@fma-rc

@fma-rc fma-rc commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

What

Test-only changes in tests/Recorder.cpp so that a full agc_driver_recorder_tests run (no arguments, which ctest never does) gets to the end again on current main.

staleGenerationTests, step (s): after the Refresh() over untracked memory the image is still pending, so the check now flushes it explicitly first, the way the unwatched branch of storageRefreshTests already does.

importWindowTests, step (w): image->MarkDirty() already creates the import, so cached was taken after the pages were reported and UnchangedSince stayed true.

Both steps, since #2699: StorageTexture::upload now calls HostImportFor on the fast-clear path (Texture.cpp:1940), so constructing the image imports the surface and takes the range off the watch. The image still collects its generation before that import (Texture.cpp:1915), which is what the steps guard, so only their precondition was stale. (s) now requires the block to be watched before the image is constructed and the image to hold a generation afterwards. (w) takes cached and checks !HostImportCovers before the constructor, and checks that the image's generation predates the import window.

Refs #1532 (the full run is still not registered with ctest, so the issue stays open with this).

Tested

Arch Linux, GCC 16.2.1, Release, RTX 5080 (NVIDIA 615.78.08) and Radeon 610M (RADV), ANYPS5_REQUIRE_VULKAN=1, full run with no arguments. The branch is rebased onto main 65a4e8e.

RTX 5080 RADV
main 2bb78d2 + the first commit only exit 1, (s) the storage image imported its memory before a generation was taken same
+ the (s) change only exit 1, (w) the storage image imported its memory before a generation was taken same
this branch (on main 65a4e8e) exit 0, Recorder read tracking and label tests passed same

Mutations on the driver, each run on both devices: counting an image with a generation as tracked in Texture.cpp:1564 turns (s) red (the image is not pending after the refresh); forcing written = true in GuestMemory.cpp:945 turns (w) red (the pages the import reported read as written by the CPU). Removing the import at Texture.cpp:1940 leaves the run green. The [gpu] lease wait failed ... Vulkan result -4 line in the old logs came from the image being destroyed with its clear recorded when the Require threw; it is in no passing log.

Not shown: no mutation targets the "results pending over the import window" drop path of (w), whose window now falls inside the constructor. Not tested on Windows by me (both steps are skipped there).

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 in TechnicalDebt
  • 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
  • AI-assisted: yes

@github-actions github-actions Bot added the intake paused Closed while PR intake is limited to authors with at least 10 PRs merged into main label Oct 10, 2026
@github-actions

Copy link
Copy Markdown

Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

@github-actions github-actions Bot closed this Oct 10, 2026
@oneandonlydean oneandonlydean removed the intake paused Closed while PR intake is limited to authors with at least 10 PRs merged into main label Oct 11, 2026
@github-actions github-actions Bot added the agc libSceAgc* label Oct 11, 2026

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the follow-up. I ran the full agc_driver_recorder_tests (no arguments, RADV) with this PR merged onto current main: it exits 1 on (s) the storage image imported its memory before a generation was taken, before reaching either step this PR changes. That matches your note on #1532 (it started with #2699), so on main the PR's two fixes can't be shown to work.

  • The (s) stop after #2699 needs to be settled first, either by taking the generation before constructing the image in staleGenerationTests, or by deciding that the early import is a problem for what (s) guards. It can go in this PR or a separate one.
  • Then please show the full run exiting 0 on current main with the PR, and update the Tested table.
  • Fixes #1532 should stay only if the full run is green on main; the issue also covers the test never running in CI.

The two changes themselves (explicit flush in (s), cached taken before MarkDirty() in (w)) look reasonable.

@Mouhand-Kaddo

Copy link
Copy Markdown
Contributor

Additional platform validation of standalone PR head 1c7ff0bfbd5acde358f85c699149425750406ec5 (2026-10-11):

Windows: passed — Windows 11, WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7; CMake 4.3.1 / Ninja; Release, BUILD_TESTING=ON.

1 checks, 0 failures, 0 CTest skips. Built the selected targets and dependencies; this is focused validation, not a full build or full-suite run.

Checks: agc_driver_graphics.

Command after building: ctest --test-dir <build> --verbose --no-tests=error --timeout 30 -R "^agc_driver_graphics$".

This scope checks CPU-side behavior; no GPU execution result is claimed.

passed full recorder executable

No title/gameplay validation. These results cover the standalone head, not a merge with current main.

@reyani-dev

Copy link
Copy Markdown
Contributor

Windows run, Windows 11 (10.0.26200), WinLibs GCC 15.2.0 r7, Release, with VK_LOADER_DRIVERS_DISABLE=*dzn* (this machine's Dozen ICD crashes on its own, #3255), NVIDIA RTX 4070 Laptop GPU (driver 616.92), head 1c7ff0bf merged onto current main:

  • The full agc_driver_recorder_tests run with no arguments (ANYPS5_REQUIRE_VULKAN=1) exits 0 (Recorder read tracking and label tests passed) both with this change and on plain main. Both steps it fixes print Linux write watch only and are skipped on Windows, so this run only shows the change is harmless there; it doesn't exercise the fix.
  • ctest -R "^agc_|video_out|^shader|recompiler": 358/358 pass.

@fma-rc
fma-rc force-pushed the test/recorder-full-run branch from 1c7ff0b to 433302b Compare October 11, 2026 07:50
@fma-rc

fma-rc commented Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

Done in 433302b, and the branch is rebased onto main 65a4e8e: the full run exits 0 on the RTX 5080 and on RADV.

The early import is the fast-clear path of StorageTexture::upload calling HostImportFor (Texture.cpp:1940, from #2699). The image still collects its generation before that import (Texture.cpp:1915), so what (s) guards holds and only the test's precondition was stale. (s) now requires the block to be watched before the image is constructed and the image to hold a generation afterwards. With (s) fixed the run stopped on the same message in (w), for the same reason, so that step got the same treatment.

The description has the new table and two driver mutations that turn each step red. I changed Fixes #1532 to Refs, since the full run is still not registered with ctest.

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Checked the full agc_driver_recorder_tests run (no arguments, ANYPS5_REQUIRE_VULKAN=1, RADV) with this PR merged onto current main: exits 0. The same run with main's Recorder.cpp stops at (s) the storage image imported its memory before a generation was taken. The test-only diff fits the StorageTexture::upload fast-clear import from #2699; merging once CI is green.

@adriadam10
adriadam10 merged commit 65313a2 into boykopovar:main Oct 11, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants