Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@jason-simmons
Copy link
Member

The Linux embedder is rendering to a FlutterOpenGLFramebuffer that specifies an OpenGL FBO. This API allows the embedder to create a color attachment that wraps the FBO so that the render pass will bind to that FBO during encoding.

@flutter-dashboard
Copy link

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

const Type type_;
HandleGLES handle_;
mutable bool contents_initialized_ = false;
const bool is_wrapped_;
Copy link
Member

Choose a reason for hiding this comment

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

You should be able to get rid of the is_wrapped_ bool and replace it with wrapped_fbo_.has_value()

Copy link
Member Author

Choose a reason for hiding this comment

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

SurfaceGLES is using textures with the kWrapped flag that are not associated with a specific FBO. Apparently this means that the texture should use whatever FBO is bound when encoding happens.
(see https://github.com/flutter/engine/blob/main/impeller/renderer/backend/gles/surface_gles.cc#L38)

HandleGLES handle_;
mutable bool contents_initialized_ = false;
const bool is_wrapped_;
const std::optional<GLuint> fbo_;
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps call this wrapped_fbo_?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@chinmaygarde
Copy link
Member

From Triage: Conceptually, the framebuffer object in OpenGL ES is an impeller::RenderTarget. It seems odd to repurpose a texture for this (which are attachments to render targets) as proxies. We should rework this API to make wrapped textures be represented as render targets in OpenGL ES.

@chinmaygarde
Copy link
Member

But that is a followup, landing this is good for now.

…t to implement OpenGL FBO targets in the embedder library

The Linux embedder is rendering to a FlutterOpenGLFramebuffer that specifies an OpenGL FBO.  This API allows the embedder to create a color attachment that wraps the FBO so that the render pass will bind to that FBO during encoding.
@jason-simmons jason-simmons force-pushed the iplr_embed_gles_target_fbo branch from 641b1c3 to 67a5a57 Compare April 1, 2024 19:04
@jason-simmons jason-simmons added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 1, 2024
@auto-submit auto-submit bot merged commit ea93c5d into flutter:main Apr 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 1, 2024
… and use it to implement OpenGL FBO targets in the embedder library (flutter/engine#51269)
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Apr 1, 2024
…146100)

flutter/engine@e6f1940...ea93c5d

2024-04-01 [email protected] [Impeller] Add a TextureGLES API for wrapping a framebuffer and use it to implement OpenGL FBO targets in the embedder library (flutter/engine#51269)
2024-04-01 [email protected] Remove `testing/android_background_image` which does not run/exist on CI. (flutter/engine#51815)
2024-04-01 [email protected] [Impeller] Avoid loading redundant Vulkan extensions. (flutter/engine#51818)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: 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
auto-submit bot added a commit to flutter/flutter that referenced this pull request Apr 1, 2024
…isions) (#146100)" (#146106)

Reverts: #146100
Initiated by: LongCatIsLooong
Reason for reverting: https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_pixel_7pro%20hello_world_impeller/3118/overview
Original PR Author: engine-flutter-autoroll

Reviewed By: {fluttergithubbot}

This change reverts the following previous change:

flutter/engine@e6f1940...ea93c5d

2024-04-01 [email protected] [Impeller] Add a TextureGLES API for wrapping a framebuffer and use it to implement OpenGL FBO targets in the embedder library (flutter/engine#51269)
2024-04-01 [email protected] Remove `testing/android_background_image` which does not run/exist on CI. (flutter/engine#51815)
2024-04-01 [email protected] [Impeller] Avoid loading redundant Vulkan extensions. (flutter/engine#51818)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: 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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 2, 2024
… and use it to implement OpenGL FBO targets in the embedder library (flutter/engine#51269)
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Apr 2, 2024
…sions) (#146108)

Manual roll requested by [email protected]

Cannot build log URL because revision "9a513de65251" is invalid: Luci builds of "Linux linux_android_emulator_skia_tests" for 9a513de65251f83a43d979bb0b2d4c8ee2f8c417 was FAILURE

2024-04-01 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[Impeller] Avoid loading redundant Vulkan extensions. (#51818)" (flutter/engine#51835)
2024-04-01 [email protected] Run and record `adb shell screenrecord` during Android scenario app (flutter/engine#51832)
2024-04-01 [email protected] Roll Skia from 0b0ed6ca101b to fe64c32d7f2e (4 revisions) (flutter/engine#51831)
2024-04-01 [email protected] Run the `DrawSolidBlueScreenTest` 5x in a row in bringup builds. (flutter/engine#51829)
2024-04-01 [email protected] Remove tests related to StrictMode that were never running on CI. (flutter/engine#51827)
2024-04-01 [email protected] [Impeller] Ignore warnign about shader stages not consuming outputs. (flutter/engine#51822)
2024-04-01 [email protected] [Skwasm] Forward text height from paragraph height to default text style (flutter/engine#51819)
2024-04-01 [email protected] Remove log statements that did not help. (flutter/engine#51825)
2024-04-01 [email protected] Roll Skia from 40c436a785fa to 0b0ed6ca101b (6 revisions) (flutter/engine#51823)
2024-04-01 [email protected] [Impeller] Add a TextureGLES API for wrapping a framebuffer and use it to implement OpenGL FBO targets in the embedder library (flutter/engine#51269)
2024-04-01 [email protected] Remove `testing/android_background_image` which does not run/exist on CI. (flutter/engine#51815)
2024-04-01 [email protected] [Impeller] Avoid loading redundant Vulkan extensions. (flutter/engine#51818)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App e: impeller

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants