Repository navigation
fix(agc): hold flip behind worker - #2666
Merged
2 commits merged intoOct 10, 2026
Merged
2 commits merged into
2 commits merged into
Conversation
…evious one A title that paces itself on pending flips assumes what hardware gives it: the command processor consumes a submitted buffer at once, so a pending flip is a frame whose commands have been read and that only waits for the display. The queue worker is slower than that. With three flips pending it can still be recording the oldest frame while the title rewrites that frame's slot of a three-deep ring of per-frame memory for the frame after next, and the draws are then recorded with the later frame's (or half-written) constants. A submission on queue 0 that carries a flip now waits until the worker has reached the flip of every earlier one. The wait ends early when queue 0 is blocked on memory that no running or pending work writes, since only the title can end that wait. APS5_NO_FLIP_HOLD=1 submits as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017MPYE7P9ob12aAE1H4JtHF
The hold no longer polls every millisecond and has no switch to turn it off. A held submission waits on the driver's condition variable until no flip is ahead of it, or until queue 0 waits for memory that only the title can store. The queue 0 worker reports the second case from its memory and rewind waits, and the worker that reaches a flip wakes the holders. agc_driver_flip_tests: a flip held behind a rendering wait is released when the worker goes on to wait for a label only the title stores, with no further submission.
sridhar777911
changed the base branch from
ci/reject-newcomers-pr-task
to
main
October 10, 2026 10:29
2ba993a
11 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR safely resubmits PR #1745 which was previously closed due to administrative/conventions issues initially, now resolved.
What
A title that paces itself on pending flips can get further ahead of the queue 0 worker than its per-frame memory allows, and the worker then records a frame from memory the title has already rewritten.
A submission on queue 0 that carries a flip now waits until the worker has reached the flip of every earlier one. The wait ends early when queue 0 is blocked on memory that no running, held or pending work writes, the criterion orderReleased uses, since only the title can end that wait.
Tested
Windows 11, RTX 5070 Ti, Astro Bot (PPSA21564, 01.007.000), built from b3fcd6d (an older main) with this change. 45 s runs through the intro.
Checklist
ctesttools/check_conventions.py