WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
227633
[macOS] Only use WebGL on Metal by default on safe versions of macOS
https://bugs.webkit.org/show_bug.cgi?id=227633
Summary
[macOS] Only use WebGL on Metal by default on safe versions of macOS
Brent Fulgham
Reported
2021-07-02 11:51:17 PDT
Some older supported macOS releases have a version of Metal that does not work properly for implementing WebGL features. We should stick to the OpenGL backend on those releases (by default) and only activate Metal WebGL on systems we know pass all tests. Users can still activate WebGL on Metal if they wish, but it will not be the default behavior. <
rdar://problem/78527887
>
Attachments
Patch
(2.07 KB, patch)
2021-07-02 11:59 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2021-07-02 11:59:00 PDT
Created
attachment 432809
[details]
Patch
Dean Jackson
Comment 2
2021-07-02 13:09:20 PDT
Comment on
attachment 432809
[details]
Patch Won't this disable it on watchOS, tvOS and Catalyst?
Brent Fulgham
Comment 3
2021-07-02 14:13:40 PDT
(In reply to Dean Jackson from
comment #2
)
> Comment on
attachment 432809
[details]
> Patch > > Won't this disable it on watchOS, tvOS and Catalyst?
#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) #define HAVE_WEBGL_COMPATIBLE_METAL 1 #endif This should ENABLE it for watchOS, tvOS, Catalyst, and iPhone, and on any macOS at or above 120000. I THINK!?!
Brent Fulgham
Comment 4
2021-07-02 14:21:47 PDT
I asked Tim to double-check and he said it looked right.
EWS
Comment 5
2021-07-02 16:21:09 PDT
Committed
r279524
(
239374@main
): <
https://commits.webkit.org/239374@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 432809
[details]
.
Kenneth Russell
Comment 6
2021-07-04 18:22:43 PDT
Comment on
attachment 432809
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=432809&action=review
> Source/WTF/wtf/PlatformHave.h:1097 > +#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000)
Could you explain a bit more how these compile time guards work? I would assume that runtime checks would be needed in order to choose the Metal backend only when running on certain macOS versions.
Tim Horton
Comment 7
2021-07-04 18:28:25 PDT
(In reply to Kenneth Russell from
comment #6
)
> Comment on
attachment 432809
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=432809&action=review
> > > Source/WTF/wtf/PlatformHave.h:1097 > > +#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) > > Could you explain a bit more how these compile time guards work? I would > assume that runtime checks would be needed in order to choose the Metal > backend only when running on certain macOS versions.
No need for a runtime check; we build separate binaries with the appropriate SDK for each OS, so a check like this is fine (and very common).
Tim Horton
Comment 8
2021-07-04 18:28:25 PDT
(In reply to Kenneth Russell from
comment #6
)
> Comment on
attachment 432809
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=432809&action=review
> > > Source/WTF/wtf/PlatformHave.h:1097 > > +#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) > > Could you explain a bit more how these compile time guards work? I would > assume that runtime checks would be needed in order to choose the Metal > backend only when running on certain macOS versions.
No need for a runtime check; we build separate binaries with the appropriate SDK for each OS, so a check like this is fine (and very common).
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug