Commit 077f20ae by Geoff Lang Committed by Commit Bot

Properly check for debug and robust access context creation flags.

These flags can come from both attributes and bitfield flags. Also move the robust access check to an UNIMPLEMENTED in Context, dEQP ES 3.1 tests attempt to use this flag and it's convenient to be able test by disabling UNIMPLEMENTED assertions. BUG=angleproject:1442 Change-Id: I1641fdb3afee308235351ebd60be680765b16b3b Reviewed-on: https://chromium-review.googlesource.com/405774 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 2f6435e0
...@@ -172,12 +172,15 @@ GLenum GetResetStrategy(const egl::AttributeMap &attribs) ...@@ -172,12 +172,15 @@ GLenum GetResetStrategy(const egl::AttributeMap &attribs)
bool GetRobustAccess(const egl::AttributeMap &attribs) bool GetRobustAccess(const egl::AttributeMap &attribs)
{ {
return (attribs.get(EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT, EGL_FALSE) == EGL_TRUE); return (attribs.get(EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT, EGL_FALSE) == EGL_TRUE) ||
((attribs.get(EGL_CONTEXT_FLAGS_KHR, 0) & EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR) !=
0);
} }
bool GetDebug(const egl::AttributeMap &attribs) bool GetDebug(const egl::AttributeMap &attribs)
{ {
return (attribs.get(EGL_CONTEXT_OPENGL_DEBUG, EGL_FALSE) == EGL_TRUE); return (attribs.get(EGL_CONTEXT_OPENGL_DEBUG, EGL_FALSE) == EGL_TRUE) ||
((attribs.get(EGL_CONTEXT_FLAGS_KHR, 0) & EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR) != 0);
} }
bool GetNoError(const egl::AttributeMap &attribs) bool GetNoError(const egl::AttributeMap &attribs)
...@@ -256,7 +259,10 @@ Context::Context(rx::EGLImplFactory *implFactory, ...@@ -256,7 +259,10 @@ Context::Context(rx::EGLImplFactory *implFactory,
mCurrentSurface(nullptr), mCurrentSurface(nullptr),
mResourceManager(nullptr) mResourceManager(nullptr)
{ {
ASSERT(!mRobustAccess); // Unimplemented if (mRobustAccess)
{
UNIMPLEMENTED();
}
initCaps(GetWebGLContext(attribs)); initCaps(GetWebGLContext(attribs));
initWorkarounds(); initWorkarounds();
......
...@@ -258,7 +258,6 @@ Error ValidateCreateContext(Display *display, Config *configuration, gl::Context ...@@ -258,7 +258,6 @@ Error ValidateCreateContext(Display *display, Config *configuration, gl::Context
EGLAttrib clientMinorVersion = 0; EGLAttrib clientMinorVersion = 0;
EGLAttrib contextFlags = 0; EGLAttrib contextFlags = 0;
bool resetNotification = false; bool resetNotification = false;
bool robustAccess = false;
for (AttributeMap::const_iterator attributeIter = attributes.begin(); attributeIter != attributes.end(); attributeIter++) for (AttributeMap::const_iterator attributeIter = attributes.begin(); attributeIter != attributes.end(); attributeIter++)
{ {
EGLAttrib attribute = attributeIter->first; EGLAttrib attribute = attributeIter->first;
...@@ -294,7 +293,6 @@ Error ValidateCreateContext(Display *display, Config *configuration, gl::Context ...@@ -294,7 +293,6 @@ Error ValidateCreateContext(Display *display, Config *configuration, gl::Context
{ {
return Error(EGL_BAD_ATTRIBUTE); return Error(EGL_BAD_ATTRIBUTE);
} }
robustAccess = (value == EGL_TRUE);
break; break;
case EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR: case EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR:
...@@ -399,17 +397,6 @@ Error ValidateCreateContext(Display *display, Config *configuration, gl::Context ...@@ -399,17 +397,6 @@ Error ValidateCreateContext(Display *display, Config *configuration, gl::Context
return Error(EGL_BAD_ATTRIBUTE); return Error(EGL_BAD_ATTRIBUTE);
} }
if ((contextFlags & EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR) > 0)
{
robustAccess = true;
}
if (robustAccess)
{
// Unimplemented
return Error(EGL_BAD_CONFIG);
}
if (shareContext) if (shareContext)
{ {
// Shared context is invalid or is owned by another display // Shared context is invalid or is owned by another display
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment