[PATCH] glx: don't force version == 2.0 for ES2 GLX context creation

Ilia Mirkin imirkin at alum.mit.edu
Tue Jan 19 07:06:48 PST 2016


dEQP tests request a specific version. The EXT spec has been updated to
allow other versions, so allow anything >= 2.0 to be requested.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 glx/createcontext.c | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/glx/createcontext.c b/glx/createcontext.c
index d06bc1f..867c956 100644
--- a/glx/createcontext.c
+++ b/glx/createcontext.c
@@ -262,27 +262,12 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
     case GLX_CONTEXT_ES2_PROFILE_BIT_EXT:
         /* The GLX_EXT_create_context_es2_profile spec says:
          *
-         *     "... If the version requested is 2.0, and the
-         *     GLX_CONTEXT_ES2_PROFILE_BIT_EXT bit is set in the
+         *     "... If the version requested is a valid and supported OpenGL-ES
+         *     version, and the GLX_CONTEXT_ES_PROFILE_BIT_EXT bit is set in the
          *     GLX_CONTEXT_PROFILE_MASK_ARB attribute (see below), then the
-         *     context returned will implement OpenGL ES 2.0."
-         *
-         * It also says:
-         *
-         *     "* If attribute GLX_CONTEXT_PROFILE_MASK_ARB has no bits set;
-         *        has any bits set other than
-         *        GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
-         *        GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, or
-         *        GLX_CONTEXT_ES2_PROFILE_BIT_EXT; has more than one of these
-         *        bits set; or if the implementation does not supported the
-         *        requested profile, then GLXBadProfileARB is generated."
-         *
-         * It does not specifically say what is supposed to happen if
-         * GLX_CONTEXT_ES2_PROFILE_BIT_EXT is set but the version requested is
-         * not 2.0.  We choose to generate GLXBadProfileARB as this matches
-         * NVIDIA's behavior.
+         *     context returned will implement the OpenGL ES version requested."
          */
-        if (major_version != 2 || minor_version != 0)
+        if (major_version < 2)
             return __glXError(GLXBadProfileARB);
         break;
     default:
-- 
2.4.10



More information about the xorg-devel mailing list