aboutsummaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-function-return.vert
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-function-return.vert')
-rw-r--r--tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-function-return.vert31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-function-return.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-function-return.vert
new file mode 100644
index 00000000..cc58f9fb
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-function-return.vert
@@ -0,0 +1,31 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * glsles_version: 1.00
+ * [end config]
+ *
+ * From page 19 (page 25 of the PDF) of the GLSL 1.20 spec:
+ *
+ * "This type can be used anywhere any other type can be used, including
+ * as the return value from a function
+ *
+ * float[5] foo() { }
+ *
+ * as a constructor of an array
+ *
+ * float[5](3.4, 4.2, 5.0, 5.2, 1.1)
+ *
+ * as an unnamed parameter
+ *
+ * void foo(float[5])"
+ */
+
+
+vec4[2] a_function(vec4 [6]);
+
+uniform vec4 [6] an_array;
+
+void main()
+{
+ gl_Position = a_function(an_array)[0];
+}