Changeset 269158 in webkit
- Timestamp:
- Oct 29, 2020, 11:32:05 AM (6 years ago)
- Location:
- branches/safari-610-branch/Source
- Files:
-
- 11 edited
-
ThirdParty/ANGLE/ChangeLog (modified) (1 diff)
-
ThirdParty/ANGLE/src/gpu_info_util/SystemInfo.h (modified) (1 diff)
-
ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_apple.mm (modified) (1 diff)
-
ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_macos.mm (modified) (1 diff)
-
ThirdParty/ANGLE/src/libANGLE/Display.cpp (modified) (1 diff)
-
ThirdParty/ANGLE/src/libANGLE/formatutils.cpp (modified) (1 diff)
-
ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm (modified) (5 diffs)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/UIProcess/mac/HighPerformanceGPUManager.mm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-610-branch/Source/ThirdParty/ANGLE/ChangeLog
r268469 r269158 1 2020-10-29 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r269118. rdar://problem/70795320 4 5 macCatalyst WebGL on Apple Silicon devices is using a software renderer 6 https://bugs.webkit.org/show_bug.cgi?id=218303 7 <rdar://problem/70587571> 8 9 Reviewed by Geoffrey Garen. 10 11 Source/ThirdParty/ANGLE: 12 13 * src/gpu_info_util/SystemInfo.h: 14 * src/gpu_info_util/SystemInfo_apple.mm: 15 (angle::GetSystemInfo): 16 We can just use the macOS version of GetSystemInfo in macCatalyst. 17 18 * src/gpu_info_util/SystemInfo_macos.mm: 19 (angle::GetSystemInfo_mac): 20 * src/libANGLE/Display.cpp: 21 * src/libANGLE/formatutils.cpp: 22 (gl::BuildInternalFormatInfoMap): 23 * src/libANGLE/renderer/gl/renderergl_utils.cpp: 24 (rx::nativegl_gl::GenerateCaps): 25 It turns out we must use EAGL in macCatalyst on Apple Silicon in all cases, 26 not just in-process in iOS apps (the problem is not just about coexistence 27 of the two GLs, but actually about our ability to load the accelerated 28 renderer /at all/ in macCatalyst processes). 29 30 I left the runtime switching in place, because there is a future in which 31 we /can/ use CGL in non-iOS-app processes, but that future is not now. 32 33 Source/WebCore: 34 35 * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: 36 (WebCore::needsEAGLOnMac): 37 (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): 38 (WebCore::GraphicsContextGLOpenGL::IOSurfaceTextureTarget): 39 (WebCore::GraphicsContextGLOpenGL::IOSurfaceTextureTargetQuery): 40 (WebCore::GraphicsContextGLOpenGL::EGLIOSurfaceTextureTarget): 41 (WebCore::isiOSAppOnMac): Deleted. 42 See ANGLE ChangeLog. 43 44 Source/WebKit: 45 46 * UIProcess/mac/HighPerformanceGPUManager.mm: 47 (WebKit::HighPerformanceGPUManager::addProcessRequiringHighPerformance): 48 (WebKit::HighPerformanceGPUManager::removeProcessRequiringHighPerformance): 49 (WebKit::HighPerformanceGPUManager::updateState): 50 (WebKit::isiOSAppOnMac): Deleted. 51 HighPerformanceGPUManager is PLATFORM(MAC)-only, which is not true 52 for MACCATALYST, so delete this dead code. 53 54 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269118 268f45cc-cd09-0410-ab3c-d52691b4dbfc 55 56 2020-10-28 Tim Horton <timothy_horton@apple.com> 57 58 macCatalyst WebGL on Apple Silicon devices is using a software renderer 59 https://bugs.webkit.org/show_bug.cgi?id=218303 60 <rdar://problem/70587571> 61 62 Reviewed by Geoffrey Garen. 63 64 * src/gpu_info_util/SystemInfo.h: 65 * src/gpu_info_util/SystemInfo_apple.mm: 66 (angle::GetSystemInfo): 67 We can just use the macOS version of GetSystemInfo in macCatalyst. 68 69 * src/gpu_info_util/SystemInfo_macos.mm: 70 (angle::GetSystemInfo_mac): 71 * src/libANGLE/Display.cpp: 72 * src/libANGLE/formatutils.cpp: 73 (gl::BuildInternalFormatInfoMap): 74 * src/libANGLE/renderer/gl/renderergl_utils.cpp: 75 (rx::nativegl_gl::GenerateCaps): 76 It turns out we must use EAGL in macCatalyst on Apple Silicon in all cases, 77 not just in-process in iOS apps (the problem is not just about coexistence 78 of the two GLs, but actually about our ability to load the accelerated 79 renderer /at all/ in macCatalyst processes). 80 81 I left the runtime switching in place, because there is a future in which 82 we /can/ use CGL in non-iOS-app processes, but that future is not now. 83 1 84 2020-10-14 Alan Coon <alancoon@apple.com> 2 85 -
branches/safari-610-branch/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo.h
r267980 r269158 68 68 // Only true on dual-GPU Mac laptops. 69 69 bool isMacSwitchable = false; 70 // Only true on Apple Silicon Macs when running iOS binaries. 71 // See https://developer.apple.com/documentation/foundation/nsprocessinfo/3608556-iosapponmac 72 bool isiOSAppOnMac = false; 70 // Only true on Apple Silicon Macs when running in macCatalyst. 71 bool needsEAGLOnMac = false; 73 72 74 73 // Only available on Android -
branches/safari-610-branch/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_apple.mm
r267980 r269158 20 20 bool GetSystemInfo(SystemInfo *info) 21 21 { 22 #if defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64) 23 static bool isiOSAppOnMac = false; 24 static dispatch_once_t once; 25 dispatch_once(&once, ^{ 26 isiOSAppOnMac = [[NSProcessInfo processInfo] isiOSAppOnMac]; 27 }); 28 29 if (isiOSAppOnMac) 30 { 31 GetSystemInfo_ios(info); 32 if (info) 33 { 34 info->isiOSAppOnMac = true; 35 } 36 return info; 37 } 38 39 return GetSystemInfo_mac(info); 40 #elif defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_MACCATALYST) 22 #if defined(ANGLE_PLATFORM_MACOS) || defined(ANGLE_PLATFORM_MACCATALYST) 41 23 return GetSystemInfo_mac(info); 42 24 #else -
branches/safari-610-branch/Source/ThirdParty/ANGLE/src/gpu_info_util/SystemInfo_macos.mm
r267980 r269158 248 248 info->isMacSwitchable = true; 249 249 } 250 251 #if defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64) 252 info->needsEAGLOnMac = true; 253 #endif 250 254 251 255 return true; -
branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/Display.cpp
r267981 r269158 280 280 } 281 281 282 if (info. isiOSAppOnMac)282 if (info.needsEAGLOnMac) 283 283 { 284 284 impl = new rx::DisplayEAGL(state); -
branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/formatutils.cpp
r267980 r269158 1035 1035 if (angle::GetSystemInfo(&info)) 1036 1036 { 1037 if (info. isiOSAppOnMac)1037 if (info.needsEAGLOnMac) 1038 1038 { 1039 1039 // Using OpenGLES.framework. -
branches/safari-610-branch/Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/renderergl_utils.cpp
r267980 r269158 1348 1348 if (angle::GetSystemInfo(&info)) 1349 1349 { 1350 if (!info. isiOSAppOnMac)1350 if (!info.needsEAGLOnMac) 1351 1351 { 1352 1352 VendorID vendor = GetVendorID(functions); -
branches/safari-610-branch/Source/WebCore/ChangeLog
r269139 r269158 1 2020-10-29 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r269118. rdar://problem/70795320 4 5 macCatalyst WebGL on Apple Silicon devices is using a software renderer 6 https://bugs.webkit.org/show_bug.cgi?id=218303 7 <rdar://problem/70587571> 8 9 Reviewed by Geoffrey Garen. 10 11 Source/ThirdParty/ANGLE: 12 13 * src/gpu_info_util/SystemInfo.h: 14 * src/gpu_info_util/SystemInfo_apple.mm: 15 (angle::GetSystemInfo): 16 We can just use the macOS version of GetSystemInfo in macCatalyst. 17 18 * src/gpu_info_util/SystemInfo_macos.mm: 19 (angle::GetSystemInfo_mac): 20 * src/libANGLE/Display.cpp: 21 * src/libANGLE/formatutils.cpp: 22 (gl::BuildInternalFormatInfoMap): 23 * src/libANGLE/renderer/gl/renderergl_utils.cpp: 24 (rx::nativegl_gl::GenerateCaps): 25 It turns out we must use EAGL in macCatalyst on Apple Silicon in all cases, 26 not just in-process in iOS apps (the problem is not just about coexistence 27 of the two GLs, but actually about our ability to load the accelerated 28 renderer /at all/ in macCatalyst processes). 29 30 I left the runtime switching in place, because there is a future in which 31 we /can/ use CGL in non-iOS-app processes, but that future is not now. 32 33 Source/WebCore: 34 35 * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: 36 (WebCore::needsEAGLOnMac): 37 (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): 38 (WebCore::GraphicsContextGLOpenGL::IOSurfaceTextureTarget): 39 (WebCore::GraphicsContextGLOpenGL::IOSurfaceTextureTargetQuery): 40 (WebCore::GraphicsContextGLOpenGL::EGLIOSurfaceTextureTarget): 41 (WebCore::isiOSAppOnMac): Deleted. 42 See ANGLE ChangeLog. 43 44 Source/WebKit: 45 46 * UIProcess/mac/HighPerformanceGPUManager.mm: 47 (WebKit::HighPerformanceGPUManager::addProcessRequiringHighPerformance): 48 (WebKit::HighPerformanceGPUManager::removeProcessRequiringHighPerformance): 49 (WebKit::HighPerformanceGPUManager::updateState): 50 (WebKit::isiOSAppOnMac): Deleted. 51 HighPerformanceGPUManager is PLATFORM(MAC)-only, which is not true 52 for MACCATALYST, so delete this dead code. 53 54 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269118 268f45cc-cd09-0410-ab3c-d52691b4dbfc 55 56 2020-10-28 Tim Horton <timothy_horton@apple.com> 57 58 macCatalyst WebGL on Apple Silicon devices is using a software renderer 59 https://bugs.webkit.org/show_bug.cgi?id=218303 60 <rdar://problem/70587571> 61 62 Reviewed by Geoffrey Garen. 63 64 * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: 65 (WebCore::needsEAGLOnMac): 66 (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): 67 (WebCore::GraphicsContextGLOpenGL::IOSurfaceTextureTarget): 68 (WebCore::GraphicsContextGLOpenGL::IOSurfaceTextureTargetQuery): 69 (WebCore::GraphicsContextGLOpenGL::EGLIOSurfaceTextureTarget): 70 (WebCore::isiOSAppOnMac): Deleted. 71 See ANGLE ChangeLog. 72 1 73 2020-10-28 Russell Epstein <repstein@apple.com> 2 74 -
branches/safari-610-branch/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm
r267981 r269158 170 170 171 171 #if PLATFORM(MAC) || PLATFORM(MACCATALYST) 172 static bool isiOSAppOnMac()172 static bool needsEAGLOnMac() 173 173 { 174 174 #if PLATFORM(MACCATALYST) && CPU(ARM64) 175 static bool isiOSAppOnMac = false; 176 static dispatch_once_t once; 177 dispatch_once(&once, ^{ 178 isiOSAppOnMac = [[NSProcessInfo processInfo] isiOSAppOnMac]; 179 }); 180 return isiOSAppOnMac; 175 return true; 181 176 #else 182 177 return false; … … 463 458 ExtensionsGL& extensions = getExtensions(); 464 459 465 if (! isiOSAppOnMac()) {460 if (!needsEAGLOnMac()) { 466 461 static constexpr const char* requiredExtensions[] = { 467 462 "GL_ANGLE_texture_rectangle", // For IOSurface-backed textures. … … 696 691 { 697 692 #if PLATFORM(MACCATALYST) 698 if ( isiOSAppOnMac())693 if (needsEAGLOnMac()) 699 694 return TEXTURE_2D; 700 695 return TEXTURE_RECTANGLE_ARB; … … 709 704 { 710 705 #if PLATFORM(MACCATALYST) 711 if ( isiOSAppOnMac())706 if (needsEAGLOnMac()) 712 707 return TEXTURE_BINDING_2D; 713 708 return TEXTURE_BINDING_RECTANGLE_ARB; … … 722 717 { 723 718 #if PLATFORM(MACCATALYST) 724 if ( isiOSAppOnMac())719 if (needsEAGLOnMac()) 725 720 return 0x305F; // EGL_TEXTURE_2D 726 721 return 0x345B; // EGL_TEXTURE_RECTANGLE_ANGLE -
branches/safari-610-branch/Source/WebKit/ChangeLog
r269140 r269158 1 2020-10-29 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r269118. rdar://problem/70795320 4 5 macCatalyst WebGL on Apple Silicon devices is using a software renderer 6 https://bugs.webkit.org/show_bug.cgi?id=218303 7 <rdar://problem/70587571> 8 9 Reviewed by Geoffrey Garen. 10 11 Source/ThirdParty/ANGLE: 12 13 * src/gpu_info_util/SystemInfo.h: 14 * src/gpu_info_util/SystemInfo_apple.mm: 15 (angle::GetSystemInfo): 16 We can just use the macOS version of GetSystemInfo in macCatalyst. 17 18 * src/gpu_info_util/SystemInfo_macos.mm: 19 (angle::GetSystemInfo_mac): 20 * src/libANGLE/Display.cpp: 21 * src/libANGLE/formatutils.cpp: 22 (gl::BuildInternalFormatInfoMap): 23 * src/libANGLE/renderer/gl/renderergl_utils.cpp: 24 (rx::nativegl_gl::GenerateCaps): 25 It turns out we must use EAGL in macCatalyst on Apple Silicon in all cases, 26 not just in-process in iOS apps (the problem is not just about coexistence 27 of the two GLs, but actually about our ability to load the accelerated 28 renderer /at all/ in macCatalyst processes). 29 30 I left the runtime switching in place, because there is a future in which 31 we /can/ use CGL in non-iOS-app processes, but that future is not now. 32 33 Source/WebCore: 34 35 * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: 36 (WebCore::needsEAGLOnMac): 37 (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): 38 (WebCore::GraphicsContextGLOpenGL::IOSurfaceTextureTarget): 39 (WebCore::GraphicsContextGLOpenGL::IOSurfaceTextureTargetQuery): 40 (WebCore::GraphicsContextGLOpenGL::EGLIOSurfaceTextureTarget): 41 (WebCore::isiOSAppOnMac): Deleted. 42 See ANGLE ChangeLog. 43 44 Source/WebKit: 45 46 * UIProcess/mac/HighPerformanceGPUManager.mm: 47 (WebKit::HighPerformanceGPUManager::addProcessRequiringHighPerformance): 48 (WebKit::HighPerformanceGPUManager::removeProcessRequiringHighPerformance): 49 (WebKit::HighPerformanceGPUManager::updateState): 50 (WebKit::isiOSAppOnMac): Deleted. 51 HighPerformanceGPUManager is PLATFORM(MAC)-only, which is not true 52 for MACCATALYST, so delete this dead code. 53 54 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269118 268f45cc-cd09-0410-ab3c-d52691b4dbfc 55 56 2020-10-28 Tim Horton <timothy_horton@apple.com> 57 58 macCatalyst WebGL on Apple Silicon devices is using a software renderer 59 https://bugs.webkit.org/show_bug.cgi?id=218303 60 <rdar://problem/70587571> 61 62 Reviewed by Geoffrey Garen. 63 64 * UIProcess/mac/HighPerformanceGPUManager.mm: 65 (WebKit::HighPerformanceGPUManager::addProcessRequiringHighPerformance): 66 (WebKit::HighPerformanceGPUManager::removeProcessRequiringHighPerformance): 67 (WebKit::HighPerformanceGPUManager::updateState): 68 (WebKit::isiOSAppOnMac): Deleted. 69 HighPerformanceGPUManager is PLATFORM(MAC)-only, which is not true 70 for MACCATALYST, so delete this dead code. 71 1 72 2020-10-28 Russell Epstein <repstein@apple.com> 2 73 -
branches/safari-610-branch/Source/WebKit/UIProcess/mac/HighPerformanceGPUManager.mm
r267980 r269158 35 35 namespace WebKit { 36 36 37 static bool isiOSAppOnMac()38 {39 #if PLATFORM(MACCATALYST) && CPU(ARM64)40 static bool isiOSAppOnMac = false;41 static dispatch_once_t once;42 dispatch_once(&once, ^{43 isiOSAppOnMac = [[NSProcessInfo processInfo] isiOSAppOnMac];44 });45 return isiOSAppOnMac;46 #else47 return false;48 #endif49 }50 51 37 // FIXME: This class is using OpenGL to control the muxing of GPUs. Ultimately 52 38 // we want to use Metal, but currently there isn't a way to "release" a … … 61 47 void HighPerformanceGPUManager::addProcessRequiringHighPerformance(WebProcessProxy* process) 62 48 { 63 if (isiOSAppOnMac())64 return;65 66 49 if (!WebCore::hasLowAndHighPowerGPUs()) 67 50 return; … … 78 61 void HighPerformanceGPUManager::removeProcessRequiringHighPerformance(WebProcessProxy* process) 79 62 { 80 if (isiOSAppOnMac())81 return;82 83 63 if (!WebCore::hasLowAndHighPowerGPUs()) 84 64 return; … … 95 75 void HighPerformanceGPUManager::updateState() 96 76 { 97 if (isiOSAppOnMac())98 return;99 100 77 if (m_processesRequiringHighPerformance.size()) { 101 78 if (!m_pixelFormatObj) {
Note:
See TracChangeset
for help on using the changeset viewer.