summaryrefslogtreecommitdiff
path: root/tests/spec/glsl-1.30/compiler/switch-statement/switch-expression-in-vec2.vert
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spec/glsl-1.30/compiler/switch-statement/switch-expression-in-vec2.vert')
-rw-r--r--tests/spec/glsl-1.30/compiler/switch-statement/switch-expression-in-vec2.vert20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.30/compiler/switch-statement/switch-expression-in-vec2.vert b/tests/spec/glsl-1.30/compiler/switch-statement/switch-expression-in-vec2.vert
new file mode 100644
index 000000000..2c274af1f
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/switch-statement/switch-expression-in-vec2.vert
@@ -0,0 +1,20 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.30
+// [end config]
+//
+// From page 57 (page 63 of the PDF) of the GLSL 1.30 spec:
+//
+// "The type of init-expression in a switch statement must be a scalar
+// integer."
+
+#version 130
+
+in vec2 src;
+
+void main() {
+ switch (src) {
+ }
+
+ gl_Position = vec4(0.0);
+}