@@ -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;
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(-)