Skip to content

test(agc): wait for a batch to read as signaled before the recorder's signaled-batch checks - #12675

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
CruddOCE:test/recorder-wait-signaled
Oct 29, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
CruddOCE:test/recorder-wait-signaled

Conversation

@CruddOCE

Copy link
Copy Markdown
Contributor

What

On AMD's Windows driver 32.0.32015.7029 (RX 9070 GRE), vkGetFenceStatus returns VK_NOT_READY for a batch fence for a short time after vkQueueWaitIdle has returned (#12278), so agc_driver_recorder fails at checks that use the queue wait as a stand-in for "the batch's fence signaled". Each of those checks now first waits, for at most 5 s, until the recorder itself describes the batch as signaled (DescribePendingRead / DescribePendingWrite), then makes the same assertion. Where fences signal with the queue wait, the first query already reports signaled. Production code is unchanged.

Tested

Windows 11 Home 10.0.26200, Ryzen 5 7500X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, main 3a2b91981 with and without this commit.

RX 9070 GRE Radeon(TM) Graphics iGPU
agc_driver_recorder on main fails 3 of 3: a signaled batch's read still refuses passes 3 of 3
agc_driver_recorder with this PR passes 3 of 3 (1.7 to 4.0 s) passes 3 of 3 (1.4 to 2.1 s)
the other 95 ctest entries that run agc_driver_recorder_tests pass pass

Three checks needed the wait (lines 869, 1229 and 3679 on main). (9) a signaled write kept the scan unstable follows the same kind of queue wait but passes without it, so it is unchanged.

Full suite with this PR (2985 tests, --parallel 6). The RX 9070 GRE fails only the four #7451 tests, agc_driver_sample_order_grid_reference (#12277), guest_freebsd_clocks (the UTC host zone check that #12660 removes; this machine runs at UTC+12) and agc_driver_queued_index_read_order, which passes 3 of 3 when run alone. The iGPU fails only agc_driver_sample_order_grid_reference (#9507) and guest_freebsd_clocks. The select_tests family fails only in this machine's sandboxed shell, where a directory cannot be created through a junction under %TEMP%, and passes 13 of 13 with TEMP set elsewhere. None of these run agc_driver_recorder_tests.

The fence lag itself is reproduced without AnyPS5 by the standalone program in #12278 (comment). The Khronos validation layer is not installed here.

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: Fixes AGC: agc_driver_recorder fails on RX 9070 GRE (RDNA 4, Windows): "a signaled batch's read still refuses" #12278
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 9070 GRE (1002:7550), AMD 32.0.32015.7029, Windows 11 Home 10.0.26200; AMD Radeon(TM) Graphics (1002:164e), AMD 32.0.21045.16010, Windows 11 Home 10.0.26200
  • AI-assisted: yes

🤖 Generated with Claude Code

… signaled-batch checks

agc_driver_recorder used vkQueueWaitIdle as a stand-in for "this batch's
fence signaled". On AMD's 32.0.32015.7029 Windows driver the fence still
reads VK_NOT_READY for a short time after the queue wait returns, so the
checks failed although the recorder behaved correctly. Each one now waits,
up to 5 s, until the recorder describes the batch as signaled, then makes
the same assertion.

Fixes boykopovar#12278
@adriadam10 adriadam10 self-assigned this Oct 29, 2026
@github-actions github-actions Bot added the fix error Closes an issue (Fixes #N) label Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 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 6185 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6186 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 6905 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 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 9508 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9712 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9898 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10026 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10049 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 10472 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10920 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp

@CruddOCE

Copy link
Copy Markdown
Contributor Author

Checked the 23 pull requests above manually. For each one I applied its change to tests/Recorder.cpp onto main (3a2b91981) with a three-way merge and compared the result with this branch:

  • 12 apply cleanly, and merging the result with this branch gives no conflicts and no changed lines next to this PR's.
  • 11 conflict with main in this file on their own. Their changes land in the first 75 lines and between lines 5502 and 12360, away from this PR's insertions after lines 586, 868, 1228 and 3678.

None of them changes the lines this PR changes, so no Depends on is needed.

Related but not overlapping: #10442 adds unfinishedGuestTouchTests, whose check a signaled batch's read or write still counts runs straight after device.WaitQueue(). Its UnfinishedGuestTouch() skips a batch with reads or writes only when signaled() reads that batch's fence as VK_SUCCESS, so on the RX 9070 GRE driver from #12278 the check is likely to fail the same way. Not run here, since #10442 conflicts with main. Whichever of the two lands second can call WaitUntilSignaled before that check. The other pull requests in the list that add a device.WaitQueue() call recorder.Sync() before checking anything, and Sync() waits on each fence with vkWaitForFences, so they are not affected.

@github-actions github-actions Bot added the agc libSceAgc* label Oct 29, 2026
@babyhuey

Copy link
Copy Markdown
Contributor

Windows run of this head d24266971e97, merged onto main 3a2b9198165 (clean merge, local only), with the selection CI's skipped Windows product job uses: Windows 11, Ryzen 7 5800X, RTX 3080, WinLibs GCC 15.2, Release, BUILD_TESTING=ON. The tree was configured fresh after the merge, then select_tests.py select / ninja -f select.ninja selected / --target libs / select_tests.py ctest --parallel 4 --timeout 120.

  • Selected 649 tests: 642 pass, 1 fails, 6 skip. No failures from this PR: check_main_sync timed out at 120 s under --parallel 4; alone on the same merged tree, rebuilt, it passed 3 of 3 in 47-49 s.

AI-assisted: yes (Claude Code)

@adriadam10
adriadam10 merged commit 52f212e into boykopovar:main Oct 29, 2026
11 checks passed
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: agc_driver_recorder fails on RX 9070 GRE (RDNA 4, Windows): "a signaled batch's read still refuses"

3 participants