From patchwork Wed Jan 23 20:48:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gall X-Patchwork-Id: 14250 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 1258A23F79 for ; Wed, 23 Jan 2013 20:48:48 +0000 (UTC) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by fiordland.canonical.com (Postfix) with ESMTP id C8271A19545 for ; Wed, 23 Jan 2013 20:48:47 +0000 (UTC) Received: by mail-vb0-f42.google.com with SMTP id ff1so5654915vbb.1 for ; Wed, 23 Jan 2013 12:48:47 -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=vBeRv63N5rr5mtEOsq1O8NBf7YflbHSNA5f4a1eskCo=; b=iRi5ddr8T3sOReqGs66K2GWNOjQZ/dT40cRDI76jsG7lM8G5eyy8aU+eKiqyBqpwvT zakgROZ0d0gNwdeb+VhxhS2ZtKQi3DMw9xO4lQ5aZk7gkIr7h+PTZxEYaF3L9enAO49D 4uKPB9CvU23KbsClSJAgkJ+ONZvV+2QAtw/B6SRGh/UqlGEuUF6Y2SrFWzpTqRIApROx jYlREOAsCeNdbOEQD5Yw3dXi2Tf5PVU4SIHvAR1mrwJ3ZEtN3D7JmROSv4kKto3YFa4H lbuD2L9aFF3KWuosIw/lAfzBp8L1j5GXpP/NsA3uC6IYfzviAHCx/BI83jjGOHKQ37Sw k3/A== X-Received: by 10.52.18.147 with SMTP id w19mr2601267vdd.94.1358974126875; Wed, 23 Jan 2013 12:48:46 -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 st5csp31535veb; Wed, 23 Jan 2013 12:48:46 -0800 (PST) X-Received: by 10.43.124.130 with SMTP id go2mr2070313icc.8.1358974125578; Wed, 23 Jan 2013 12:48:45 -0800 (PST) Received: from mail-ie0-f173.google.com (mail-ie0-f173.google.com [209.85.223.173]) by mx.google.com with ESMTPS id gu9si18829178igb.72.2013.01.23.12.48.44 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Jan 2013 12:48:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.173 is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) client-ip=209.85.223.173; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.223.173 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-f173.google.com with SMTP id e13so14380843iej.4 for ; Wed, 23 Jan 2013 12:48:44 -0800 (PST) X-Received: by 10.50.1.228 with SMTP id 4mr15779629igp.94.1358974124797; Wed, 23 Jan 2013 12:48:44 -0800 (PST) Received: from localhost.localdomain ([70.35.96.184]) by mx.google.com with ESMTPS id bg10sm13972831igc.6.2013.01.23.12.48.42 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Jan 2013 12:48:43 -0800 (PST) From: Tom Gall To: piglit@lists.freedesktop.org Cc: patches@linaro.org, Tom Gall Subject: [PATCH 1/1] glsl: add explicit version 100 support Date: Wed, 23 Jan 2013 14:48:31 -0600 Message-Id: <1358974111-12826-1-git-send-email-tom.gall@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQl/mD5eFPgsWaB5HRhOnauCfQ/h1tzHGjrVRUrJyhJ5rEh7PLZNEMVel2oHgrPgsei+dy3k This is a small change to add explicit support for glsl version 100 which is used by OpenGL ES 2. This allows for 100 to be passed on the command line. In glslparsertest.c add 100 to the list of versions processed by the switch. Also when version 100 is used, check for gles and if running as gles don't require the GL_ARB_ES2_compatibility extension. In CMakeList.gles2.txt remove ${OPENGL_gles2_LIBRARY} as it's not needed. v2: detach patch from proposed python change. Signed-off-by: Tom Gall --- tests/glslparsertest/CMakeLists.gles2.txt | 5 +---- tests/glslparsertest/glslparsertest.c | 6 +++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/glslparsertest/CMakeLists.gles2.txt b/tests/glslparsertest/CMakeLists.gles2.txt index 1e37bed..5b437f8 100644 --- a/tests/glslparsertest/CMakeLists.gles2.txt +++ b/tests/glslparsertest/CMakeLists.gles2.txt @@ -1,10 +1,7 @@ link_libraries( piglitutil_${piglit_target_api} - ${OPENGL_gles2_LIBRARY} ) -piglit_add_executable(glslparsertest_${piglit_target_api} - glslparsertest.c - ) +piglit_add_executable(glslparsertest_${piglit_target_api} glslparsertest.c) # vim: ft=cmake: diff --git a/tests/glslparsertest/glslparsertest.c b/tests/glslparsertest/glslparsertest.c index ff32da7..c91a56b 100644 --- a/tests/glslparsertest/glslparsertest.c +++ b/tests/glslparsertest/glslparsertest.c @@ -43,6 +43,10 @@ PIGLIT_GL_TEST_CONFIG_BEGIN const unsigned int int_version = parse_glsl_version(argv[3]); switch (int_version) { + case 100: + config.supports_gl_compat_version = 10; + config.supports_gl_es_version = 20; + break; case 110: case 120: case 130: @@ -351,7 +355,7 @@ piglit_init(int argc, char**argv) if (glsl_version_string != NULL) glsl_version = parse_glsl_version(glsl_version_string); - if (requested_version == 100) { + if (!piglit_is_gles() && requested_version == 100) { piglit_require_extension("GL_ARB_ES2_compatibility"); } else if (requested_version == 300) { piglit_require_extension("GL_ARB_ES3_compatibility");