From patchwork Thu Feb 21 16:19:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gall X-Patchwork-Id: 15014 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 4A45323F78 for ; Thu, 21 Feb 2013 16:19:49 +0000 (UTC) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by fiordland.canonical.com (Postfix) with ESMTP id C74BDA18A29 for ; Thu, 21 Feb 2013 16:19:48 +0000 (UTC) Received: by mail-ve0-f177.google.com with SMTP id m1so8019552ves.8 for ; Thu, 21 Feb 2013 08:19:48 -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=B97o0wpqt/L2H7lYbia+dPNTz5ylNpMdsaSvTwDSMq8=; b=YMOiZlYxfCO9MQS266NWI7Q1lE77a1+Dxhxm/widHsHI7HvaMJdcgRmywaIlbNOZ7p b0M0C21K0ouMDtjQhnju5fmZiQ+N56vO+ayZogBAPR+2VvR77A+W1HNDmmAdHtr9etQf 4QG9eY0XeyU3LisKjcdx2KsMWHc0A9LSQh3tvoL6UyWmXPNA1U7i2o3Sv7SPhXHxf6ZY fg0cuxohnpk4hq1erJiCcB1IPLqDLFd8UjsfJ0rsaKrDfi6++/qIZ0pUUi2+CSMTcz+j dsqvL1Yl3SyE86TRm/wbCW/LK6+YEn5YLAUtiGwPQpuotRE9QgN79bxst0QRBFHazO7j DhIw== X-Received: by 10.220.152.73 with SMTP id f9mr18417503vcw.49.1361463588276; Thu, 21 Feb 2013 08:19:48 -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 st5csp32265veb; Thu, 21 Feb 2013 08:19:45 -0800 (PST) X-Received: by 10.58.219.6 with SMTP id pk6mr32855579vec.41.1361463585475; Thu, 21 Feb 2013 08:19:45 -0800 (PST) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id bd1si70774027ved.13.2013.02.21.08.19.45 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Feb 2013 08:19:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) client-ip=209.85.128.181; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.181 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-ve0-f181.google.com with SMTP id d10so8047862vea.40 for ; Thu, 21 Feb 2013 08:19:45 -0800 (PST) X-Received: by 10.52.28.82 with SMTP id z18mr27237365vdg.33.1361463579470; Thu, 21 Feb 2013 08:19:39 -0800 (PST) Received: from starbird.site.stayonline.net (205.158.58.41.ptr.us.xo.net. [205.158.58.41]) by mx.google.com with ESMTPS id p7sm103887007vdt.2.2013.02.21.08.19.35 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Feb 2013 08:19:38 -0800 (PST) From: Tom Gall To: piglit@lists.freedesktop.org Cc: patches@linaro.org, Tom Gall Subject: [PATCH 1/1] Add tests/spec/glsl-es-1.00/execution/maximums shader tests Date: Thu, 21 Feb 2013 10:19:13 -0600 Message-Id: <1361463553-24116-1-git-send-email-tom.gall@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQkMy2VZNO9+CK/+34xIDmxVMN1JbE3p6ATWmO6zGz9bnKgGYA/zXeHoQyfzGeCxdc75/HCV Adds gl_MaxCombinedTextureImageUnits.shader_test gl_MaxDrawBuffers.shader_test gl_MaxFragmentUniformVectors.shader_test gl_MaxTextureImageUnits.shader_test gl_MaxVaryingVectors.shader_test gl_MaxVertexAttribs.shader_test gl_MaxVertexTextureImageUnits.shader_test gl_MaxVertexUniformVectors.shader_test These check the built-in constants of the same name from section 7.4 of the glsl es 1.0.17 spec. v2: squash patch, address one by one spec reference. Signed-off-by: Tom Gall --- .../gl_MaxCombinedTextureImageUnits.shader_test | 30 ++++++++++++++++++++ .../maximums/gl_MaxDrawBuffers.shader_test | 29 +++++++++++++++++++ .../gl_MaxFragmentUniformVectors.shader_test | 29 +++++++++++++++++++ .../maximums/gl_MaxTextureImageUnits.shader_test | 29 +++++++++++++++++++ .../maximums/gl_MaxVaryingVectors.shader_test | 29 +++++++++++++++++++ .../maximums/gl_MaxVertexAttribs.shader_test | 29 +++++++++++++++++++ .../gl_MaxVertexTextureImageUnits.shader_test | 29 +++++++++++++++++++ .../gl_MaxVertexUniformVectors.shader_test | 29 +++++++++++++++++++ 8 files changed, 233 insertions(+) create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxDrawBuffers.shader_test create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxFragmentUniformVectors.shader_test create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.shader_test create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVaryingVectors.shader_test create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexAttribs.shader_test create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test create mode 100644 tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexUniformVectors.shader_test diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test new file mode 100644 index 0000000..887cb8f --- /dev/null +++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test @@ -0,0 +1,30 @@ +# [description] +# Tests for GLSL ES 1.00 minimum maximums for the builtin constants. +# +# See the GLSL ES 1.0.17 specification, section 7.4, page 61 + +[require] +GLSL ES >= 1.00 +GL ES >= 2.0 + +[vertex shader] +attribute vec4 vertex; + +void main(void) +{ + gl_Position = vertex; +} + +[fragment shader] + +void main(void) +{ + if (gl_MaxCombinedTextureImageUnits >= 8) + gl_FragColor = vec4(0, 1, 0, 0); + else + gl_FragColor = vec4(1, 0, 0, 0); +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 0.0 diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxDrawBuffers.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxDrawBuffers.shader_test new file mode 100644 index 0000000..b9a9b5b --- /dev/null +++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxDrawBuffers.shader_test @@ -0,0 +1,29 @@ +# [description] +# Tests for GLSL ES 1.00 minimum maximums for the builtin constants. +# +# See the GLSL ES 1.0.17 specification, section 7.4, page 61. + +[require] +GLSL ES >= 1.00 +GL ES >= 2.0 + +[vertex shader] +attribute vec4 vertex; + +void main(void) +{ + gl_Position = vertex; +} + +[fragment shader] +void main(void) +{ + if (gl_MaxDrawBuffers >= 1) + gl_FragColor = vec4(0, 1, 0, 0); + else + gl_FragColor = vec4(1, 0, 0, 0); +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 0.0 diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxFragmentUniformVectors.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxFragmentUniformVectors.shader_test new file mode 100644 index 0000000..df3ecbc --- /dev/null +++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxFragmentUniformVectors.shader_test @@ -0,0 +1,29 @@ +# [description] +# Tests for GLSL ES 1.00 minimum maximums for the builtin constants. +# +# See the GLSL ES 1.0.17 specification, section 7.4, page 61. + +[require] +GLSL ES >= 1.00 +GL ES >= 2.0 + +[vertex shader] +attribute vec4 vertex; + +void main(void) +{ + gl_Position = vertex; +} + +[fragment shader] +void main(void) +{ + if (gl_MaxFragmentUniformVectors >= 16) + gl_FragColor = vec4(0, 1, 0, 0); + else + gl_FragColor = vec4(1, 0, 0, 0); +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 0.0 diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.shader_test new file mode 100644 index 0000000..e1b0ed7 --- /dev/null +++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.shader_test @@ -0,0 +1,29 @@ +# [description] +# Tests for GLSL ES 1.00 minimum maximums for the builtin constants. +# +# See the GLSL ES 1.0.17 specification, section 7.4, page 61. + +[require] +GLSL ES >= 1.00 +GL ES >= 2.0 + +[vertex shader] +attribute vec4 vertex; + +void main(void) +{ + gl_Position = vertex; +} + +[fragment shader] +void main(void) +{ + if (gl_MaxTextureImageUnits >= 8) + gl_FragColor = vec4(0, 1, 0, 0); + else + gl_FragColor = vec4(1, 0, 0, 0); +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 0.0 diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVaryingVectors.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVaryingVectors.shader_test new file mode 100644 index 0000000..871b07c --- /dev/null +++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVaryingVectors.shader_test @@ -0,0 +1,29 @@ +# [description] +# Tests for GLSL ES 1.00 minimum maximums for the builtin constants. +# +# See the GLSL ES 1.0.17 specification, section 7.4, page 61. + +[require] +GLSL ES >= 1.00 +GL ES >= 2.0 + +[vertex shader] +attribute vec4 vertex; + +void main(void) +{ + gl_Position = vertex; +} + +[fragment shader] +void main(void) +{ + if (gl_MaxVaryingVectors >= 8) + gl_FragColor = vec4(0, 1, 0, 0); + else + gl_FragColor = vec4(1, 0, 0, 0); +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 0.0 diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexAttribs.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexAttribs.shader_test new file mode 100644 index 0000000..82ea187 --- /dev/null +++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexAttribs.shader_test @@ -0,0 +1,29 @@ +# [description] +# Tests for GLSL ES 1.00 minimum maximums for the builtin constants. +# +# See the GLSL ES 1.0.17 specification, section 7.4, page 61. + +[require] +GLSL ES >= 1.00 +GL ES >= 2.0 + +[vertex shader] +attribute vec4 vertex; + +void main(void) +{ + gl_Position = vertex; +} + +[fragment shader] +void main(void) +{ + if (gl_MaxVertexAttribs >= 8) + gl_FragColor = vec4(0, 1, 0, 0); + else + gl_FragColor = vec4(1, 0, 0, 0); +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 0.0 diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test new file mode 100644 index 0000000..1a27665 --- /dev/null +++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexTextureImageUnits.shader_test @@ -0,0 +1,29 @@ +# [description] +# Tests for GLSL ES 1.00 minimum maximums for the builtin constants. +# +# See the GLSL ES 1.0.17 specification, section 7.4, page 61. + +[require] +GLSL ES >= 1.00 +GL ES >= 2.0 + +[vertex shader] +attribute vec4 vertex; + +void main(void) +{ + gl_Position = vertex; +} + +[fragment shader] +void main(void) +{ + if (gl_MaxVertexTextureImageUnits >= 0) + gl_FragColor = vec4(0, 1, 0, 0); + else + gl_FragColor = vec4(1, 0, 0, 0); +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 0.0 diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexUniformVectors.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexUniformVectors.shader_test new file mode 100644 index 0000000..9f85b79 --- /dev/null +++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxVertexUniformVectors.shader_test @@ -0,0 +1,29 @@ +# [description] +# Tests for GLSL ES 1.00 minimum maximums for the builtin constants. +# +# See the GLSL ES 1.0.17 specification, section 7.4, page 61. + +[require] +GLSL ES >= 1.00 +GL ES >= 2.0 + +[vertex shader] +attribute vec4 vertex; + +void main(void) +{ + gl_Position = vertex; +} + +[fragment shader] +void main(void) +{ + if (gl_MaxVertexUniformVectors >= 128) + gl_FragColor = vec4(0, 1, 0, 0); + else + gl_FragColor = vec4(1, 0, 0, 0); +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 0.0