WebKit Bugzilla
Attachment 346383 Details for
Bug 188258
: [WebGL] Software renderer sometimes used on older hardware.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188258-20180802083137.patch (text/plain), 2.97 KB, created by
Per Arne Vollan
on 2018-08-02 08:31:38 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Per Arne Vollan
Created:
2018-08-02 08:31:38 PDT
Size:
2.97 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 234500) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2018-08-02 Per Arne Vollan <pvollan@apple.com> >+ >+ [WebGL] Software renderer sometimes used on older hardware. >+ https://bugs.webkit.org/show_bug.cgi?id=188258 >+ <rdar://problem/42750547> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Reports about poor WebGL performance indicate that the software renderer is used on older hardware in some cases. >+ CGLSetVirtualScreen is called to specify which GPU to use. There is a 1:1 mapping between virtual screen and >+ renderer. This patch makes sure that this function is never called with the virtual screen of the software >+ renderer. It will also set the virtual screen to the first hardware renderer found, if there is no matching >+ display mask. This is a speculative fix. So far, I have not been able to reproduce the bug. >+ >+ No new tests. I have not been able to reproduce this issue. >+ >+ * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: >+ (WebCore::identifyAndSetCurrentGPU): >+ > 2018-07-30 Babak Shafiei <bshafiei@apple.com> > > Revert r233926. rdar://problem/42354941 >Index: Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm >=================================================================== >--- Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm (revision 234456) >+++ Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm (working copy) >@@ -410,18 +410,39 @@ static void identifyAndSetCurrentGPU(CGL > if (!displayMaskOpenGL || !contextObj) > return; > >+ std::optional<int> firstGPU; >+ > for (int virtualScreen = 0; virtualScreen < numPixelFormats; ++virtualScreen) { > GLint displayMask = 0; > CGLError error = CGLDescribePixelFormat(pixelFormatObj, virtualScreen, kCGLPFADisplayMask, &displayMask); > ASSERT(error == kCGLNoError); > if (error != kCGLNoError) > continue; >+ >+ GLint accelerated = 0; >+ error = CGLDescribePixelFormat(pixelFormatObj, virtualScreen, kCGLPFAAccelerated, &accelerated); >+ ASSERT(error == kCGLNoError); >+ if (!accelerated) >+ continue; >+ >+ if (!firstGPU && accelerated) >+ firstGPU = virtualScreen; >+ > if (displayMask & displayMaskOpenGL) { > error = CGLSetVirtualScreen(contextObj, virtualScreen); > ASSERT(error == kCGLNoError); >- break; >+ LOG(WebGL, "Setting virtual screen (%d)", virtualScreen); >+ return; > } > } >+ >+ ASSERT_NOT_REACHED(); >+ if (!firstGPU) { >+ LOG(WebGL, "Unable to set virtual screen, no GPU found."); >+ return; >+ } >+ CGLSetVirtualScreen(contextObj, *firstGPU); >+ LOG(WebGL, "Setting virtual screen to first GPU found (%d).", *firstGPU); > } > #endif >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188258
: 346383