From patchwork Thu Jan 17 16:53:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gall X-Patchwork-Id: 14102 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9647323E57 for ; Thu, 17 Jan 2013 16:53:24 +0000 (UTC) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by fiordland.canonical.com (Postfix) with ESMTP id 0974DA19BBD for ; Thu, 17 Jan 2013 16:53:23 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id l1so2715931vba.41 for ; Thu, 17 Jan 2013 08:53:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=IPqaH2u6k82vQcCqnmzTGjPcCN63SE88BPFsdrEf5Pg=; b=l6gA4+nDe6noQ6MnJ2VCs9PYVej9jpXXqtNdqhzhxUC8Q2oACtaSlka7+TYQGwAoMy MVJviSPOqELjMX0VCoIa5yqjQpfUvxEwVRFnetVKAsfg1AWI4dSMf0cEBPn121gp0Fwz bbQmT5cA24sKOTDMohAOl8+BYorQ3NtKqq2+A3eEKEnftgUpHRQVukIPq4DNO0id8Z0l 59FbKVzuUDMr3cgWlKaN2Nx0OKqzzko9Hi3XJagVYz/KYLOdTAaxvKLkLLZHXethEIV0 piTmmcw/p7F1Qht/6mOYLgDgWaE4EmDGOdHQiEPWdjCt3SffypiC0cWEktjkXsHEEWBY 8rUw== X-Received: by 10.220.154.199 with SMTP id p7mr6062198vcw.48.1358441603483; Thu, 17 Jan 2013 08:53:23 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp40493veb; Thu, 17 Jan 2013 08:53:22 -0800 (PST) X-Received: by 10.50.41.162 with SMTP id g2mr1773052igl.55.1358441601932; Thu, 17 Jan 2013 08:53:21 -0800 (PST) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx.google.com with ESMTPS id gj8si11792549igc.32.2013.01.17.08.53.21 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Jan 2013 08:53:21 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.182 is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) client-ip=209.85.223.182; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.223.182 is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) smtp.mail=tom.gall@linaro.org Received: by mail-ie0-f182.google.com with SMTP id s9so5092898iec.13 for ; Thu, 17 Jan 2013 08:53:21 -0800 (PST) X-Received: by 10.43.83.1 with SMTP id ae1mr3828841icc.24.1358441601289; Thu, 17 Jan 2013 08:53:21 -0800 (PST) Received: from localhost.localdomain ([70.35.96.184]) by mx.google.com with ESMTPS id bg10sm7221879igc.6.2013.01.17.08.53.20 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Jan 2013 08:53:20 -0800 (PST) From: Tom Gall To: patches@linaro.org Cc: Tom Gall Subject: [PATCH 1/1] fix gles regression Date: Thu, 17 Jan 2013 10:53:14 -0600 Message-Id: <1358441594-5025-1-git-send-email-tom.gall@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQnDyqmh5NGVe/er7BI2KFn/nHE5IHgF86iSEHotN/xoYj/Eesprg79Hd+Wk4yniLMgp/QlS 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 --- src/waffle/glx/glx_context.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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;