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>
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).