Sitelet https://github.com/flutter/flutter/pull/190379
Skip to content

[Flutter GPU] Ignore redundant render pass state assignments - #190379

Merged
auto-submit[bot] merged 1 commit into
flutter:masterfrom
bdero:bdero/flutter-gpu-resolved-pipeline-cache
Aug 5, 2026
Merged

auto-submit[bot] merged 1 commit into
flutter:masterfrom
bdero:bdero/flutter-gpu-resolved-pipeline-cache

Conversation

@bdero

@bdero bdero commented Jul 31, 2026 •

Copy link
Copy Markdown
Member

Related to #189899.

RenderPass memoizes its built pipeline behind a dirty flag, but the fixed-function setters all assign through GetPipelineDescriptor, which dirties unconditionally. Callers re-send the same cull mode, winding order, primitive type, and polygon mode ahead of most draws, and rebind the same pipeline, so the memo was being invalidated on nearly every draw. These setters now compare before assigning and leave the state clean when nothing changed.

@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. flutter-gpu team-fluttergpu Owned by Flutter GPU team labels Jul 31, 2026
@github-project-automation github-project-automation Bot moved this to 🤔 Needs Triage in Flutter GPU Jul 31, 2026
@bdero bdero added c: performance Relates to speed or footprint issues (see "perf:" labels) CICD Run CI/CD labels Jul 31, 2026
@bdero
bdero requested a review from wolfenrain July 31, 2026 23:59
@bdero
bdero marked this pull request as ready for review August 1, 2026 04:38

@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 introduces a pipeline caching mechanism in RenderPass by caching the resolved pipeline and invalidating it when relevant state changes occur. It also adds corresponding unit tests to verify pipeline reuse and invalidation. The feedback recommends adding /// documentation comments to the newly introduced public and private methods to adhere to the repository's style guide.

Comment thread engine/src/flutter/lib/gpu/render_pass.h
Comment thread engine/src/flutter/lib/gpu/render_pass.h Outdated
wolfenrain
wolfenrain previously approved these changes Aug 1, 2026
@bdero bdero added CICD Run CI/CD and removed CICD Run CI/CD labels Aug 1, 2026
@bdero
bdero force-pushed the bdero/flutter-gpu-resolved-pipeline-cache branch from 7619fac to 5336200 Compare August 2, 2026 04:33
@bdero bdero changed the title [Flutter GPU] Cache resolved render pipelines [Flutter GPU] Ignore redundant render pass state assignments Aug 2, 2026
@bdero
bdero requested a review from wolfenrain August 5, 2026 20:04
@bdero bdero added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 5, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Aug 5, 2026
Merged via the queue into flutter:master with commit b0868b3 Aug 5, 2026
22 of 23 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 5, 2026
@github-project-automation github-project-automation Bot moved this from 🤔 Needs Triage to ✅ Done in Flutter GPU Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: performance Relates to speed or footprint issues (see "perf:" labels) CICD Run CI/CD engine flutter/engine related. See also e: labels. flutter-gpu team-fluttergpu Owned by Flutter GPU team

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants