[Piglit] [PATCH 3/3] arb_shading_language_420pack: Test wrong type in named struct initializer
Matt Turner
mattst88 at gmail.com
Wed Jul 3 14:10:33 PDT 2013
---
...aggregate-initializer-named-struct-wrong-type.frag | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-named-struct-wrong-type.frag
diff --git a/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-named-struct-wrong-type.frag b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-named-struct-wrong-type.frag
new file mode 100644
index 0000000..56e0c61
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-named-struct-wrong-type.frag
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.30
+ * require_extensions: GL_ARB_shading_language_420pack
+ * [end config]
+ */
+
+#version 130
+#extension GL_ARB_shading_language_420pack: enable
+
+void main() {
+ // Illegal since e.b is int, but bool given as initializer
+ struct S {
+ float a;
+ int b;
+ };
+ S e = { 1.2, true };
+ gl_FragColor = vec4(1.0);
+}
--
1.8.1.5
More information about the Piglit
mailing list