[Piglit] [PATCH] glsl-1.30: test unsigned vs signed in switch statement

Tapani Pälli tapani.palli at intel.com
Fri Jun 6 05:26:36 PDT 2014


Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
 .../switch-statement/switch-uint-vs-int.vert        | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 tests/spec/glsl-1.30/compiler/switch-statement/switch-uint-vs-int.vert

diff --git a/tests/spec/glsl-1.30/compiler/switch-statement/switch-uint-vs-int.vert b/tests/spec/glsl-1.30/compiler/switch-statement/switch-uint-vs-int.vert
new file mode 100644
index 0000000..d749318
--- /dev/null
+++ b/tests/spec/glsl-1.30/compiler/switch-statement/switch-uint-vs-int.vert
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.30
+// [end config]
+//
+// Test checks that compiler issues a warning on
+// using unsigned vs signed type in a switch.
+//
+
+#version 130
+
+void main() {
+   uint x = 1u;
+   switch (x) {
+   case 1:
+   break;
+   default:
+   break;
+   }
+   gl_Position = vec4(0.0);
+}
-- 
1.8.3.1



More information about the Piglit mailing list