Repository navigation
Conversation
andywolff
force-pushed
the
gpu-tracer-multi-surface
branch
2 times, most recently
from
November 20, 2026 16:07
365acf6 to
7127b0d
Compare
andywolff
force-pushed
the
gpu-tracer-multi-surface
branch
from
November 23, 2026 20:37
7127b0d to
f46d093
Compare
andywolff
force-pushed
the
gpu-tracer-multi-surface
branch
from
November 24, 2026 21:40
f46d093 to
7f7504d
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.
Part of #196834
When a secondary swapchain renders a frame and then goes idle (such as an overlay swapchain when platform views scroll offscreen or no Flutter layers overlap them), it retains its last onscreen command buffer and
GPUProbein its frame-synchronizer ring until that slot is overwritten two presents later on the same swapchain. Because all swapchains on a context shareGPUTracerVK's 16-slottrace_states_ring, those retained probes keeppending_buffersnon-zero on that trace state, dropping GPU frame time metrics and triggering thestate.pending_buffers == 0udebug assertion once the active swapchain wraps around 16 frames later.This PR fixes this by transferring ownership of
final_cmd_buffer'sGPUProbefromAHBSwapchainImplVKandKHRSwapchainImplVKtoFenceWaiterVKvia a trailing queue fence inGPUTracerVK::ReleaseCommandBufferOnFencewhenever GPU tracing is enabled and the probe has an active frame index, so the probe is destroyed as soon as the GPU finishes regardless of whether that swapchain presents again.This also fixes
GPUTracerVK::RecordCmdBufferEndto index the probe's own trace state slot (*probe.index_) rather thancurrent_state_, and alignsAHBSwapchainImplVKwithKHRSwapchainImplVKby callingMarkFrameStartandMarkFrameEndwithout#if IMPELLER_DEBUGguards (relying onGPUTracerVK::enabled_).Pre-launch Checklist
///).