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

Conversation

@jonahwilliams
Copy link
Contributor

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

Copy link
Member

@jason-simmons jason-simmons left a comment

Choose a reason for hiding this comment

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

Add a capability check for desktop GL platforms that require VAOs

return false;
}

if (!gl.GetCapabilities()->IsES()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think any non-ES GL will need VAOs? FYI @chinmaygarde

Copy link
Member

Choose a reason for hiding this comment

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

I'd put this behind a cap check. Because vertex arrays are available on desktop GL, but also ES 3.0 and above or ES 2.0 with the GL_OES_vertex_array_object extension. This extension is almost always available. This is a fine start for now though. But file a followup?

Copy link
Member

Choose a reason for hiding this comment

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

This may be because you just wanted to make things work on desktop GL. So feel free to ignore if we are going to patch this in later.

But, VAOs are an optimization that actually become a pessimization as used here.

VAOs encode the state that is configured by the EnableVertexAttribArray/VertexAttribPointer goop later into a single object that can be bound. So, you only need to configure the arrays once (ideally during "pipeline" construction), save the VAO, and bind it before the draw call while skipping the rest of the API traffic.

Creating the new VAO per call is just extra ceremony that is unnecessary.

I'd create a separate object with its own entry in the reactor handles table that is configured when the pipeline is created and a bind call that either binds the VAO if one is available or dumps additional traffic if not.

But, we can do this all later. This still LGTM and will work to unblock desktop GL.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah the goal is very much "make it render" for now. I don't know if we'll get to the point where we work on GL performance. I'd like to think we can push folks to switch to Vulkan where feasible. But if that doesn't happen then we'd have some work to do to write a more 3.0-style renderer.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 31, 2024
@auto-submit auto-submit bot merged commit ab00d95 into flutter:main Oct 31, 2024
28 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 31, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 31, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 1, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 1, 2024
…157972)

flutter/engine@bb77cf8...cd46383

2024-10-31 [email protected] reland: Allow BufferViews to have non-owning references to DeviceBuffers (flutter/engine#56286)
2024-10-31 [email protected] Roll Skia from 9168ad248c69 to a5e3b3556739 (1 revision) (flutter/engine#56283)
2024-10-31 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Allow BufferViews to have non-owning references to DeviceBuffers (#56224)" (flutter/engine#56285)
2024-10-31 [email protected] macOS: migrate third_party/accessibility to ARC (flutter/engine#56281)
2024-10-31 [email protected] Allow BufferViews to have non-owning references to DeviceBuffers (flutter/engine#56224)
2024-10-31 [email protected] [Impeller] Do not use fast mask blur for stroked shapes (flutter/engine#56247)
2024-10-31 [email protected] [Impeller] make desktop GL render. (flutter/engine#56274)
2024-10-31 [email protected] Vastly rewrite and expand `et/README.md` (flutter/engine#56250)
2024-10-31 [email protected] Roll Fuchsia Linux SDK from dDWvmfG4AxSEs0BQA... to MjcuejuzYvYGobbFM... (flutter/engine#56280)
2024-10-31 [email protected] Roll Dart SDK from f3e3dc44b1dc to bd93105c4fb6 (2 revisions) (flutter/engine#56278)
2024-10-31 [email protected] Embedder: migrate Metal surfaces to ARC (flutter/engine#56279)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from dDWvmfG4AxSE to MjcuejuzYvYG

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] 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
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
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.

[Impeller] Changes needed to get the OpenGL backend running on desktop Linux

3 participants