| Summary: | [macOS] Only use WebGL on Metal by default on safe versions of macOS | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||
| Component: | WebGL | Assignee: | Brent Fulgham <bfulgham> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, dino, ews-watchlist, kbr, kkinnunen, kpiddington, thorton, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Brent Fulgham
2021-07-02 11:51:17 PDT
Created attachment 432809 [details]
Patch
Comment on attachment 432809 [details]
Patch
Won't this disable it on watchOS, tvOS and Catalyst?
(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!?! I asked Tim to double-check and he said it looked right. 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]. 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. (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). (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). |