Skip to content

[Impeller] Allow attaching specific texture mip levels and slices#187066

Merged
auto-submit[bot] merged 2 commits into
flutter:masterfrom
bdero:bdero/slice-attachments
Jun 2, 2026
Merged

[Impeller] Allow attaching specific texture mip levels and slices#187066
auto-submit[bot] merged 2 commits into
flutter:masterfrom
bdero:bdero/slice-attachments

Conversation

@bdero

@bdero bdero commented May 25, 2026

Copy link
Copy Markdown
Member

Fixes #145014 (the attachment half; uploading specific mip levels and slices already landed).

Impeller could only attach the base mip level and slice of a texture as a render target. This adds mip_level and slice to the HAL Attachment struct so a render pass can target a specific mip level, cube map face, or array layer. The render target size follows the selected mip level.

  • Metal: sets the attachment descriptor's level and slice.
  • Vulkan: creates one 2D attachment view per mip level and layer, and bypasses the framebuffer cache for non-base subresources.
  • OpenGL ES: attaches the cube face target and mip level, allocates the subresource on demand, and gates non-zero mip levels on ES 3.0 or GL_OES_fbo_render_mipmap. Rendering to cube faces works down to ES 2.0.

Tests cover attachment validation, cross-backend rendering to a slice and to a mip level, and a renderer golden that samples two mip levels.

Pre-launch Checklist

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 25, 2026
@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests and removed CICD Run CI/CD labels May 25, 2026
@bdero bdero added the CICD Run CI/CD label May 25, 2026
@bdero bdero requested a review from gaaclarke May 26, 2026 00:14
@bdero bdero marked this pull request as ready for review May 26, 2026 00:14

@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 support for rendering directly into specific texture subresources (mip levels and slices/cube map faces) across the GLES, Metal, and Vulkan backends. It updates the Attachment struct to track mip_level and slice, adapts framebuffer attachment and size calculations accordingly, and adds corresponding unit tests. The review feedback identifies two issues: first, the Vulkan framebuffer caching logic (can_cache_frame_data) only checks the primary color attachment, which can lead to incorrect cache hits if other attachments (MRT, depth, or stencil) use non-zero subresources; second, SizeForMipLevel lacks a guard against shifting by 32 or more bits, which can trigger undefined behavior.

Comment thread engine/src/flutter/impeller/renderer/backend/vulkan/render_pass_vk.cc Outdated
Comment thread engine/src/flutter/impeller/renderer/render_target.cc
@github-actions github-actions Bot removed the CICD Run CI/CD label May 26, 2026
@bdero bdero added the CICD Run CI/CD label May 26, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label May 26, 2026
@bdero bdero added the CICD Run CI/CD label May 26, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label May 26, 2026
@bdero bdero added the CICD Run CI/CD label May 26, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label May 26, 2026
@bdero bdero added the CICD Run CI/CD label May 26, 2026
@gaaclarke gaaclarke requested a review from walley892 May 26, 2026 15:52
@gaaclarke

Copy link
Copy Markdown
Member

@walley892 can you give this a look, please?

@gaaclarke gaaclarke removed their request for review May 26, 2026 15:53
Comment on lines +169 to +171
// reused when every attachment renders into its base subresource. If any
// attachment targets a non-zero mip level or slice, build a fresh
// framebuffer each time.

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.

This seems slow. Two questions:

  1. how often do you see this being the case in the near and far future?

  2. how much of a pain would it be to update the key to include mip level and slice?

@bdero bdero May 28, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

DOne. Made the cache subresource-aware in 277e761.

const uint32_t rt_mip_count = is_render_target ? image_info.mipLevels : 1u;
const uint32_t rt_layer_count =
is_render_target ? ToArrayLayerCount(desc.type) : 1u;
std::vector<vk::UniqueImageView> rt_image_views;

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.

nit: How often are the image views allocated? Is it worth it to preallocate this vector?

@bdero bdero May 28, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good call. Added rt_image_views.reserve(rt_mip_count * rt_layer_count) before the loop.

@bdero bdero force-pushed the bdero/slice-attachments branch from 3adfb4e to 8b8aa34 Compare May 28, 2026 04:49
@github-actions github-actions Bot removed the CICD Run CI/CD label May 28, 2026
@bdero bdero added the CICD Run CI/CD label May 28, 2026
@bdero bdero force-pushed the bdero/slice-attachments branch from 8b8aa34 to 277e761 Compare May 28, 2026 06:02
@github-actions github-actions Bot removed the CICD Run CI/CD label May 28, 2026
@bdero bdero added CICD Run CI/CD and removed CICD Run CI/CD labels May 28, 2026
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 28, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label May 28, 2026
@bdero bdero added the CICD Run CI/CD label May 28, 2026
bdero added 2 commits May 29, 2026 15:17
Impeller could only attach the base mip level and slice of a texture as
a render target. This adds mip_level and slice to the HAL Attachment
struct so a render pass can target a specific mip level, cube map face,
or array layer. The render target size follows the selected mip level.

- Metal: sets the attachment descriptor's level and slice.
- Vulkan: creates one 2D attachment view per mip level and layer, and
  bypasses the framebuffer cache for non-base subresources.
- OpenGL ES: attaches the cube face target and mip level, allocates the
  subresource on demand, and gates non-zero mip levels on ES 3.0 or
  GL_OES_fbo_render_mipmap. Rendering to cube faces works down to
  ES 2.0.

Tests cover attachment validation and cross-backend rendering to a
slice and to a mip level.

Fixes flutter#145014 (the attachment half; uploading specific
mip levels and slices already landed).
@bdero bdero added CICD Run CI/CD and removed CICD Run CI/CD labels May 29, 2026
@flutter-dashboard

Copy link
Copy Markdown

This pull request is not mergeable in its current state, likely because of a merge conflict. Pre-submit CI jobs were not triggered. Pushing a new commit to this branch that resolves the issue will result in pre-submit jobs being scheduled.

@bdero bdero force-pushed the bdero/slice-attachments branch from f5d864d to cf2c26c Compare May 29, 2026 22:18
@github-actions github-actions Bot removed the CICD Run CI/CD label May 29, 2026
@bdero bdero added the CICD Run CI/CD label May 31, 2026
@bdero bdero added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 2, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Jun 2, 2026
Merged via the queue into flutter:master with commit 50c2652 Jun 2, 2026
206 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 2, 2026
@jtmcdole

jtmcdole commented Jun 2, 2026

Copy link
Copy Markdown
Member

Reason for revert: breaking several tests in post
image

@flutteractionsbot

Copy link
Copy Markdown
Contributor

Successfully created revert PR: #187445

@flutteractionsbot flutteractionsbot removed the revert_wf Revert using Github Workflow label Jun 2, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jun 2, 2026
flutter/flutter@54e199a...701665b

