[Frame Looping] Manage fences that are signaled/waited-on during the looping frame#2936
Open
nickdriscoll-lunarg wants to merge 2 commits into
Open
Conversation
fe91c37 to
dff761a
Compare
Contributor
antonio-lunarg
left a comment
There was a problem hiding this comment.
Mmh.. what if the collected fences belong to different devices?
Maybe it is not that common as a case, but the replay consumer is grouping various things per-device to avoid this kind of issue.
dff761a to
aa871ef
Compare
Contributor
Author
|
Good catch that my code assumes a single |
d58effd to
f26b299
Compare
antonio-lunarg
approved these changes
May 12, 2026
Contributor
antonio-lunarg
left a comment
There was a problem hiding this comment.
Make sure to squash all commits together. Anyway, LGTM.
ed4e0b8 to
6ab2f4a
Compare
6ab2f4a to
0920d5c
Compare
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.
This PR is based on top of #2935 so it will need to be merged first.
In the case of naive looping, it is easy to see how a fence can be double-signaled or double-waited-on, so we need to handle those situations.
Regarding a fence that is used during the looping frame, there are three cases:
In the first case, no special handling is needed, as the final fence operation will put the fence in the state that the first fence operation expects.
In the second case, we need to synthetically wait-on the fence so that it's in the unsignaled state at the start of the next iteration of the looping frame.
In the third case, we need to synthetically signal the fence so that it's in the signaled state at the start of the next iteration of the looping frame.