[Piglit] [PATCH 4/4] glsl-1.30: Add another switch expression variant showing a mesa bug.
Eric Anholt
eric at anholt.net
Mon May 14 16:30:08 PDT 2012
---
.../switch-expression-const-ivec2.vert | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 tests/spec/glsl-1.30/compiler/switch-statement/switch-expression-const-ivec2.vert
diff --git a/tests/spec/glsl-1.30/compiler/switch-statement/switch-expression-const-ivec2.vert b/tests/spec/glsl-1.30/compiler/switch-statement/switch-expression-const-ivec2.vert
new file mode 100644
index 0000000..0e8335e
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/switch-statement/switch-expression-const-ivec2.vert
@@ -0,0 +1,18 @@
+// [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
+
+void main() {
+ switch (ivec2(0, 0)) {
+ }
+
+ gl_Position = vec4(0.0);
+}
--
1.7.10
More information about the Piglit
mailing list