Commit 5fb5e817 by Chris Forbes

Consider context promotion when validating share context

We were comparing a pre-promotion version with the post-promotion version stored in the share context. This doesn't work. Affects: dEQP-EGL.functional.sharing.* Change-Id: I02c14681b7743c6aaef4404291ac52a48890832c Reviewed-on: https://swiftshader-review.googlesource.com/20368Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 62cfbb9c
......@@ -865,7 +865,10 @@ EGLContext CreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_cont
return EGL_NO_CONTEXT;
}
if(shareContext && shareContext->getClientVersion() != majorVersion)
// Allow sharing between different context versions >= 2.0, but isolate 1.x
// contexts from 2.0+. Strict matching between context versions >= 2.0 is
// confusing for apps to navigate because of version promotion.
if(shareContext && ((shareContext->getClientVersion() >= 2) ^ (majorVersion >= 2)))
{
return error(EGL_BAD_CONTEXT, EGL_NO_CONTEXT);
}
......
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