[Webkit-unassigned] [Bug 141567] WebGL: Destroy the GLContext is a GPU restart has been detected.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 19 15:38:41 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=141567

Dean Jackson <dino at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #246923|review?                     |review+
              Flags|                            |

--- Comment #5 from Dean Jackson <dino at apple.com> ---
Comment on attachment 246923
  --> https://bugs.webkit.org/attachment.cgi?id=246923
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=246923&action=review

> Source/WebCore/platform/graphics/GraphicsContext3D.h:1445
> +    
> +    WebGLRenderingContextBase* m_webglContext;

Do we ever think there might be a time when the WebGL context goes away before the GC3D?

> Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm:202
> +    GLint abortOnBlacklist = 0;
> +    CGLSetParameter(m_contextObj, kCGLCPAbortOnGPURestartStatusBlacklisted, &abortOnBlacklist);

You'll need to #if around these since they are only available on OS X 10.10+

> Source/WebCore/platform/graphics/mac/WebGLLayer.mm:180
> +    GLint restartStatus = 0;
> +    CGLGetParameter(_context->platformGraphicsContext3D(), kCGLCPGPURestartStatus, &restartStatus);
> +    if (restartStatus == kCGLCPGPURestartStatusCaused || restartStatus == kCGLCPGPURestartStatusBlacklisted) {
> +        CGLDestroyContext(_context->platformGraphicsContext3D());
> +        _context->forceContextLost();
> +    }

Similarly here.

One concern I have is that we're only doing this test on display. Which means you could hose the system if you executed a lot of draw calls before allowing the system to draw. We might want to have this code in the drawing entry points, drawElements and drawArrays, but only test every X iterations or something.

Anyway, if this makes an improvement on our hanging examples, let's stick with it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150219/a1d7bea1/attachment-0002.html>


More information about the webkit-unassigned mailing list