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 <[email protected]> --- .../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); +} -- 1.7.10.4 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
