[Piglit] [PATCH 1/4] Tests that a pre-declared struct can be used in an interface block.
Nicholas Mack
nichmack at gmail.com
Mon Jul 29 15:25:10 PDT 2013
GLSLang// GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
"built-in types, previously declared structures, and arrays of these
are allowed as the type of a declarator in the same manner they are
allowed outside a block."
---
...rface-blocks-declared-structs-within-block.vert | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 tests/spec/glsl-1.50/compiler/interface-blocks-declared-structs-within-block.vert
diff --git a/tests/spec/glsl-1.50/compiler/interface-blocks-declared-structs-within-block.vert b/tests/spec/glsl-1.50/compiler/interface-blocks-declared-structs-within-block.vert
new file mode 100644
index 0000000..b77861a
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/interface-blocks-declared-structs-within-block.vert
@@ -0,0 +1,28 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Tests that a pre-declared struct can be used an interface block.
+//
+// GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+// "built-in types, previously declared structures, and arrays of these
+// are allowed as the type of a declarator in the same manner they are
+// allowed outside a block."
+
+#version 150
+
+struct test_struct {
+ int a;
+ float b;
+};
+
+out block {
+ test_struct c;
+} inst;
+
+void main()
+{
+}
+
--
1.8.3.1
More information about the Piglit
mailing list