Fix EGL_CONTEXT_CLIENT_VERSION check.
authorMika Isojärvi <misojarvi@google.com>
Fri, 24 Oct 2014 07:58:07 +0000 (10:58 +0300)
committerMika Isojärvi <misojarvi@google.com>
Fri, 24 Oct 2014 07:58:07 +0000 (10:58 +0300)
Check that EGL_CONTEXT_CLIENT_VERSION is version that supports version
used when creating context instead of requiring it to be exactly same.

Change-Id: I072a5796d92450b29e82655ea840c3b67ec8eea9

modules/egl/teglQueryContextTests.cpp

index c6edb9d1ed1c2e0e20c4728f1de6f3995cbbaa03..3f3fe2b1f3da48ded448c3722a5c6b58bf258e27 100644 (file)
@@ -404,7 +404,8 @@ public:
                {
                        const EGLint    clientVersion   = getContextAttrib(display, context, EGL_CONTEXT_CLIENT_VERSION);
 
-                       if (info.clientType == EGL_OPENGL_ES_API && clientVersion != info.clientVersion)
+                       // \todo [2014-10-21 mika] Query actual supported api version from client api to make this check stricter.
+                       if (info.clientType == EGL_OPENGL_ES_API && ((info.clientVersion == 1 && clientVersion != 1) || clientVersion < info.clientVersion))
                        {
                                log << TestLog::Message << "  Fail, client API version doesn't match." << TestLog::EndMessage;
                                m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Invalid client API version");