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

[Impeller] Avoid invalid GL depth calls on macOS desktop. #46758

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

bdero
Copy link
Member

@bdero bdero commented Oct 11, 2023

The macOS desktop driver doesn't support ES profiles, and glClearDepthf + glDepthRangef are throwing GL_INVALID_OPERATION and doing nothing. Noticed this while updating impeller-cmake past @matanlurey's recent changes to make GL_INVALID_OPERATION fatal. Impeller-cmake-example uses a depth buffer, whereas Impeller's 2D renderer currently does not.

Added a follow-up bug to make these calls work on macOS desktop: flutter/flutter#136322.
Both Impeller Scene and the impeller-cmake-example currently just rely on the default state for clearing depth.

@bdero bdero self-assigned this Oct 11, 2023
@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 to this rule, contact Hixie or stuartmorgan on 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.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@bdero bdero merged commit 4b02631 into main Oct 11, 2023
@bdero bdero deleted the bdero/mac-desktop-gl-fix branch October 11, 2023 17:47
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 11, 2023
…136392)

flutter/engine@ed67e8a...4b02631

2023-10-11 bdero@google.com [Impeller] Avoid invalid GL depth calls on macOS desktop. (flutter/engine#46758)

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 jsimmons@google.com,rmistry@google.com,zra@google.com 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
harryterkelsen pushed a commit that referenced this pull request Oct 23, 2023
The macOS desktop driver doesn't support ES profiles, and
`glClearDepthf` + `glDepthRangef` are throwing `GL_INVALID_OPERATION`
and doing nothing. Noticed this while updating impeller-cmake past
@matanlurey's recent changes to make `GL_INVALID_OPERATION` fatal.
Impeller-cmake-example uses a depth buffer, whereas Impeller's 2D
renderer currently does not.

Added a follow-up bug to make these calls work on macOS desktop:
flutter/flutter#136322.
Both Impeller Scene and the impeller-cmake-example currently just rely
on the default state for clearing depth.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants