diff options
Diffstat (limited to 'tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-implicit-size.vert')
-rw-r--r-- | tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-implicit-size.vert | 28 |
1 files changed, 28 insertions, 0 deletions
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 00000000..39b32e62 --- /dev/null +++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-equal-implicit-size.vert @@ -0,0 +1,28 @@ +/* [config] + * expect_result: fail + * glsl_version: 1.20 + * glsles_version: 1.00 + * [end config] + * + * From page 35 (page 41 of the PDF) of the GLSL 1.20 spec: + * + * "The equality operators and assignment operator are only allowed if the + * two operands are same size and type....Both array operands must be + * explicitly sized. When using the equality operators ... two arrays are + * equal if and only if all the elements are element-wise equal. + */ + + +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); +} |