Repository navigation
fix(agc): read GPU timing queries without waiting on unwritten ones - #6363
hypermoist wants to merge 1 commit into
Conversation
readGpuTiming runs after the batch's fence, so every timestamp the batch wrote is already available. It still passed VK_QUERY_RESULT_WAIT_BIT, so a timed range whose end stamp was never written (a BeginGpuTiming whose EndGpuTiming did not run) made vkGetQueryPoolResults wait forever on the reaping thread under APS5_PROFILE_GPU or a performance trace. Without WAIT_BIT the call returns VK_NOT_READY and the batch's timings are dropped, as other failures are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q8tinbP1MUpUaDsbNWnGnu
|
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.
|
|
Windows NVIDIA run, since the description lists Linux only. Windows 11 Pro 26200, NVIDIA GeForce RTX 4080 (driver 617.42), AMD Ryzen 7 5800X, WinLibs GCC 15.2.0 r7, Ninja, Release, bundled dependencies,
These tests do not seem to reach AI-assisted: yes (runs done with Claude Code). |
|
I reproduced this on AMD Radeon RX 6650 XT / RADV Mesa 26.2.4-arch1.1, Arch Linux, current main Added the test-only follow-up as draft #6514, explicitly depending on this PR. Validation source with your fix; standalone test commit is based directly on main if useful to cherry-pick. Full libs build and four relevant tests pass on both RADV and lavapipe with the fix. Lavapipe also passes the unfixed case, so software-driver-only testing does not expose this hang. No title or FPS claim. |
What
Recorder::readGpuTimingreads a batch's timestamp queries after the batch's fence was waited on, so every stamp the batch wrote is already available. It still passedVK_QUERY_RESULT_WAIT_BIT. Begin and end stamps are separate calls (BeginGpuTiming/EndGpuTiming), so a timed range whose end never ran, for example a draw that failed between the two and was skipped, left its end query unwritten, andvkGetQueryPoolResultsthen waited forever on the reaping thread. This only happens with GPU timing on (APS5_PROFILE_GPU, draw profiling or a performance trace).Without
WAIT_BITthe call returnsVK_NOT_READYfor such a batch and its timings are dropped, as they already are for any other non-success result.Tested
Linux (CachyOS, GCC Release, NVIDIA GeForce RTX 3060): builds; the AGC group of
ctestpasses exceptagc_driver_store_over_untracked, which fails on unmodifiedmaintoo.tools/check_conventions.pypasses;tools/pr_overlap.py --branchreports no line overlap. The stall was found profiling PPSA08427 withAPS5_PROFILE_GPU=1on my local branch; the game was not rerun on this exact rebase.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01Q8tinbP1MUpUaDsbNWnGnu