aboutsummaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-size-selection.vert
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-size-selection.vert')
-rw-r--r--tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-size-selection.vert23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-size-selection.vert b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-size-selection.vert
new file mode 100644
index 00000000..4ecc2c33
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/structure-and-array-operations/array-size-selection.vert
@@ -0,0 +1,23 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * glsles_version: 1.00
+ * [end config]
+ *
+ * From page 38 (page 44 of the PDF) of the GLSL 1.20 spec:
+ *
+ * "The ternary selection operator (?:). It operates on three expressions
+ * (exp1 ? exp2 : exp3)....The second and third expressions can be any
+ * type, as long their types match....This resulting matching type is
+ * the type of the entire expression."
+ */
+
+
+const vec4[] a = vec4[](vec4(0), vec4(1));
+const vec4[] b = vec4[](vec4(1), vec4(0));
+uniform vec4 c[((true) ? a : b).length()];
+
+void main()
+{
+ gl_Position = c[0];
+}