---
 ...terface-blocks-no-initializer-within-block.vert | 25 ++++++++++++++++++++++
 ...erface-blocks-no-sampler-type-within-block.vert | 24 +++++++++++++++++++++
 2 files changed, 49 insertions(+)
 create mode 100644 
tests/spec/glsl-1.50/compiler/interface-blocks-no-initializer-within-block.vert
 create mode 100644 
tests/spec/glsl-1.50/compiler/interface-blocks-no-sampler-type-within-block.vert

diff --git 
a/tests/spec/glsl-1.50/compiler/interface-blocks-no-initializer-within-block.vert
 
b/tests/spec/glsl-1.50/compiler/interface-blocks-no-initializer-within-block.vert
new file mode 100644
index 0000000..d902a4d
--- /dev/null
+++ 
b/tests/spec/glsl-1.50/compiler/interface-blocks-no-initializer-within-block.vert
@@ -0,0 +1,25 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Tests that an initializer is not allowed within a block.
+//
+// GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+// "Types and declarators are the same as for other input, output, and uniform
+//  variable declarations outside blocks, with these exceptions:
+//     • initializers are not allowed
+//     • sampler types are not allowed
+//     • structure definitions cannot be nested inside a block"
+
+#version 150
+
+out block {
+       vec4 a(1., 0., 0., 1.);
+} inst;
+
+void main()
+{
+       inst.a = vec4(0.);
+}
diff --git 
a/tests/spec/glsl-1.50/compiler/interface-blocks-no-sampler-type-within-block.vert
 
b/tests/spec/glsl-1.50/compiler/interface-blocks-no-sampler-type-within-block.vert
new file mode 100644
index 0000000..8055c72
--- /dev/null
+++ 
b/tests/spec/glsl-1.50/compiler/interface-blocks-no-sampler-type-within-block.vert
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Tests that an initializer is not allowed within a block.
+//
+// GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+// "Types and declarators are the same as for other input, output, and uniform
+//  variable declarations outside blocks, with these exceptions:
+//     • initializers are not allowed
+//     • sampler types are not allowed
+//     • structure definitions cannot be nested inside a block"
+
+#version 150
+
+out block {
+       sampler2DShadow a;
+} inst;
+
+void main()
+{
+}
-- 
1.8.3.1

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to