2026-06-02 engine-flutter-autoroll@skia.org Roll Skia from c97e939eb5c9 to 279b17fe9fc1 (16 revisions) (flutter/flutter#187425)
2026-06-02 bdero@google.com [Flutter GPU] Add block-compressed texture format support (BC, ETC2, ASTC LDR) (flutter/flutter#187281)
2026-06-02 bdero@google.com [Impeller] Allow attaching specific texture mip levels and slices (flutter/flutter#187066)
2026-06-02 bdero@google.com [Impeller] Fix GLES command submission status before context is current (flutter/flutter#187293)
2026-06-02 engine-flutter-autoroll@skia.org Roll Dart SDK from 3cdc25e8ffe9 to d39850bf4a01 (9 revisions) (flutter/flutter#187409)
2026-06-01 jason-simmons@users.noreply.github.com [Impeller] Use glVertexAttribDivisor on GLES3 and glVertexAttribDivisorEXT on GLES2 with the extension (flutter/flutter#187313)
2026-06-01 matt.boetger@gmail.com [Android] Add Javadoc documentation to TextInputChannel (flutter/flutter#186018)
2026-06-01 mvincentong@gmail.com Read FLTEnableWideGamut from Dart bundle (flutter/flutter#186509)
2026-06-01 matt.boetger@gmail.com [flutter_tools] Remove obsolete AndroidX console warning during Gradle builds (flutter/flutter#186077)
2026-06-01 kjlubick@users.noreply.github.com [skia] Update gni file list name hsw -> ml3 (flutter/flutter#184892)
2026-06-01 zhongliu88889@gmail.com [web] Always sync slider input attrs regardless of gesture mode (flutter/flutter#187217)
2026-06-01 zhongliu88889@gmail.com [flutter_driver] Don't throw when stderr is unavailable on web (flutter/flutter#187190)
2026-06-01 116356835+AbdeMohlbi@users.noreply.github.com Remove unused code in `FlutterPluginUtils.kt` (flutter/flutter#187012)
2026-06-01 taak140@gmail.com [flutter_tools] Fix `flutter drive --chrome-binary` being ignored on web (flutter/flutter#185481)
2026-06-01 davidmartos96@gmail.com Eager failure when building and no XCode build settings (flutter/flutter#184726)
2026-06-01 goung123@gmail.com Fix Windows Korean IME caret position during composition (flutter/flutter#186353)
2026-06-01 okorohelijah@google.com iOS: update provisioning profile for 2026-2027 cert (flutter/flutter#187280)
2026-06-01 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#187380)
2026-06-01 jason-simmons@users.noreply.github.com Reland "Move dart-lang/ai to a top level third party dependency in engine (#187268)" (flutter/flutter#187378)
2026-06-01 stuartmorgan@google.com Add vector_math to Framework triage (flutter/flutter#187389)
2026-06-01 engine-flutter-autoroll@skia.org Roll Packages from e930ced to f5d50ca (4 revisions) (flutter/flutter#187381)
2026-06-01 mr_nadeem_iqbal@yahoo.com [flutter_tools] Reject archive entries that escape into a sibling directory by name prefix (#185794) (flutter/flutter#186647)
2026-06-01 bkonyi@google.com [flutter_tools] Fix widget_preview unawaited async write race condition (flutter/flutter#187177)
2026-06-01 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#187375)
2026-06-01 engine-flutter-autoroll@skia.org Roll Skia from 0aee4675e0ad to c97e939eb5c9 (7 revisions) (flutter/flutter#187371)
2026-06-01 mr_nadeem_iqbal@yahoo.com docs: Stack.clipBehavior = Clip.none does not extend hit testing (#160787) (flutter/flutter#186643)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
andywolff pushed a commit to andywolff/flutter that referenced this pull request Jun 2, 2026
…ices" (flutter#187445)

Reverts: [[Impeller] Allow attaching specific texture mip levels and
slices](flutter#187066)

Initiated by: @jtmcdole

Reason for reverting: breaking several tests in post

Original PR Author: @bdero

Reviewed By: @walley892

The original PR description is provided below:

Fixes flutter#145014 (the attachment half; uploading specific
mip levels and slices already landed).

Impeller could only attach the base mip level and slice of a texture as
a render target. This adds `mip_level` and `slice` to the HAL
`Attachment` struct so a render pass can target a specific mip level,
cube map face, or array layer. The render target size follows the
selected mip level.

- Metal: sets the attachment descriptor's level and slice.
- Vulkan: creates one 2D attachment view per mip level and layer, and
bypasses the framebuffer cache for non-base subresources.
- OpenGL ES: attaches the cube face target and mip level, allocates the
subresource on demand, and gates non-zero mip levels on ES 3.0 or
`GL_OES_fbo_render_mipmap`. Rendering to cube faces works down to ES
2.0.

Tests cover attachment validation, cross-backend rendering to a slice
and to a mip level, and a renderer golden that samples two mip levels.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
bdero added a commit to bdero/flutter that referenced this pull request Jun 2, 2026
…utter#187066)

Fixes flutter#145014 (the attachment half; uploading specific
mip levels and slices already landed).

Impeller could only attach the base mip level and slice of a texture as
a render target. This adds `mip_level` and `slice` to the HAL
`Attachment` struct so a render pass can target a specific mip level,
cube map face, or array layer. The render target size follows the
selected mip level.

- Metal: sets the attachment descriptor's level and slice.
- Vulkan: creates one 2D attachment view per mip level and layer, and
bypasses the framebuffer cache for non-base subresources.
- OpenGL ES: attaches the cube face target and mip level, allocates the
subresource on demand, and gates non-zero mip levels on ES 3.0 or
`GL_OES_fbo_render_mipmap`. Rendering to cube faces works down to ES
2.0.

Tests cover attachment validation, cross-backend rendering to a slice
and to a mip level, and a renderer golden that samples two mip levels.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
pull Bot pushed a commit to g-star1024/flutter that referenced this pull request Jun 3, 2026
…ices (flutter#187470)

Relands flutter#187066, reverted in flutter#187445.

The original PR passed every pre-submit check and merged cleanly, but
broke post-submit on Mac and Linux because a concurrent change (flutter#187246,
`b4e5291940c` "add sdf golden variants for OpenGL") added a
`kOpenGLESSDF` variant to `PlaygroundBackend` that was not present when
this PR's CI last ran. `CanRenderToMipLevel` only skipped `kOpenGLES`,
so on the post-submit master it ran on `kOpenGLESSDF` and aborted with
SIGABRT because the GLES test backend does not support rendering into
non-zero mip levels. This reland is identical to flutter#187066 plus the
missing `kOpenGLESSDF` skip in `CanRenderToMipLevel`, matching the skip
pattern that every other GLES-skipping test in `renderer_unittests.cc`
already uses after flutter#187246.

Failing test seen post-submit (Mac mac_unopt build 12910, Linux
linux_unopt build 18302):
`Play/RendererTest.CanRenderToMipLevel/OpenGLESSDF` returned/aborted
with exit code -6.

---

Fixes flutter#145014 (the attachment half; uploading specific
mip levels and slices already landed).

Impeller could only attach the base mip level and slice of a texture as
a render target. This adds `mip_level` and `slice` to the HAL
`Attachment` struct so a render pass can target a specific mip level,
cube map face, or array layer. The render target size follows the
selected mip level.

- Metal: sets the attachment descriptor's level and slice.
- Vulkan: creates one 2D attachment view per mip level and layer, and
the framebuffer cache is keyed on `(sample_count, mip_level, slice)` so
non-base subresources reuse cached framebuffers.
- OpenGL ES: attaches the cube face target and mip level, allocates the
subresource on demand, and gates non-zero mip levels on ES 3.0 or
`GL_OES_fbo_render_mipmap`. Rendering to cube faces works down to ES
2.0.

Tests cover attachment validation and cross-backend rendering to a slice
and to a mip level.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…r#11822)

flutter/flutter@54e199a...701665b

2026-06-02 engine-flutter-autoroll@skia.org Roll Skia from c97e939eb5c9 to 279b17fe9fc1 (16 revisions) (flutter/flutter#187425)
2026-06-02 bdero@google.com [Flutter GPU] Add block-compressed texture format support (BC, ETC2, ASTC LDR) (flutter/flutter#187281)
2026-06-02 bdero@google.com [Impeller] Allow attaching specific texture mip levels and slices (flutter/flutter#187066)
2026-06-02 bdero@google.com [Impeller] Fix GLES command submission status before context is current (flutter/flutter#187293)
2026-06-02 engine-flutter-autoroll@skia.org Roll Dart SDK from 3cdc25e8ffe9 to d39850bf4a01 (9 revisions) (flutter/flutter#187409)
2026-06-01 jason-simmons@users.noreply.github.com [Impeller] Use glVertexAttribDivisor on GLES3 and glVertexAttribDivisorEXT on GLES2 with the extension (flutter/flutter#187313)
2026-06-01 matt.boetger@gmail.com [Android] Add Javadoc documentation to TextInputChannel (flutter/flutter#186018)
2026-06-01 mvincentong@gmail.com Read FLTEnableWideGamut from Dart bundle (flutter/flutter#186509)
2026-06-01 matt.boetger@gmail.com [flutter_tools] Remove obsolete AndroidX console warning during Gradle builds (flutter/flutter#186077)
2026-06-01 kjlubick@users.noreply.github.com [skia] Update gni file list name hsw -> ml3 (flutter/flutter#184892)
2026-06-01 zhongliu88889@gmail.com [web] Always sync slider input attrs regardless of gesture mode (flutter/flutter#187217)
2026-06-01 zhongliu88889@gmail.com [flutter_driver] Don't throw when stderr is unavailable on web (flutter/flutter#187190)
2026-06-01 116356835+AbdeMohlbi@users.noreply.github.com Remove unused code in `FlutterPluginUtils.kt` (flutter/flutter#187012)
2026-06-01 taak140@gmail.com [flutter_tools] Fix `flutter drive --chrome-binary` being ignored on web (flutter/flutter#185481)
2026-06-01 davidmartos96@gmail.com Eager failure when building and no XCode build settings (flutter/flutter#184726)
2026-06-01 goung123@gmail.com Fix Windows Korean IME caret position during composition (flutter/flutter#186353)
2026-06-01 okorohelijah@google.com iOS: update provisioning profile for 2026-2027 cert (flutter/flutter#187280)
2026-06-01 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#187380)
2026-06-01 jason-simmons@users.noreply.github.com Reland "Move dart-lang/ai to a top level third party dependency in engine (#187268)" (flutter/flutter#187378)
2026-06-01 stuartmorgan@google.com Add vector_math to Framework triage (flutter/flutter#187389)
2026-06-01 engine-flutter-autoroll@skia.org Roll Packages from e930ced to f5d50ca (4 revisions) (flutter/flutter#187381)
2026-06-01 mr_nadeem_iqbal@yahoo.com [flutter_tools] Reject archive entries that escape into a sibling directory by name prefix (#185794) (flutter/flutter#186647)
2026-06-01 bkonyi@google.com [flutter_tools] Fix widget_preview unawaited async write race condition (flutter/flutter#187177)
2026-06-01 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#187375)
2026-06-01 engine-flutter-autoroll@skia.org Roll Skia from 0aee4675e0ad to c97e939eb5c9 (7 revisions) (flutter/flutter#187371)
2026-06-01 mr_nadeem_iqbal@yahoo.com docs: Stack.clipBehavior = Clip.none does not extend hit testing (#160787) (flutter/flutter#186643)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
…utter#187066)

Fixes flutter#145014 (the attachment half; uploading specific
mip levels and slices already landed).

Impeller could only attach the base mip level and slice of a texture as
a render target. This adds `mip_level` and `slice` to the HAL
`Attachment` struct so a render pass can target a specific mip level,
cube map face, or array layer. The render target size follows the
selected mip level.

- Metal: sets the attachment descriptor's level and slice.
- Vulkan: creates one 2D attachment view per mip level and layer, and
bypasses the framebuffer cache for non-base subresources.
- OpenGL ES: attaches the cube face target and mip level, allocates the
subresource on demand, and gates non-zero mip levels on ES 3.0 or
`GL_OES_fbo_render_mipmap`. Rendering to cube faces works down to ES
2.0.

Tests cover attachment validation, cross-backend rendering to a slice
and to a mip level, and a renderer golden that samples two mip levels.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
…ices" (flutter#187445)

Reverts: [[Impeller] Allow attaching specific texture mip levels and
slices](flutter#187066)

Initiated by: @jtmcdole

Reason for reverting: breaking several tests in post

Original PR Author: @bdero

Reviewed By: @walley892

The original PR description is provided below:

Fixes flutter#145014 (the attachment half; uploading specific
mip levels and slices already landed).

Impeller could only attach the base mip level and slice of a texture as
a render target. This adds `mip_level` and `slice` to the HAL
`Attachment` struct so a render pass can target a specific mip level,
cube map face, or array layer. The render target size follows the
selected mip level.

- Metal: sets the attachment descriptor's level and slice.
- Vulkan: creates one 2D attachment view per mip level and layer, and
bypasses the framebuffer cache for non-base subresources.
- OpenGL ES: attaches the cube face target and mip level, allocates the
subresource on demand, and gates non-zero mip levels on ES 3.0 or
`GL_OES_fbo_render_mipmap`. Rendering to cube faces works down to ES
2.0.

Tests cover attachment validation, cross-backend rendering to a slice
and to a mip level, and a renderer golden that samples two mip levels.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
…ices (flutter#187470)

Relands flutter#187066, reverted in flutter#187445.

The original PR passed every pre-submit check and merged cleanly, but
broke post-submit on Mac and Linux because a concurrent change (flutter#187246,
`b4e5291940c` "add sdf golden variants for OpenGL") added a
`kOpenGLESSDF` variant to `PlaygroundBackend` that was not present when
this PR's CI last ran. `CanRenderToMipLevel` only skipped `kOpenGLES`,
so on the post-submit master it ran on `kOpenGLESSDF` and aborted with
SIGABRT because the GLES test backend does not support rendering into
non-zero mip levels. This reland is identical to flutter#187066 plus the
missing `kOpenGLESSDF` skip in `CanRenderToMipLevel`, matching the skip
pattern that every other GLES-skipping test in `renderer_unittests.cc`
already uses after flutter#187246.

Failing test seen post-submit (Mac mac_unopt build 12910, Linux
linux_unopt build 18302):
`Play/RendererTest.CanRenderToMipLevel/OpenGLESSDF` returned/aborted
with exit code -6.

---

Fixes flutter#145014 (the attachment half; uploading specific
mip levels and slices already landed).

Impeller could only attach the base mip level and slice of a texture as
a render target. This adds `mip_level` and `slice` to the HAL
`Attachment` struct so a render pass can target a specific mip level,
cube map face, or array layer. The render target size follows the
selected mip level.

- Metal: sets the attachment descriptor's level and slice.
- Vulkan: creates one 2D attachment view per mip level and layer, and
the framebuffer cache is keyed on `(sample_count, mip_level, slice)` so
non-base subresources reuse cached framebuffers.
- OpenGL ES: attaches the cube face target and mip level, allocates the
subresource on demand, and gates non-zero mip levels on ES 3.0 or
`GL_OES_fbo_render_mipmap`. Rendering to cube faces works down to ES
2.0.

Tests cover attachment validation and cross-backend rendering to a slice
and to a mip level.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
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

Development

Successfully merging this pull request may close these issues.

[Impeller] HAL: Allow attaching and uploading specific Texture mip levels & slices.

5 participants