Changeset 279303 in webkit
- Timestamp:
- Jun 25, 2021, 5:39:22 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
-
ThirdParty/ANGLE/ChangeLog (modified) (1 diff)
-
ThirdParty/ANGLE/include/platform/PlatformMethods.h (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/ThirdParty/ANGLE/ChangeLog
r279251 r279303 1 2021-06-25 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [macOS] WebGL content is unable to use the discrete GPU 4 https://bugs.webkit.org/show_bug.cgi?id=227408 5 <rdar://problem/79216506> 6 7 Reviewed by Dean Jackson. 8 9 There appears to be a key collision: 10 11 Source/ThirdParty/ANGLE/include/platform/PlatformMethods.h:#define EGL_PLATFORM_ANGLE_PLATFORM_METHODS_ANGLEX 0x3482 12 Source/ThirdParty/ANGLE/include/EGL/eglext_angle.h:#define EGL_POWER_PREFERENCE_ANGLE 0x3482 13 14 Both these keys seem to be accepted by EGL_GetPlatformDisplayEXT(). 15 16 This patch just changes the value of one of them to a value I picked out of a hat, just so they don't conflict. 17 We should work with upstream to either: 18 A) Find a better solution (maybe disambiguate these values based on which function is accepting them), or 19 B) Make a robust way to make sure keys don't collide in the future. 20 21 * include/platform/PlatformMethods.h: 22 1 23 2021-06-24 John Cunningham <johncunningham@apple.com> 2 24 -
trunk/Source/ThirdParty/ANGLE/include/platform/PlatformMethods.h
r277241 r279303 14 14 #include <array> 15 15 16 #define EGL_PLATFORM_ANGLE_PLATFORM_METHODS_ANGLEX 0x34 8216 #define EGL_PLATFORM_ANGLE_PLATFORM_METHODS_ANGLEX 0x34FD 17 17 18 18 #if !defined(ANGLE_PLATFORM_EXPORT) -
trunk/Source/WebCore/ChangeLog
r279301 r279303 1 2021-06-25 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [macOS] WebGL content is unable to use the discrete GPU 4 https://bugs.webkit.org/show_bug.cgi?id=227408 5 <rdar://problem/79216506> 6 7 Reviewed by Dean Jackson. 8 9 Simply pass along the power preference into ANGLE. This is read in 10 DisplayMtl::getMetalDeviceMatchingAttribute(). 11 12 No new tests. I _think_ this is untestable, because the web exposed power preference is being set correctly. 13 We’re correctly reporting to the web content that they have successfully asked for a high power context. 14 We’re just not honoring that internally. If the test is a performance test, or checks the renderer string, 15 that test would be hardware-dependent, and couldn’t be a regular layout test. 16 17 * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: 18 (WebCore::InitializeEGLDisplay): 19 1 20 2021-06-25 Myles C. Maxfield <mmaxfield@apple.com> 2 21 -
trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm
r279298 r279303 122 122 } 123 123 LOG(WebGL, "Attempting to use ANGLE's %s backend.\n", attrs.useMetal ? "Metal" : "OpenGL"); 124 if (attrs.powerPreference != GraphicsContextGLAttributes::PowerPreference::Default) { 125 displayAttributes.append(EGL_POWER_PREFERENCE_ANGLE); 126 if (attrs.powerPreference == GraphicsContextGLAttributes::PowerPreference::LowPower) 127 displayAttributes.append(EGL_LOW_POWER_ANGLE); 128 else { 129 ASSERT(attrs.powerPreference == GraphicsContextGLAttributes::PowerPreference::HighPerformance); 130 displayAttributes.append(EGL_HIGH_POWER_ANGLE); 131 } 132 } 124 133 displayAttributes.append(EGL_NONE); 125 134 display = EGL_GetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, reinterpret_cast<void*>(EGL_DEFAULT_DISPLAY), displayAttributes.data());
Note:
See TracChangeset
for help on using the changeset viewer.