From patchwork Fri Apr 26 21:53:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gall X-Patchwork-Id: 16450 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 07EFC23A49 for ; Fri, 26 Apr 2013 21:55:39 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id i21sf1753202yha.10 for ; Fri, 26 Apr 2013 14:54:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=6qLWX8JbwW+NJRU6IrBbdz5WzeCvayVuOd1Ip6E3mCo=; b=Ng1qA059uC0cByrKvzKiAi1YnSEmtZp6HA0+hsRlv404XSDkF+2ZoMhUu5RHuHw5Oi XuJf+aZz2F3AA0iyYQFeIZrGIKG/Y4p5a7qDJzRbwt1gbMBc3kaRW4UsrezL1caa+aBI r4swo7u3+RRllf7I1vJpkyz+Naz2WmM2BEXQan4H48GkicVzq2nRmsZWL4/nzbm+ow+e zHWC7yRL47HGFxvnX4wXIVg5t5+HsmDnXb8AyvCN8qMgmrXWGmlmRCMUiJ6uOWD4FKG1 64JxgSVj2kGAk1ON5m++sJs0ujGygtHdNxZANxzRDJyfpE7idc2FSmzsm498ro+ePlAh NCVA== X-Received: by 10.236.181.234 with SMTP id l70mr22202129yhm.53.1367013282548; Fri, 26 Apr 2013 14:54:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.38.196 with SMTP id i4ls2105203qek.70.gmail; Fri, 26 Apr 2013 14:54:42 -0700 (PDT) X-Received: by 10.52.185.164 with SMTP id fd4mr1460381vdc.19.1367013282134; Fri, 26 Apr 2013 14:54:42 -0700 (PDT) Received: from mail-vb0-x231.google.com (mail-vb0-x231.google.com [2607:f8b0:400c:c02::231]) by mx.google.com with ESMTPS id ir6si6141387vdb.65.2013.04.26.14.54.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 14:54:42 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::231; Received: by mail-vb0-f49.google.com with SMTP id 12so569786vbf.8 for ; Fri, 26 Apr 2013 14:54:42 -0700 (PDT) X-Received: by 10.221.0.199 with SMTP id nn7mr30009452vcb.14.1367013281970; Fri, 26 Apr 2013 14:54:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp86642veb; Fri, 26 Apr 2013 14:54:41 -0700 (PDT) X-Received: by 10.42.54.129 with SMTP id r1mr14842666icg.23.1367013281197; Fri, 26 Apr 2013 14:54:41 -0700 (PDT) Received: from mail-ie0-x22b.google.com (mail-ie0-x22b.google.com [2607:f8b0:4001:c03::22b]) by mx.google.com with ESMTPS id q8si4673218ign.43.2013.04.26.14.54.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 14:54:41 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:4001:c03::22b is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) client-ip=2607:f8b0:4001:c03::22b; Received: by mail-ie0-f171.google.com with SMTP id e11so5516705iej.16 for ; Fri, 26 Apr 2013 14:54:41 -0700 (PDT) X-Received: by 10.50.78.162 with SMTP id c2mr3076067igx.11.1367013280947; Fri, 26 Apr 2013 14:54:40 -0700 (PDT) Received: from localhost.localdomain ([70.35.96.184]) by mx.google.com with ESMTPSA id s16sm5043264ign.4.2013.04.26.14.54.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 14:54:39 -0700 (PDT) From: Tom Gall To: piglit@lists.freedesktop.org Cc: patches@linaro.org, Tom Gall Subject: [PATCH 07/10] glsl-es-1.00: new array tests for +, /, >, <, >=, <=, &&, !, ||, ^^, ++, --, - Date: Fri, 26 Apr 2013 16:53:41 -0500 Message-Id: <1367013224-21359-7-git-send-email-tom.gall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1367013224-21359-1-git-send-email-tom.gall@linaro.org> References: <1367013224-21359-1-git-send-email-tom.gall@linaro.org> X-Gm-Message-State: ALoCoQk3Al5m0lOQFw+dUozCgIYt82ZpOgdqncucy719Bc8WJulmydMvMaPoVfTIL9PVSr1SWIi7 X-Original-Sender: tom.gall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add to tests/spec/glsl-es-1.00/compiler/structure-and-array-operations a series of array operator tests including logical and mathimatical tests. These are operators including +,/,>,<,>=,<=,&&,!,||,^^,+,-,++,--, , ,- Signed-off-by: Tom Gall --- .../structure-and-array-operations/array-add.vert | 23 +++++++++++++++++ .../array-divide.vert | 23 +++++++++++++++++ .../array-greater-equal.vert | 20 +++++++++++++++ .../array-greater.vert | 20 +++++++++++++++ .../array-less-equal.vert | 20 +++++++++++++++ .../structure-and-array-operations/array-less.vert | 20 +++++++++++++++ .../array-logical-and.vert | 20 +++++++++++++++ .../array-logical-not.vert | 19 ++++++++++++++ .../array-logical-or.vert | 20 +++++++++++++++ .../array-logical-xor.vert | 20 +++++++++++++++ .../array-negate.vert | 22 +++++++++++++++++ .../array-positive.vert | 22 +++++++++++++++++ .../array-postdecrement.vert | 21 ++++++++++++++++ .../array-postincrement.vert | 21 ++++++++++++++++ .../array-selection.vert | 26 ++++++++++++++++++++ .../array-sequence.vert | 20 +++++++++++++++ .../array-subtract.vert | 23 +++++++++++++++++ 17 files changed, 360 insertions(+) create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-add.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-divide.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-greater-equal.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-greater.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-less-equal.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-less.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-and.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-not.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-or.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-xor.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-negate.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-positive.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-postdecrement.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-postincrement.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-selection.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-sequence.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-subtract.vert diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-add.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-add.vert new file mode 100644 index 0000000..e824260 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-add.vert @@ -0,0 +1,23 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The arithmetic binary operators add (+), subtract (-), multiply (*), + * and divide (/) operate on integer and floating-point typed expressions + * (including vectors and matrices). The two operands must be of the same + * type or one can be a scalar float and the other a float vector or matrix + * or one can be a scalar integer and the other an integer vector." + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + vec4 c[2] = a + b; + gl_Position = c[0]; +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-divide.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-divide.vert new file mode 100644 index 0000000..d1c9111 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-divide.vert @@ -0,0 +1,23 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The arithmetic binary operators add (+), subtract (-), multiply (*), + * and divide (/) operate on integer and floating-point typed expressions + * (including vectors and matrices). The two operands must be of the same + * type or one can be a scalar float and the other a float vector or matrix + * or one can be a scalar integer and the other an integer vector." + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + vec4 c[2] = a / b; + gl_Position = c[0]; +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-greater-equal.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-greater-equal.vert new file mode 100644 index 0000000..49cfa5e --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-greater-equal.vert @@ -0,0 +1,20 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The relational operators greater (>), less than (<), greater than or + * equal (>=), less than or equal (<=) operate only on scalar integer and + * scalar floating point expressions." + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + gl_Position = vec4(a >= b); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-greater.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-greater.vert new file mode 100644 index 0000000..2f59003 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-greater.vert @@ -0,0 +1,20 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The relational operators greater (>), less than (<), greater than or + * equal (>=), less than or equal (<=) operate only on scalar integer and + * scalar floating point expressions." + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + gl_Position = vec4(a > b); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-less-equal.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-less-equal.vert new file mode 100644 index 0000000..9d5b51c --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-less-equal.vert @@ -0,0 +1,20 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The relational operators greater (>), less than (<), greater than or + * equal (>=), less than or equal (<=) operate only on scalar integer and + * scalar floating point expressions." + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + gl_Position = vec4(a <= b); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-less.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-less.vert new file mode 100644 index 0000000..41a7280 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-less.vert @@ -0,0 +1,20 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The relational operators greater (>), less than (<), greater than or + * equal (>=), less than or equal (<=) operate only on scalar integer and + * scalar floating point expressions." + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + gl_Position = vec4(a < b); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-and.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-and.vert new file mode 100644 index 0000000..7b4860d --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-and.vert @@ -0,0 +1,20 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The logical binary operators and (&&), or (||), and exclusive or (^^) + * operate only one two Boolean expressions and result in a Boolean + * expression. + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + gl_Position = vec4(a && b); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-not.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-not.vert new file mode 100644 index 0000000..70e4839 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-not.vert @@ -0,0 +1,19 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The logical unary operator not (!) operates only on a Boolean expression + * and results in a Boolean expression. + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + gl_Position = vec4(!a); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-or.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-or.vert new file mode 100644 index 0000000..5e8b704 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-or.vert @@ -0,0 +1,20 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The logical binary operators and (&&), or (||), and exclusive or (^^) + * operate only one two Boolean expressions and result in a Boolean + * expression. + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + gl_Position = vec4(a || b); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-xor.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-xor.vert new file mode 100644 index 0000000..12673fd --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-logical-xor.vert @@ -0,0 +1,20 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The logical binary operators and (&&), or (||), and exclusive or (^^) + * operate only one two Boolean expressions and result in a Boolean + * expression. + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + gl_Position = vec4(a ^^ b); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-negate.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-negate.vert new file mode 100644 index 0000000..0d7697d --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-negate.vert @@ -0,0 +1,22 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The arithmetic binary operators add (+), subtract (-), multiply (*), + * and divide (/) operate on integer and floating-point typed expressions + * (including vectors and matrices). The two operands must be of the same + * type or one can be a scalar float and the other a float vector or matrix + * or one can be a scalar integer and the other an integer vector." + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + gl_Position = vec4(-a == b); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-positive.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-positive.vert new file mode 100644 index 0000000..ee5671c --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-positive.vert @@ -0,0 +1,22 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The arithmetic binary operators add (+), subtract (-), multiply (*), + * and divide (/) operate on integer and floating-point typed expressions + * (including vectors and matrices). The two operands must be of the same + * type or one can be a scalar float and the other a float vector or matrix + * or one can be a scalar integer and the other an integer vector." + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + gl_Position = vec4(+a == b); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-postdecrement.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-postdecrement.vert new file mode 100644 index 0000000..3ace25e --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-postdecrement.vert @@ -0,0 +1,21 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The arithmetic binary operators add (+), subtract (-), multiply (*), + * and divide (/) operate on integer and floating-point typed expressions + * (including vectors and matrices). The two operands must be of the same + * type or one can be a scalar float and the other a float vector or matrix + * or one can be a scalar integer and the other an integer vector." + */ + + +uniform vec4 a[2]; + +void main() +{ + gl_Position = (a--)[0]; +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-postincrement.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-postincrement.vert new file mode 100644 index 0000000..2c3e2b0 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-postincrement.vert @@ -0,0 +1,21 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The arithmetic binary operators add (+), subtract (-), multiply (*), + * and divide (/) operate on integer and floating-point typed expressions + * (including vectors and matrices). The two operands must be of the same + * type or one can be a scalar float and the other a float vector or matrix + * or one can be a scalar integer and the other an integer vector." + */ + + +uniform vec4 a[2]; + +void main() +{ + gl_Position = (a++)[0]; +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-selection.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-selection.vert new file mode 100644 index 0000000..e7cbec1 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-selection.vert @@ -0,0 +1,26 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 49 of the GLSL ES 1.00.17 spec: + * + * "The ternary selection operator (?:). It operates on three expressions + * (exp1 ? exp2 : exp3). This operator evaluates the first expression, + * which must result in a scalar Boolean. If the result is true, it + * selects to evaluate the second expression, otherwise it selects to + * evaluate the third expression. One one of the second or third expressions + * is evaluated. The second and third expressions must be the same type, but + * can be of any type other than an array." + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; +uniform int i; +uniform bool pick_from_a_or_b; + +void main() +{ + gl_Position = (pick_from_a_or_b ? a : b)[i]; +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-sequence.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-sequence.vert new file mode 100644 index 0000000..6e3f60a --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-sequence.vert @@ -0,0 +1,20 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The sequence operator (,) that operates on expressions by returning the + * type and value of the right-most expression in a comma separated list of + * expressions. All expressions are evaluated, in order, from right to left. + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + gl_Position = (a, b)[0]; +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-subtract.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-subtract.vert new file mode 100644 index 0000000..d9c717d --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-subtract.vert @@ -0,0 +1,23 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * From page 48 of the GLSL ES 1.00.17 spec: + * + * "The arithmetic binary operators add (+), subtract (-), multiply (*), + * and divide (/) operate on integer and floating-point typed expressions + * (including vectors and matrices). The two operands must be of the same + * type or one can be a scalar float and the other a float vector or matrix + * or one can be a scalar integer and the other an integer vector." + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + vec4 c[2] = a - b; + gl_Position = c[0]; +}