-
Notifications
You must be signed in to change notification settings - Fork 6k
Use glBlitFramebuffer when rendering #53080
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). 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. |
This is much faster than using a shader which is not required currently (we are not doing any transformations).
ede935b
to
8c97384
Compare
Done as part of diagnosing flutter/flutter#148653. It hasn't resolved the issue, but has made things simpler (and faster) than before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems strictly better, but also blitFramebuffer is an OpenGL 3 proc. I dont know what the minimum gl version the linux embedder requires, but something to keep in mind.
It sounds like practically this will exist, but we should provide a fallback to cover all cases. |
Moving this to draft status as I need to think about an appropriate fallback behaviour. |
If you are on OpenGL 2 or less then I think the current shader based solution is the best you can do. Still, that is an ancient gl version, and I don't know if we actually support it |
Talking to the OpenGL experts here it seems GLES2 is the minimum we can expect, but practically all systems will have GL3. So we just need to provide some form of fallback for a rare case - i.e. it probably doesn't have to be performant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but my understanding of OpenGL is shaky; please also get approval from someone with more experience here like @jonahwilliams.
Also, don't forget to get a test exemption before landing this.
Co-authored-by: Loïc Sharma <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this need a fallback for ES2? |
If glBlitFramebuffer it reverts to the current texture rendering - is there something special in ES2 that would stop that working? |
Requesting a test exemption as this render path is not explicitly checked currently. |
Added a test, so this no longer requires the exemption. |
…151942) flutter/engine@e3abca2...b043fe4 2024-07-18 [email protected] Use glBlitFramebuffer when rendering (flutter/engine#53080) 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
…lutter#151942) flutter/engine@e3abca2...b043fe4 2024-07-18 [email protected] Use glBlitFramebuffer when rendering (flutter/engine#53080) 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
…lutter#151942) flutter/engine@e3abca2...b043fe4 2024-07-18 [email protected] Use glBlitFramebuffer when rendering (flutter/engine#53080) 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
This is much faster than using a shader which is not required currently (we are not doing any transformations).