From patchwork Thu Feb 14 23:03:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gall X-Patchwork-Id: 14806 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 BEC6F23EAD for ; Thu, 14 Feb 2013 23:05:35 +0000 (UTC) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by fiordland.canonical.com (Postfix) with ESMTP id 0CD94A19748 for ; Thu, 14 Feb 2013 23:05:34 +0000 (UTC) Received: by mail-vc0-f175.google.com with SMTP id fw7so1856862vcb.6 for ; Thu, 14 Feb 2013 15:05:34 -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 :in-reply-to:references:x-gm-message-state; bh=1GX1RLFi+J2crLn2oSLCWRvx+MI1aFSfUBX//xn36w8=; b=cYDxL4MLiioYkWHJ21q6vBzfPzOAsnQ6p66gy4lYmcaM2DQA9D+mEz83pveNJVRJbU BLtScIAKC6RW2EjbEUtBSsTiOQ57I7Le3j1yHj6pb01IHTsr/5dCpSmoe1Z8wrgaQKlj IfQlI6YZckBBp898tcwp/jRjxD6R+a761iDzO3ZKSpHHxUiOEa+bSSqhW6WuZP+JxaIE q7uSwLYEDNN6jE4+DZ0SQhQ455ePHUSztZtrIpfue/u1V3/QmUvTTTGTg81pDb2zxzBr 2DDg+Fs0Hm7kXOdH2iXLgNM4uh86+iVw7FGU9UCpp3jConAFXf0B4YHd159+lO8POTAG M9Ew== X-Received: by 10.52.33.167 with SMTP id s7mr501180vdi.52.1360883134516; Thu, 14 Feb 2013 15:05:34 -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.221.4.5 with SMTP id oa5csp290171vcb; Thu, 14 Feb 2013 15:05:33 -0800 (PST) X-Received: by 10.50.53.143 with SMTP id b15mr1060652igp.69.1360883133510; Thu, 14 Feb 2013 15:05:33 -0800 (PST) Received: from mail-ia0-x22c.google.com (ia-in-x022c.1e100.net [2607:f8b0:4001:c02::22c]) by mx.google.com with ESMTPS id gr2si1162963igc.49.2013.02.14.15.05.33 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Feb 2013 15:05:33 -0800 (PST) Received-SPF: neutral (google.com: 2607:f8b0:4001:c02::22c is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) client-ip=2607:f8b0:4001:c02::22c; Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:4001:c02::22c 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-ia0-f172.google.com with SMTP id l29so751774iag.3 for ; Thu, 14 Feb 2013 15:05:33 -0800 (PST) X-Received: by 10.50.207.67 with SMTP id lu3mr1118415igc.12.1360883133126; Thu, 14 Feb 2013 15:05:33 -0800 (PST) Received: from localhost.localdomain ([70.35.96.184]) by mx.google.com with ESMTPS id a3sm856816igq.5.2013.02.14.15.05.30 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Feb 2013 15:05:32 -0800 (PST) From: Tom Gall To: piglit@lists.freedesktop.org Cc: patches@linaro.org, Tom Gall Subject: [PATCH 3/5] glsl-es-1.00: p3 move glsl-1.00 to glsl-es-1.00 Date: Thu, 14 Feb 2013 17:03:53 -0600 Message-Id: <1360883035-9981-3-git-send-email-tom.gall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360883035-9981-1-git-send-email-tom.gall@linaro.org> References: <1360883035-9981-1-git-send-email-tom.gall@linaro.org> X-Gm-Message-State: ALoCoQnbyROLpJNfM+sd+LesfEEfhnbzjhfD0XXblCQOWCoO3xcQ+lFHsG6Xr50qNQ1tR0hN9b+U Move contents of tests/spec/glsl-1.00/compiler/precision-qualifiers to tests/spec/glsl-es-1.00/compiler/precision-qualifiers Signed-off-by: Tom Gall --- .../default-precision-bool-01.frag | 22 --------------- .../default-precision-float-01.frag | 21 -------------- .../default-precision-int-01.frag | 21 -------------- .../default-precision-sampler.frag | 28 ------------------- .../default-precision-sampler.vert | 29 -------------------- .../default-precision-vec-01.frag | 23 ---------------- .../precision-qualifiers/precision-bool-01.frag | 17 ------------ .../precision-qualifiers/precision-bool-02.frag | 17 ------------ .../precision-qualifiers/precision-float-01.frag | 17 ------------ .../precision-qualifiers/precision-float-02.frag | 17 ------------ .../precision-qualifiers/precision-float-03.frag | 18 ------------ .../precision-qualifiers/precision-float-04.frag | 17 ------------ .../precision-fs-highp-01.frag | 24 ---------------- .../precision-fs-highp-02.frag | 26 ------------------ .../precision-function-param-01.frag | 16 ----------- .../precision-qualifiers/precision-global-01.frag | 19 ------------- .../precision-qualifiers/precision-int-01.frag | 17 ------------ .../precision-qualifiers/precision-int-02.frag | 17 ------------ .../precision-qualifiers/precision-int-03.frag | 18 ------------ .../precision-literal-const-01.frag | 16 ----------- .../precision-literal-const-02.frag | 16 ----------- .../precision-qualifiers/precision-local-01.frag | 17 ------------ .../precision-qualifiers/precision-struct-01.frag | 21 -------------- .../precision-qualifiers/precision-struct-02.frag | 21 -------------- .../precision-vs-highp-01.vert | 18 ------------ .../default-precision-bool-01.frag | 22 +++++++++++++++ .../default-precision-float-01.frag | 21 ++++++++++++++ .../default-precision-int-01.frag | 21 ++++++++++++++ .../default-precision-sampler.frag | 28 +++++++++++++++++++ .../default-precision-sampler.vert | 29 ++++++++++++++++++++ .../default-precision-vec-01.frag | 23 ++++++++++++++++ .../precision-qualifiers/precision-bool-01.frag | 17 ++++++++++++ .../precision-qualifiers/precision-bool-02.frag | 17 ++++++++++++ .../precision-qualifiers/precision-float-01.frag | 17 ++++++++++++ .../precision-qualifiers/precision-float-02.frag | 17 ++++++++++++ .../precision-qualifiers/precision-float-03.frag | 18 ++++++++++++ .../precision-qualifiers/precision-float-04.frag | 17 ++++++++++++ .../precision-fs-highp-01.frag | 24 ++++++++++++++++ .../precision-fs-highp-02.frag | 26 ++++++++++++++++++ .../precision-function-param-01.frag | 16 +++++++++++ .../precision-qualifiers/precision-global-01.frag | 19 +++++++++++++ .../precision-qualifiers/precision-int-01.frag | 17 ++++++++++++ .../precision-qualifiers/precision-int-02.frag | 17 ++++++++++++ .../precision-qualifiers/precision-int-03.frag | 18 ++++++++++++ .../precision-literal-const-01.frag | 16 +++++++++++ .../precision-literal-const-02.frag | 16 +++++++++++ .../precision-qualifiers/precision-local-01.frag | 17 ++++++++++++ .../precision-qualifiers/precision-struct-01.frag | 21 ++++++++++++++ .../precision-qualifiers/precision-struct-02.frag | 21 ++++++++++++++ .../precision-vs-highp-01.vert | 18 ++++++++++++ 50 files changed, 493 insertions(+), 493 deletions(-) delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-bool-01.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-float-01.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-int-01.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.vert delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-vec-01.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-bool-01.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-bool-02.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-01.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-02.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-03.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-04.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-fs-highp-01.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-fs-highp-02.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-function-param-01.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-global-01.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-int-01.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-int-02.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-int-03.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-literal-const-01.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-literal-const-02.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-local-01.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-struct-01.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-struct-02.frag delete mode 100644 tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-vs-highp-01.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-bool-01.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-float-01.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-int-01.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-sampler.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-sampler.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-vec-01.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-01.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-02.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-01.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-02.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-03.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-04.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-01.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-02.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-function-param-01.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-global-01.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-01.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-02.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-03.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-01.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-02.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-local-01.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-01.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-02.frag create mode 100644 tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-vs-highp-01.vert diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-bool-01.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-bool-01.frag deleted file mode 100644 index 07b669f..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-bool-01.frag +++ /dev/null @@ -1,22 +0,0 @@ -// [config] -// expect_result: fail -// glsl_version: 1.00 -// [end config] -// -// Type bool cannot have default precision. -// -// From section 4.5.3 of the GLSL 1.00 spec: -// The precision statement -// precision precision-qualifier type; -// can be used to establish a default precision qualifier. The type field -// can be either int or float. [...] Any other types or qualifiers will -// result in an error. - - -#version 100 - -precision lowp bool; - -float f() { - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-float-01.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-float-01.frag deleted file mode 100644 index 63b8756..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-float-01.frag +++ /dev/null @@ -1,21 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// Type float can have default precision. -// -// From section 4.5.3 of the GLSL 1.00 spec: -// The precision statement -// precision precision-qualifier type; -// can be used to establish a default precision qualifier. The type field -// can be either int or float, - - -#version 100 - -precision lowp float; - -float f() { - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-int-01.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-int-01.frag deleted file mode 100644 index ecfd6e7..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-int-01.frag +++ /dev/null @@ -1,21 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// Type int can have default precision. -// -// From section 4.5.3 of the GLSL 1.00 spec: -// The precision statement -// precision precision-qualifier type; -// can be used to establish a default precision qualifier. The type field -// can be either int or float, - - -#version 100 - -precision mediump int; - -float f() { - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.frag deleted file mode 100644 index f600796..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.frag +++ /dev/null @@ -1,28 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// check_link: true -// [end config] -// -// From the GLSL ES 1.00 specification, section 4.5.3 ("Default -// Precision Qualifiers"): -// -// "The precision statement -// -// precision precision-qualifier type; -// -// can be used to establish a default precision qualifier. The -// type field can be int or float or any of the sampler types, and -// the precision-qualifier can be lowp, mediump, or highp." -// -// This test verifies that a default precision qualifier can be used -// on all of GLSL ES 1.00's sampler types. - -#version 100 - -precision mediump sampler2D; -precision mediump samplerCube; - -void main() -{ -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.vert b/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.vert deleted file mode 100644 index b44d016..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-sampler.vert +++ /dev/null @@ -1,29 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// check_link: true -// [end config] -// -// From the GLSL ES 1.00 specification, section 4.5.3 ("Default -// Precision Qualifiers"): -// -// "The precision statement -// -// precision precision-qualifier type; -// -// can be used to establish a default precision qualifier. The -// type field can be int or float or any of the sampler types, and -// the precision-qualifier can be lowp, mediump, or highp." -// -// This test verifies that a default precision qualifier can be used -// on all of GLSL ES 1.00's sampler types. - -#version 100 - -precision mediump sampler2D; -precision mediump samplerCube; - -void main() -{ - gl_Position = vec4(0.0); -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-vec-01.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-vec-01.frag deleted file mode 100644 index 777d069..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/default-precision-vec-01.frag +++ /dev/null @@ -1,23 +0,0 @@ -// [config] -// expect_result: fail -// glsl_version: 1.00 -// [end config] -// -// Vector types cannot have default precision. -// -// From section 4.5.3 of the GLSL 1.00 spec: -// The precision statement -// precision precision-qualifier type; -// can be used to establish a default precision qualifier. The type field -// can be either int or float. [...] Any other types or qualifiers will -// result in an error. - - - -#version 100 - -precision mediump vec2; - -float f() { - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-bool-01.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-bool-01.frag deleted file mode 100644 index a350ae6..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-bool-01.frag +++ /dev/null @@ -1,17 +0,0 @@ -// [config] -// expect_result: fail -// glsl_version: 1.00 -// [end config] -// -// Precision qualifiers cannot be applied to bool variables. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// Literal constants do not have precision qualifiers. Neither do Boolean -// variables. - -#version 100 - -float f() { - lowp bool b; - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-bool-02.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-bool-02.frag deleted file mode 100644 index 0251c78..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-bool-02.frag +++ /dev/null @@ -1,17 +0,0 @@ -// [config] -// expect_result: fail -// glsl_version: 1.30 -// [end config] -// -// Precision qualifiers cannot be applied to boolean vectors. -// -// From section 4.5.2 of the GLSL 1.30 spec: -// Literal constants do not have precision qualifiers. Neither do Boolean -// variables. - -#version 130 - -float f() { - lowp bvec2 v; - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-01.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-01.frag deleted file mode 100644 index 9e122b8..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-01.frag +++ /dev/null @@ -1,17 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// Precision qualifiers can be applied to floats. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// Any floating point or any integer declaration can have the type -// preceded by one of these precision qualifiers - -#version 100 - -float f() { - mediump float x; - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-02.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-02.frag deleted file mode 100644 index e84dba0..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-02.frag +++ /dev/null @@ -1,17 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// Precision qualifiers can be applied to float vectors. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// Any floating point or any integer declaration can have the type -// preceded by one of these precision qualifiers - -#version 100 - -float f() { - lowp vec2 v; - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-03.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-03.frag deleted file mode 100644 index d4878ed..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-03.frag +++ /dev/null @@ -1,18 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// Precision qualifiers can be applied to float arrays. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// Any floating point or any integer declaration can have the type -// preceded by one of these precision qualifiers - -#version 100 - -lowp float a[4]; - -float f() { - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-04.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-04.frag deleted file mode 100644 index b13877d..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-float-04.frag +++ /dev/null @@ -1,17 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// Precision qualifiers can be applied to float matrices. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// Any floating point or any integer declaration can have the type -// preceded by one of these precision qualifiers - -#version 100 - -float f() { - lowp mat4 m; - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-fs-highp-01.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-fs-highp-01.frag deleted file mode 100644 index 7540d30..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-fs-highp-01.frag +++ /dev/null @@ -1,24 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// If high precision is available in the fragment shader, then it should be -// legal to use it. -// -// From section 4.5.4 of the GLSL 1.00 spec: -// "The built-in macro GL_FRAGMENT_PRECISION_HIGH is defined to one on -// systems supporting highp precision in the fragment language -// #define GL_FRAGMENT_PRECISION_HIGH 1 -// and is not defined on systems not supporting highp precision in the -// fragment language." - -#version 100 - -#ifdef GL_FRAGMENT_PRECISION_HIGH -highp float x; -#endif - -float f() { - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-fs-highp-02.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-fs-highp-02.frag deleted file mode 100644 index a79d0f0..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-fs-highp-02.frag +++ /dev/null @@ -1,26 +0,0 @@ -// [config] -// expect_result: fail -// glsl_version: 1.00 -// [end config] -// -// If high precision is unavailable in the fragment shader, then it should be -// illegal to use it. -// -// From section 4.5.4 of the GLSL 1.00 spec: -// "The built-in macro GL_FRAGMENT_PRECISION_HIGH is defined to one on -// systems supporting highp precision in the fragment language -// #define GL_FRAGMENT_PRECISION_HIGH 1 -// and is not defined on systems not supporting highp precision in the -// fragment language." - -#version 100 - -#ifndef GL_FRAGMENT_PRECISION_HIGH -highp float x; -#else -#error -#endif - -float f() { - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-function-param-01.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-function-param-01.frag deleted file mode 100644 index 8ab6734..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-function-param-01.frag +++ /dev/null @@ -1,16 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// Function parameters and return types can have precision qualifiers. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// Any floating point or any integer declaration can have the type -// preceded by one of these precision qualifiers - -#version 100 - -lowp float f(lowp int x) { - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-global-01.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-global-01.frag deleted file mode 100644 index 83e4ce9..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-global-01.frag +++ /dev/null @@ -1,19 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// Global variables can have precision qualifiers. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// Any floating point or any integer declaration can have the type -// preceded by one of these precision qualifiers - -#version 100 - -uniform mediump float x; -varying lowp float y; - -float f() { - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-int-01.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-int-01.frag deleted file mode 100644 index 061b365..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-int-01.frag +++ /dev/null @@ -1,17 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// Precision qualifiers can be applied to ints. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// Any floating point or any integer declaration can have the type -// preceded by one of these precision qualifiers - -#version 100 - -float f() { - lowp int x; - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-int-02.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-int-02.frag deleted file mode 100644 index 3572a4b..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-int-02.frag +++ /dev/null @@ -1,17 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// Precision qualifiers can be applied to integer vectors. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// Any floating point or any integer declaration can have the type -// preceded by one of these precision qualifiers - -#version 100 - -float f() { - mediump ivec2 v; - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-int-03.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-int-03.frag deleted file mode 100644 index 4ed9263..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-int-03.frag +++ /dev/null @@ -1,18 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// Precision qualifiers can be applied to int arrays. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// Any floating point or any integer declaration can have the type -// preceded by one of these precision qualifiers - -#version 100 - -lowp int a[4]; - -float f() { - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-literal-const-01.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-literal-const-01.frag deleted file mode 100644 index abeb82c..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-literal-const-01.frag +++ /dev/null @@ -1,16 +0,0 @@ -// [config] -// expect_result: fail -// glsl_version: 1.00 -// [end config] -// -// Precision qualifiers cannot be applied to integer literals. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// Literal constants do not have precision qualifiers. - -#version 100 - -float f() { - lowp int x = lowp 1; - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-literal-const-02.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-literal-const-02.frag deleted file mode 100644 index 8daeb3b..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-literal-const-02.frag +++ /dev/null @@ -1,16 +0,0 @@ -// [config] -// expect_result: fail -// glsl_version: 1.00 -// [end config] -// -// Precision qualifiers cannot be applied to float literals. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// Literal constants do not have precision qualifiers. - -#version 100 - -float f() { - lowp float x = lowp 0.0; - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-local-01.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-local-01.frag deleted file mode 100644 index 4f7e285..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-local-01.frag +++ /dev/null @@ -1,17 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// Local variables can have precision qualifiers. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// Any floating point or any integer declaration can have the type -// preceded by one of these precision qualifiers - -#version 100 - -float f() { - lowp float x = 0.0; - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-struct-01.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-struct-01.frag deleted file mode 100644 index 07161a2..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-struct-01.frag +++ /dev/null @@ -1,21 +0,0 @@ -// [config] -// expect_result: fail -// glsl_version: 1.00 -// [end config] -// -// Precision qualifiers cannot be applied to structs. -// -// This test declares the struct and its sole member with matching -// precision qualifier. -// -// See section 4.5.2 of the GLSL 1.00 spec. - -#version 100 - -lowp struct s { - lowp float a; -}; - -float f() { - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-struct-02.frag b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-struct-02.frag deleted file mode 100644 index 4dcaa98..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-struct-02.frag +++ /dev/null @@ -1,21 +0,0 @@ -// [config] -// expect_result: fail -// glsl_version: 1.00 -// [end config] -// -// Precision qualifiers cannot be applied to structs. -// -// This test declares the struct, but none of its members, with a precision -// qualifier. -// -// See section 4.5.2 of the GLSL 1.00 spec. - -#version 100 - -lowp struct s { - float a; -}; - -float f() { - return 0.0; -} diff --git a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-vs-highp-01.vert b/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-vs-highp-01.vert deleted file mode 100644 index bf9a0eb..0000000 --- a/tests/spec/glsl-1.00/compiler/precision-qualifiers/precision-vs-highp-01.vert +++ /dev/null @@ -1,18 +0,0 @@ -// [config] -// expect_result: pass -// glsl_version: 1.00 -// [end config] -// -// High precision is always available in the vertex shader. -// -// From section 4.5.2 of the GLSL 1.00 spec: -// "The vertex language requires any uses of lowp, mediump and highp to -// compile and link without error." - -#version 100 - -highp float x; - -float f() { - return 0.0; -} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-bool-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-bool-01.frag new file mode 100644 index 0000000..07b669f --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-bool-01.frag @@ -0,0 +1,22 @@ +// [config] +// expect_result: fail +// glsl_version: 1.00 +// [end config] +// +// Type bool cannot have default precision. +// +// From section 4.5.3 of the GLSL 1.00 spec: +// The precision statement +// precision precision-qualifier type; +// can be used to establish a default precision qualifier. The type field +// can be either int or float. [...] Any other types or qualifiers will +// result in an error. + + +#version 100 + +precision lowp bool; + +float f() { + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-float-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-float-01.frag new file mode 100644 index 0000000..63b8756 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-float-01.frag @@ -0,0 +1,21 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// Type float can have default precision. +// +// From section 4.5.3 of the GLSL 1.00 spec: +// The precision statement +// precision precision-qualifier type; +// can be used to establish a default precision qualifier. The type field +// can be either int or float, + + +#version 100 + +precision lowp float; + +float f() { + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-int-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-int-01.frag new file mode 100644 index 0000000..ecfd6e7 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-int-01.frag @@ -0,0 +1,21 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// Type int can have default precision. +// +// From section 4.5.3 of the GLSL 1.00 spec: +// The precision statement +// precision precision-qualifier type; +// can be used to establish a default precision qualifier. The type field +// can be either int or float, + + +#version 100 + +precision mediump int; + +float f() { + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-sampler.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-sampler.frag new file mode 100644 index 0000000..f600796 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-sampler.frag @@ -0,0 +1,28 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// check_link: true +// [end config] +// +// From the GLSL ES 1.00 specification, section 4.5.3 ("Default +// Precision Qualifiers"): +// +// "The precision statement +// +// precision precision-qualifier type; +// +// can be used to establish a default precision qualifier. The +// type field can be int or float or any of the sampler types, and +// the precision-qualifier can be lowp, mediump, or highp." +// +// This test verifies that a default precision qualifier can be used +// on all of GLSL ES 1.00's sampler types. + +#version 100 + +precision mediump sampler2D; +precision mediump samplerCube; + +void main() +{ +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-sampler.vert b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-sampler.vert new file mode 100644 index 0000000..b44d016 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-sampler.vert @@ -0,0 +1,29 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// check_link: true +// [end config] +// +// From the GLSL ES 1.00 specification, section 4.5.3 ("Default +// Precision Qualifiers"): +// +// "The precision statement +// +// precision precision-qualifier type; +// +// can be used to establish a default precision qualifier. The +// type field can be int or float or any of the sampler types, and +// the precision-qualifier can be lowp, mediump, or highp." +// +// This test verifies that a default precision qualifier can be used +// on all of GLSL ES 1.00's sampler types. + +#version 100 + +precision mediump sampler2D; +precision mediump samplerCube; + +void main() +{ + gl_Position = vec4(0.0); +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-vec-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-vec-01.frag new file mode 100644 index 0000000..777d069 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/default-precision-vec-01.frag @@ -0,0 +1,23 @@ +// [config] +// expect_result: fail +// glsl_version: 1.00 +// [end config] +// +// Vector types cannot have default precision. +// +// From section 4.5.3 of the GLSL 1.00 spec: +// The precision statement +// precision precision-qualifier type; +// can be used to establish a default precision qualifier. The type field +// can be either int or float. [...] Any other types or qualifiers will +// result in an error. + + + +#version 100 + +precision mediump vec2; + +float f() { + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-01.frag new file mode 100644 index 0000000..a350ae6 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-01.frag @@ -0,0 +1,17 @@ +// [config] +// expect_result: fail +// glsl_version: 1.00 +// [end config] +// +// Precision qualifiers cannot be applied to bool variables. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// Literal constants do not have precision qualifiers. Neither do Boolean +// variables. + +#version 100 + +float f() { + lowp bool b; + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-02.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-02.frag new file mode 100644 index 0000000..0251c78 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-bool-02.frag @@ -0,0 +1,17 @@ +// [config] +// expect_result: fail +// glsl_version: 1.30 +// [end config] +// +// Precision qualifiers cannot be applied to boolean vectors. +// +// From section 4.5.2 of the GLSL 1.30 spec: +// Literal constants do not have precision qualifiers. Neither do Boolean +// variables. + +#version 130 + +float f() { + lowp bvec2 v; + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-01.frag new file mode 100644 index 0000000..9e122b8 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-01.frag @@ -0,0 +1,17 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// Precision qualifiers can be applied to floats. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// Any floating point or any integer declaration can have the type +// preceded by one of these precision qualifiers + +#version 100 + +float f() { + mediump float x; + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-02.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-02.frag new file mode 100644 index 0000000..e84dba0 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-02.frag @@ -0,0 +1,17 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// Precision qualifiers can be applied to float vectors. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// Any floating point or any integer declaration can have the type +// preceded by one of these precision qualifiers + +#version 100 + +float f() { + lowp vec2 v; + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-03.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-03.frag new file mode 100644 index 0000000..d4878ed --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-03.frag @@ -0,0 +1,18 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// Precision qualifiers can be applied to float arrays. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// Any floating point or any integer declaration can have the type +// preceded by one of these precision qualifiers + +#version 100 + +lowp float a[4]; + +float f() { + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-04.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-04.frag new file mode 100644 index 0000000..b13877d --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-float-04.frag @@ -0,0 +1,17 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// Precision qualifiers can be applied to float matrices. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// Any floating point or any integer declaration can have the type +// preceded by one of these precision qualifiers + +#version 100 + +float f() { + lowp mat4 m; + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-01.frag new file mode 100644 index 0000000..7540d30 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-01.frag @@ -0,0 +1,24 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// If high precision is available in the fragment shader, then it should be +// legal to use it. +// +// From section 4.5.4 of the GLSL 1.00 spec: +// "The built-in macro GL_FRAGMENT_PRECISION_HIGH is defined to one on +// systems supporting highp precision in the fragment language +// #define GL_FRAGMENT_PRECISION_HIGH 1 +// and is not defined on systems not supporting highp precision in the +// fragment language." + +#version 100 + +#ifdef GL_FRAGMENT_PRECISION_HIGH +highp float x; +#endif + +float f() { + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-02.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-02.frag new file mode 100644 index 0000000..a79d0f0 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-fs-highp-02.frag @@ -0,0 +1,26 @@ +// [config] +// expect_result: fail +// glsl_version: 1.00 +// [end config] +// +// If high precision is unavailable in the fragment shader, then it should be +// illegal to use it. +// +// From section 4.5.4 of the GLSL 1.00 spec: +// "The built-in macro GL_FRAGMENT_PRECISION_HIGH is defined to one on +// systems supporting highp precision in the fragment language +// #define GL_FRAGMENT_PRECISION_HIGH 1 +// and is not defined on systems not supporting highp precision in the +// fragment language." + +#version 100 + +#ifndef GL_FRAGMENT_PRECISION_HIGH +highp float x; +#else +#error +#endif + +float f() { + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-function-param-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-function-param-01.frag new file mode 100644 index 0000000..8ab6734 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-function-param-01.frag @@ -0,0 +1,16 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// Function parameters and return types can have precision qualifiers. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// Any floating point or any integer declaration can have the type +// preceded by one of these precision qualifiers + +#version 100 + +lowp float f(lowp int x) { + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-global-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-global-01.frag new file mode 100644 index 0000000..83e4ce9 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-global-01.frag @@ -0,0 +1,19 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// Global variables can have precision qualifiers. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// Any floating point or any integer declaration can have the type +// preceded by one of these precision qualifiers + +#version 100 + +uniform mediump float x; +varying lowp float y; + +float f() { + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-01.frag new file mode 100644 index 0000000..061b365 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-01.frag @@ -0,0 +1,17 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// Precision qualifiers can be applied to ints. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// Any floating point or any integer declaration can have the type +// preceded by one of these precision qualifiers + +#version 100 + +float f() { + lowp int x; + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-02.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-02.frag new file mode 100644 index 0000000..3572a4b --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-02.frag @@ -0,0 +1,17 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// Precision qualifiers can be applied to integer vectors. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// Any floating point or any integer declaration can have the type +// preceded by one of these precision qualifiers + +#version 100 + +float f() { + mediump ivec2 v; + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-03.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-03.frag new file mode 100644 index 0000000..4ed9263 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-int-03.frag @@ -0,0 +1,18 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// Precision qualifiers can be applied to int arrays. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// Any floating point or any integer declaration can have the type +// preceded by one of these precision qualifiers + +#version 100 + +lowp int a[4]; + +float f() { + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-01.frag new file mode 100644 index 0000000..abeb82c --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-01.frag @@ -0,0 +1,16 @@ +// [config] +// expect_result: fail +// glsl_version: 1.00 +// [end config] +// +// Precision qualifiers cannot be applied to integer literals. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// Literal constants do not have precision qualifiers. + +#version 100 + +float f() { + lowp int x = lowp 1; + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-02.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-02.frag new file mode 100644 index 0000000..8daeb3b --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-literal-const-02.frag @@ -0,0 +1,16 @@ +// [config] +// expect_result: fail +// glsl_version: 1.00 +// [end config] +// +// Precision qualifiers cannot be applied to float literals. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// Literal constants do not have precision qualifiers. + +#version 100 + +float f() { + lowp float x = lowp 0.0; + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-local-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-local-01.frag new file mode 100644 index 0000000..4f7e285 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-local-01.frag @@ -0,0 +1,17 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// Local variables can have precision qualifiers. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// Any floating point or any integer declaration can have the type +// preceded by one of these precision qualifiers + +#version 100 + +float f() { + lowp float x = 0.0; + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-01.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-01.frag new file mode 100644 index 0000000..07161a2 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-01.frag @@ -0,0 +1,21 @@ +// [config] +// expect_result: fail +// glsl_version: 1.00 +// [end config] +// +// Precision qualifiers cannot be applied to structs. +// +// This test declares the struct and its sole member with matching +// precision qualifier. +// +// See section 4.5.2 of the GLSL 1.00 spec. + +#version 100 + +lowp struct s { + lowp float a; +}; + +float f() { + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-02.frag b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-02.frag new file mode 100644 index 0000000..4dcaa98 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-struct-02.frag @@ -0,0 +1,21 @@ +// [config] +// expect_result: fail +// glsl_version: 1.00 +// [end config] +// +// Precision qualifiers cannot be applied to structs. +// +// This test declares the struct, but none of its members, with a precision +// qualifier. +// +// See section 4.5.2 of the GLSL 1.00 spec. + +#version 100 + +lowp struct s { + float a; +}; + +float f() { + return 0.0; +} diff --git a/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-vs-highp-01.vert b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-vs-highp-01.vert new file mode 100644 index 0000000..bf9a0eb --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/precision-qualifiers/precision-vs-highp-01.vert @@ -0,0 +1,18 @@ +// [config] +// expect_result: pass +// glsl_version: 1.00 +// [end config] +// +// High precision is always available in the vertex shader. +// +// From section 4.5.2 of the GLSL 1.00 spec: +// "The vertex language requires any uses of lowp, mediump and highp to +// compile and link without error." + +#version 100 + +highp float x; + +float f() { + return 0.0; +}