Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] Add support for ANGLE over native OpenGL (as a fallback for ANGLE over Metal). #84563

Closed
wants to merge 1 commit into from

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Nov 7, 2023

  • Adds support for ANGLE over native GL for macOS.
  • ANGLE over Metal is used on macOS 10.15+ with Metal 2 level of hardware, older Macs default to ANGLE over native GL.
  • ANGLE over GL is also used if ANGLE over Metal fails.

Depends on godotengine/godot-angle-static#2

@bruvzg bruvzg added this to the 4.x milestone Nov 7, 2023
@bruvzg bruvzg force-pushed the mac_angle_over_gl branch from 19771f7 to feee7f2 Compare November 7, 2023 07:37
@bruvzg bruvzg marked this pull request as ready for review November 7, 2023 08:04
@bruvzg bruvzg requested a review from a team as a code owner November 7, 2023 08:04
@bruvzg
Copy link
Member Author

bruvzg commented Nov 7, 2023

ANGLE over Metal is used on macOS 10.15+ with Metal 2 level of hardware, older Macs default to ANGLE over native GL.

For the reference, this is equivalent to the ANGLE internal checks, and correspond to following GPUs:

  • Intel Iris Graphics 5xx
  • Intel Iris Plus Graphics 6xx
  • Intel HD Graphics 5xx
  • Intel HD Graphics 6xx
  • AMD FirePro Dxxx
  • AMD Radeon R9 M2xx
  • AMD Radeon R9 M3xx
  • AMD Radeon Pro 4xx
  • AMD Radeon Pro 5xx
  • AMD Radeon Pro Vega

So #83269 is expected, Mac which is mention seems to be the last MacBook Pro model without Metal 2 support.
As well as #83669, no hardware info, but macOS version is too old.

Crash in both cases should be already fixed by #84288 (by falling back to native GL), but this change should provide ANGLE support on these old Macs as well.

@akien-mga
Copy link
Member

The code looks good to me.

I think having the option to use ANGLE over native OpenGL as a fallback is interesting, but I wonder how it will compare to using native OpenGL directly.

We discussed this briefly in chat:

Akien What's the benefit of using ANGLE over GL instead of native GL? Won't that be slower, and still affected by bitrotting GL drivers?
bruvzg It is slower, but should have a lot of workarounds for native GL limitations and bugs (AFAIK it is used in the same way by Chrome).
bruvzg But it's not fixing all issues, for example GPU particles still crash. So I'm not sure how useful it is. But I do not think we can do anything about it.

Since the crashes some users experienced should already be fixed by fallback to native OpenGL, I think we might want to wait for 4.3 with this PR, so that we get another point of comparison and can validate that ANGLE over native OpenGL is better than native OpenGL for affected users.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants