aboutsummaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-ctor.vert
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-ctor.vert')
-rw-r--r--tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-ctor.vert17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-ctor.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-ctor.vert
new file mode 100644
index 00000000..ec0ff82a
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-ctor.vert
@@ -0,0 +1,17 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * glsles_version: 1.00
+ * [end config]
+ *
+ * From page 20 (page 26 of the PDF) of the GLSL 1.20 spec:
+ *
+ * "Arrays can have initializers formed from array constructors:"
+ */
+
+
+vec4 a[2] = vec4[2](vec4(0.0), vec4(2.0));
+vec4 b[2] = vec4[ ](vec4(0.5), vec4(2.0));
+vec4 c[ ] = vec4[ ](vec4(1.0), vec4(2.0));
+
+void main() { gl_Position = a[0] + b[0] + c[0]; }