Skip to content

[Impeller] Fix SurfaceContextVK submission tracking and double HostBuffer reset - #196064

Merged
auto-submit[bot] merged 1 commit into
flutter:masterfrom
andywolff:impeller-hostbuffer-fixes
Nov 13, 2026
Merged

auto-submit[bot] merged 1 commit into
flutter:masterfrom
andywolff:impeller-hostbuffer-fixes

Conversation

@andywolff

@andywolff andywolff commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #196063
Fixes #193029
Pre-requisite for #192937

Fixes two host buffer bugs I ran into while working on #192937. SurfaceContextVK now forwards its parent's GPU submission tracker, and DisplayListToTexture and EntityPlayground only reset the transient host buffer once when the data and index buffers are shared.

I also removed the skip on the toImage / toImageSync comparison test in canvas_test.dart (added while testing #192937). Snapshots don't reset the host buffer on master yet, so the test already passes on Linux and Vulkan, and #192937 will exercise it with resets enabled.

Pre-launch Checklist

@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Nov 5, 2026
@andywolff

Copy link
Copy Markdown
Contributor Author

I tested these fixes on the leak fix PR #192937 (27cad45a3d6f) with the earlier test workarounds reverted. All presubmit and staging runs passed:

Builder Presubmit Staging Runs (5x) Result
Mac framework_tests_impeller 61144 50, 51, 52, 53, 54 6/6 SUCCESS
Linux linux_host_engine_test 19295 6, 7, 8, 9, 10 6/6 SUCCESS

@andywolff andywolff added the CICD Run CI/CD label Nov 5, 2026
@andywolff
andywolff force-pushed the impeller-hostbuffer-fixes branch 4 times, most recently from 574500b to 3d53a29 Compare November 11, 2026 21:29
… double HostBuffer reset in DisplayListToTexture
@andywolff
andywolff force-pushed the impeller-hostbuffer-fixes branch from 3d53a29 to 86d1419 Compare November 12, 2026 23:09
@andywolff
andywolff marked this pull request as ready for review November 12, 2026 23:09
@andywolff
andywolff requested a review from gaaclarke November 12, 2026 23:10

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors transient buffer resets in Impeller by replacing manual resets of data and index buffers with a unified ResetTransientsBuffers call in dl_dispatcher.cc and entity_playground.cc, supported by a new unit test. It also exposes the GpuSubmissionTracker in SurfaceContextVK with an accompanying unit test, and re-enables the 'toImage and toImageSync have identical contents' test on Linux and Vulkan platforms. I have no feedback to provide on these changes.

@gaaclarke gaaclarke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks

@andywolff andywolff added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 13, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 13, 2026
@auto-submit

auto-submit Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/196064, because - The status or check suite Presubmit has failed. Please fix the issues identified (or deflake) before re-applying this label.

@andywolff andywolff added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 13, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Nov 13, 2026
Merged via the queue into flutter:master with commit edb8cea Nov 13, 2026
27 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD e: impeller Impeller rendering backend issues and features requests engine flutter/engine related. See also e: labels.

Projects

None yet

2 participants