aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gall <tom.gall@linaro.org>2013-01-17 10:52:25 -0600
committerChad Versace <chad.versace@linux.intel.com>2013-01-21 14:41:08 -0800
commitc6cf7f9fb2b8f05914b631f152261df2b7bae932 (patch)
treeb6da1c2bc89824d207a76c00ba6d71697b7f18c4
parent9f032714ce447bd143c07629dfb8f2d2bcad34bc (diff)
glx: Fix gles regression
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. [chadv: Replace != OPENGL_ES1 with == OPENGL to improve readability. Double negatives are confusing.] Signed-off-by: Tom Gall <tom.gall@linaro.org> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--src/waffle/glx/glx_context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/waffle/glx/glx_context.c b/src/waffle/glx/glx_context.c
index ffb79a4..a0563a3 100644
--- a/src/waffle/glx/glx_context.c
+++ b/src/waffle/glx/glx_context.c
@@ -95,8 +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))
{
attrib_list[i++] = GLX_CONTEXT_MAJOR_VERSION_ARB;
attrib_list[i++] = attrs->context_major_version;