From patchwork Fri Apr 26 21:53:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Gall X-Patchwork-Id: 16446 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3A6092397A for ; Fri, 26 Apr 2013 21:55:28 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id db10sf4119016veb.1 for ; Fri, 26 Apr 2013 14:54:31 -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=fZ4gapoKzTDOBWBPCRaOLLX+75kXFieEgbHfS/SWEYs=; b=CTD95IDWYePWxur7T52Lh/SJV2ilDpyOoQFLNwCJJg6sImbLG3ySB42YC5AWHz6/zb sJscKp/XEY6vCuOAdPyKZeE7THKLe6SUA4XR5F9vDiqSZS51TuoPpr7raALmFWvU1xfn ImwrimV1XFrcFkuLlOMa/l07d+rprdfEq/eq3JCHcKzWt4erLR/x5YIO4z56fHNz4o1D HAhcxeOm6oY/72lKteBHnl+L8SYiqrqq6ePx4B8J+3JmZbGhBlY+9N1HCFjXeMZhLtG0 9CSkcV38qNJPU9VKYj9jJGKBSQtUcnmpMC+ATJcxEL6oaRYWUTdCa1CgmRZuI7PwORjb a3HQ== X-Received: by 10.224.88.200 with SMTP id b8mr31692492qam.8.1367013271495; Fri, 26 Apr 2013 14:54:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.64.132 with SMTP id o4ls2098391qes.11.gmail; Fri, 26 Apr 2013 14:54:31 -0700 (PDT) X-Received: by 10.52.243.196 with SMTP id xa4mr25161105vdc.22.1367013271214; Fri, 26 Apr 2013 14:54:31 -0700 (PDT) Received: from mail-ve0-x22e.google.com (mail-ve0-x22e.google.com [2607:f8b0:400c:c01::22e]) by mx.google.com with ESMTPS id sa4si6157552vdc.23.2013.04.26.14.54.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 14:54:31 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22e 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:c01::22e; Received: by mail-ve0-f174.google.com with SMTP id b10so2100929vea.33 for ; Fri, 26 Apr 2013 14:54:31 -0700 (PDT) X-Received: by 10.52.71.4 with SMTP id q4mr25192391vdu.8.1367013270991; Fri, 26 Apr 2013 14:54:30 -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 nf2csp86633veb; Fri, 26 Apr 2013 14:54:30 -0700 (PDT) X-Received: by 10.50.119.104 with SMTP id kt8mr2953465igb.0.1367013270324; Fri, 26 Apr 2013 14:54:30 -0700 (PDT) Received: from mail-ia0-x236.google.com (mail-ia0-x236.google.com [2607:f8b0:4001:c02::236]) by mx.google.com with ESMTPS id pp8si11499193icb.43.2013.04.26.14.54.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 14:54:30 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:4001:c02::236 is neither permitted nor denied by best guess record for domain of tom.gall@linaro.org) client-ip=2607:f8b0:4001:c02::236; Received: by mail-ia0-f182.google.com with SMTP id w33so1736728iag.41 for ; Fri, 26 Apr 2013 14:54:30 -0700 (PDT) X-Received: by 10.50.109.166 with SMTP id ht6mr2935137igb.26.1367013270053; Fri, 26 Apr 2013 14:54:30 -0700 (PDT) Received: from localhost.localdomain ([70.35.96.184]) by mx.google.com with ESMTPSA id s16sm5043264ign.4.2013.04.26.14.54.28 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 14:54:29 -0700 (PDT) From: Tom Gall To: piglit@lists.freedesktop.org Cc: patches@linaro.org, Tom Gall Subject: [PATCH 03/10] glsl-es-1.00: array equality tests Date: Fri, 26 Apr 2013 16:53:37 -0500 Message-Id: <1367013224-21359-3-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: ALoCoQmaCNfyny0032HGDdOYg8+f7DIvw9Gelb0WdpOGoNh4brj4RbP4REWmZGn5s3sGmYfk7JkS X-Original-Sender: tom.gall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22e 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 equality tests, with mismatching types, sizes, implicit sizes etc. Signed-off-by: Tom Gall --- .../array-equal-implicit-size.vert | 32 ++++++++++++++++++++ .../array-equal-matrix.vert | 22 ++++++++++++++ .../array-equal-mismatched-base-type.vert | 22 ++++++++++++++ .../array-equal-mismatched-size.vert | 19 ++++++++++++ .../array-equal-vector.vert | 22 ++++++++++++++ .../array-equal.vert | 22 ++++++++++++++ 6 files changed, 139 insertions(+) create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-implicit-size.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-matrix.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-mismatched-base-type.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-mismatched-size.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-vector.vert create mode 100644 tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal.vert diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-implicit-size.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-implicit-size.vert new file mode 100644 index 0000000..9a8abc8 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-implicit-size.vert @@ -0,0 +1,32 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * Page 24, GLSL ES 1.00.17 spec: + * + * " The array size must be an integral constant expression (see Section 4.3.3 + * "Integral Constant Expressions") greater than zero." + * + * Further Section 10.17 Unsized Array Declarations on page 93 states: + * + * "gl_TexCoord is part of fixed functionality so unsigned arrays should be + * removed for GLSL ES + * + * RESOLUTION: Remove unsized array declarations" + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + vec4 c[]; + + // Implicitly size c to match a and b. + c[0] = b[0]; + c[1] = b[1]; + + gl_Position = vec4(a == c); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-matrix.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-matrix.vert new file mode 100644 index 0000000..e234c58 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-matrix.vert @@ -0,0 +1,22 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * Page 48 GLSL ES 1.00.17 spec: + * + * "The equality operations equal (==) and not equal (!=) operate on all + * types execpt arrays, structures containing arrays...." + * + * Further "For vectors, matricies, and structures, all components of + * the operands must be equal for the operands to be considered equal." + */ + + +uniform vec4 a[4]; +uniform mat4 b; + +void main() +{ + gl_Position = vec4(a == b); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-mismatched-base-type.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-mismatched-base-type.vert new file mode 100644 index 0000000..67bf83d --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-mismatched-base-type.vert @@ -0,0 +1,22 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * Page 48 GLSL ES 1.00.17 spec: + * + * "The equality operations equal (==) and not equal (!=) operate on all + * types execpt arrays, structures containing arrays...." + * + * Further "For vectors, matricies, and structures, all components of + * the operands must be equal for the operands to be considered equal." + */ + + +uniform vec4 a[2]; +uniform vec3 b[2]; // Note the differing base type + +void main() +{ + gl_Position = vec4(a == b); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-mismatched-size.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-mismatched-size.vert new file mode 100644 index 0000000..7843eff --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-mismatched-size.vert @@ -0,0 +1,19 @@ +/* [config] + * expect_result: fail + * glsles_version: 1.00 + * [end config] + * + * Page 48 GLSL ES 1.00.17 spec: + * + * "The equality operations equal (==) and not equal (!=) operate on all + * types execpt arrays, structures containing arrays...." + */ + + +uniform vec4 a[2]; +uniform vec4 b[3]; // Note the differing size + +void main() +{ + gl_Position = vec4(a == b); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-vector.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-vector.vert new file mode 100644 index 0000000..64545cf --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-vector.vert @@ -0,0 +1,22 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.00 + * [end config] + * + * Page 48 GLSL ES 1.00.17 spec: + * + * "The equality operations equal (==) and not equal (!=) operate on all + * types execpt arrays, structures containing arrays...." + * + * Further "For vectors, matricies, and structures, all components of + * the operands must be equal for the operands to be considered equal." + */ + + +uniform float a[4]; +uniform vec4 b; + +void main() +{ + gl_Position = vec4(a == b); +} diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal.vert new file mode 100644 index 0000000..80fad65 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal.vert @@ -0,0 +1,22 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.00 + * [end config] + * + * Page 48 GLSL ES 1.00.17 spec: + * + * "The equality operations equal (==) and not equal (!=) operate on all + * types execpt arrays, structures containing arrays...." + * + * Further "For vectors, matricies, and structures, all components of + * the operands must be equal for the operands to be considered equal." + */ + + +uniform vec4 a[2]; +uniform vec4 b[2]; + +void main() +{ + gl_Position = vec4(a == b); +}