new file mode 100644
@@ -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);
+}
new file mode 100644
@@ -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);
+}
new file mode 100644
@@ -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);
+}
new file mode 100644
@@ -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);
+}
new file mode 100644
@@ -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);
+}
new file mode 100644
@@ -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);
+}
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 <tom.gall@linaro.org> --- .../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