diff mbox

[1/1] fix gles regression

Message ID 1358441594-5025-1-git-send-email-tom.gall@linaro.org
State Accepted
Headers show

Commit Message

Tom Gall Jan. 17, 2013, 4:53 p.m. UTC
In glx_context_fill_attrib_list, recently a check was added to
work around a bug for OpenGL v1.0 contexts and NVidia. This
check introduced a bug where for OpenGL ES (all versions)
the attrib_list wasn't getting entries for
GLX_CONTEXT_MAJOR_VERSION_ARB or GLX_CONTEXT_MINOR_VERSION_ARB.
In piglit, this causes all OpenGL ES testcases to fail with
context failures.
This fix adjusts the comparison so that OpenGL ES will always
have the context version and not set it for a Open GL v1.0
context.

Signed-off-by: Tom Gall <tom.gall@linaro.org>
---
 src/waffle/glx/glx_context.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/src/waffle/glx/glx_context.c b/src/waffle/glx/glx_context.c
index ffb79a4..70234e3 100644
--- a/src/waffle/glx/glx_context.c
+++ b/src/waffle/glx/glx_context.c
@@ -95,9 +95,8 @@  glx_context_fill_attrib_list(struct glx_config *config,
     // glXCreateContextAttribsARB with MAJOR=1 and MINOR=0 returns an OpenGL
     // 2.1 context. Calling it with MAJOR and MINOR unspecified returns
     // a context of the latest supported OpenGL version.
-    if (attrs->context_api == WAFFLE_CONTEXT_OPENGL &&
-        attrs->context_full_version != 10)
-    {
+	if (!(attrs->context_full_version == 10 &&
+		attrs->context_api != WAFFLE_CONTEXT_OPENGL_ES1)) {
         attrib_list[i++] = GLX_CONTEXT_MAJOR_VERSION_ARB;
         attrib_list[i++] = attrs->context_major_version;