[Piglit] [PATCH 4/4] Tests that a struct cannot be defined within a block.
Nicholas Mack
nichmack at gmail.com
Mon Jul 29 15:25:13 PDT 2013
GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
"structure definitions cannot be nested inside a block"
---
...erface-blocks-structs-defined-within-block.vert | 27 ++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 tests/spec/glsl-1.50/compiler/interface-blocks-structs-defined-within-block.vert
diff --git a/tests/spec/glsl-1.50/compiler/interface-blocks-structs-defined-within-block.vert b/tests/spec/glsl-1.50/compiler/interface-blocks-structs-defined-within-block.vert
new file mode 100644
index 0000000..cb1b07c
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/interface-blocks-structs-defined-within-block.vert
@@ -0,0 +1,27 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Tests that a struct cannot be defined within a block.
+//
+// GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+// "structure definitions cannot be nested inside a block"
+
+#version 150
+
+out block {
+ struct test_struct {
+ int a;
+ float b;
+ } c;
+ test_struct d;
+} inst;
+
+void main()
+{
+ inst.c.a = 1;
+ inst.d.b = 2.0;
+}
+
--
1.8.3.1
More information about the Piglit
mailing list