Bug 217426

Summary: Implement GraphicsContextGLOpenGL::checkGPUStatus() for ANGLE backend
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: WebGLAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: dino, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Mac   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 198948    

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>