Implement GraphicsContextGLOpenGL::checkGPUStatus() for ANGLE backend
https://bugs.webkit.org/show_bug.cgi?id=217426
Summary Implement GraphicsContextGLOpenGL::checkGPUStatus() for ANGLE backend
Kimmo Kinnunen
Reported 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]; - }
Attachments
Radar WebKit Bug Importer
Comment 1 2020-10-14 04:47:16 PDT
Note You need to log in before you can comment on or make changes to this bug.