Bug 217426 - Implement GraphicsContextGLOpenGL::checkGPUStatus() for ANGLE backend
Summary: Implement GraphicsContextGLOpenGL::checkGPUStatus() for ANGLE backend
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Local Build
Hardware: Mac Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: webglangle
  Show dependency treegraph
 
Reported: 2020-10-07 04:46 PDT by Kimmo Kinnunen
Modified: 2020-10-26 08:23 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2020-10-07 04:46:29 PDT
Implement GraphicsContextGLOpenGL::checkGPUStatus() for ANGLE backend



GLES/GL implementation:
#if USE(OPENGL)
-    CGLContextObj cglContext = static_cast<CGLContextObj>(platformGraphicsContextGL());
-    CGLGetParameter(cglContext, kCGLCPGPURestartStatus, &restartStatus);
-    if (restartStatus == kCGLCPGPURestartStatusBlacklisted) {
-        LOG(WebGL, "The GPU has blocklisted us (%p). Terminating.", this);
-        exit(EX_OSERR);
-    }
-    if (restartStatus == kCGLCPGPURestartStatusCaused) {
-        LOG(WebGL, "The GPU has reset us (%p). Lose the context.", this);
-        forceContextLost();
-        CGLSetCurrentContext(0);
-    }
-#elif USE(OPENGL_ES)
-    EAGLContext* currentContext = static_cast<EAGLContext*>(PlatformGraphicsContextGL());
-    [currentContext getParameter:kEAGLCPGPURestartStatus to:&restartStatus];
-    if (restartStatus == kEAGLCPGPURestartStatusCaused || restartStatus == kEAGLCPGPURestartStatusBlacklisted) {
-        LOG(WebGL, "The GPU has either reset or blocklisted us (%p). Lose the context.", this);
-        forceContextLost();
-        [EAGLContext setCurrentContext:0];
-    }
Comment 1 Radar WebKit Bug Importer 2020-10-14 04:47:16 PDT
<rdar://problem/70288090>