aboutsummaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-ctor-mismatched-size.vert
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-ctor-mismatched-size.vert')
-rw-r--r--tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-ctor-mismatched-size.vert16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-ctor-mismatched-size.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-ctor-mismatched-size.vert
new file mode 100644
index 00000000..fd78eed7
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-ctor-mismatched-size.vert
@@ -0,0 +1,16 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * glsles_version: 1.00
+ * [end config]
+ *
+ * From page 33 (page 39 of the PDF) of the GLSL 1.20 spec:
+ *
+ * "There must be exactly the same number of arguments as the size of the
+ * array being constructed."
+ */
+
+
+vec4 a[] = vec4[2](vec4(0.0), vec4(1.0), vec4(2.0));
+
+void main() { gl_Position = a[0]; }