WebKit Bugzilla
Attachment 341742 Details for
Bug 186187
: [WebGL] GL_EXT_robustness utilization should depend on CONTEXT_ROBUST_ACCESS value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186187-20180601094704.patch (text/plain), 5.04 KB, created by
Zan Dobersek
on 2018-06-01 00:47:05 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Zan Dobersek
Created:
2018-06-01 00:47:05 PDT
Size:
5.04 KB
patch
obsolete
>Subversion Revision: 232345 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index fd050fabe293718786e98e63aac8abc74ba181b8..f4aabd4adc0692275d24fff96db6e38ea61e9e37 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,39 @@ >+2018-06-01 Zan Dobersek <zdobersek@igalia.com> >+ >+ [WebGL] GL_EXT_robustness utilization should depend on CONTEXT_ROBUST_ACCESS value >+ https://bugs.webkit.org/show_bug.cgi?id=186187 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Don't utilize the GL_EXT_robustness extension for reading pixels from >+ the GPU if the underlying OpenGL context did not enable robust access >+ support upon creation. For EGL contexts, this would be done by passing >+ EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT and EGL_TRUE key-value pair in the >+ attribute list passed to eglCreateContext() (as specified in the >+ EGL_EXT_create_context_robustness extension), but at the moment this >+ capability is not utilized. >+ >+ As such, on drivers that implement GL_EXT_robustness support, pixel >+ reads done in WebGLRenderingContextBase end up using glReadnPixels(), >+ but that fails to successfully read anything due to the context >+ rejecting such calls. >+ >+ GL_EXT_robustness is specific to OpenGL ES versions, so to fix this, >+ Extensions3DOpenGLES overrides the isEnabled() method. That override >+ returns false immediately if the inherited isEnabled() implementation >+ returns false. Otherwise it returns true, unless the tested extension >+ is GL_EXT_robustness, in which case we now check that the context's >+ CONTEXT_ROBUST_ACCESS state value is true, meaning the context was >+ created with robust access support enabled. >+ >+ No new tests are possible because this is optional driver-provided >+ functionality that Web content cannot have effect on. >+ >+ * platform/graphics/Extensions3D.h: >+ * platform/graphics/opengl/Extensions3DOpenGLES.cpp: >+ (WebCore::Extensions3DOpenGLES::isEnabled): >+ * platform/graphics/opengl/Extensions3DOpenGLES.h: >+ > 2018-05-30 Carlos Eduardo Ramalho <cadubentzen@gmail.com> > > [GTK] Hardcoded text color in input fields >diff --git a/Source/WebCore/platform/graphics/Extensions3D.h b/Source/WebCore/platform/graphics/Extensions3D.h >index eb4613726fa9c755569d59297837342462bb356d..06ca5e296b47ea60db74c14499d2e13ead8d8fcc 100644 >--- a/Source/WebCore/platform/graphics/Extensions3D.h >+++ b/Source/WebCore/platform/graphics/Extensions3D.h >@@ -109,6 +109,7 @@ public: > GUILTY_CONTEXT_RESET_ARB = 0x8253, > INNOCENT_CONTEXT_RESET_ARB = 0x8254, > UNKNOWN_CONTEXT_RESET_ARB = 0x8255, >+ CONTEXT_ROBUST_ACCESS = 0x90F3, > > // GL_EXT/OES_packed_depth_stencil enums > DEPTH24_STENCIL8 = 0x88F0, >diff --git a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp >index ad807435374214c5099efc84a8e70ae3b66ece4f..149d61ed9da624b38eecfec72be5e59070f664dc 100644 >--- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp >+++ b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp >@@ -66,6 +66,23 @@ Extensions3DOpenGLES::Extensions3DOpenGLES(GraphicsContext3D* context, bool useI > > Extensions3DOpenGLES::~Extensions3DOpenGLES() = default; > >+bool Extensions3DOpenGLES::isEnabled(const String& name) >+{ >+ // Return false immediately if the extension is not supported by the drivers. >+ bool enabled = Extensions3DOpenGLCommon::isEnabled(name); >+ if (!enabled) >+ return false; >+ >+ // For GL_EXT_robustness, check that the context supports robust access. >+ if (name == "GL_EXT_robustness") { >+ GLint robustAccess = GL_FALSE; >+ m_context->getIntegerv(Extensions3D::CONTEXT_ROBUST_ACCESS, &robustAccess); >+ return robustAccess == GL_TRUE; >+ } >+ >+ return true; >+} >+ > void Extensions3DOpenGLES::framebufferTexture2DMultisampleIMG(unsigned long target, unsigned long attachment, unsigned long textarget, unsigned int texture, int level, unsigned long samples) > { > if (m_glFramebufferTexture2DMultisampleIMG) >diff --git a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h >index b634d02b39c30076196b2bb59ee0fbc427d9ca0d..e9ce6aa947614dbe9c1e73a01fffab75db5e220d 100644 >--- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h >+++ b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h >@@ -71,6 +71,8 @@ public: > Extensions3DOpenGLES(GraphicsContext3D*, bool useIndexedGetString); > virtual ~Extensions3DOpenGLES(); > >+ bool isEnabled(const String&) override; >+ > virtual void framebufferTexture2DMultisampleIMG(unsigned long target, unsigned long attachment, unsigned long textarget, unsigned int texture, int level, unsigned long samples); > virtual void renderbufferStorageMultisampleIMG(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height); >
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 186187
: 341742 |
341766