[Piglit] [PATCH 11/23] arb_shading_language_420pack: Test too many elements in struct initializer
Matt Turner
mattst88 at gmail.com
Sat Jun 29 19:43:04 PDT 2013
---
...l-aggregate-initializer-struct-too-many-fields.frag | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-too-many-fields.frag
diff --git a/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-too-many-fields.frag b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-too-many-fields.frag
new file mode 100644
index 0000000..3bab1f7
--- /dev/null
+++ b/tests/spec/arb_shading_language_420pack/compiler/illegal-aggregate-initializer-struct-too-many-fields.frag
@@ -0,0 +1,18 @@
+/* [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 has 2 fields, but 3 given as initializer
+ struct {
+ float a;
+ int b;
+ } e = { 1.2, 2, 3 };
+ gl_FragColor = vec4(1.0);
+}
--
1.8.1.5
More information about the Piglit
mailing list