summaryrefslogtreecommitdiff
path: root/tests/spec
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2013-07-24 14:12:44 -0700
committerMatt Turner <mattst88@gmail.com>2013-07-29 10:53:33 -0700
commit875b9b3eaebc54bdaf278a964180ac459c195e5c (patch)
tree75c03a4fb81717a9daddaf88d53626e875019f0c /tests/spec
parent118ebd283655604bd45ea6002032cce08034ca35 (diff)
glsl-1.50: test for interface block global name reuse error
Placing the use of the block name before the block declaration currently compiles with Mesa, which is a bug. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'tests/spec')
-rw-r--r--tests/spec/glsl-1.50/compiler/interface-blocks-name-reused-globally.vert26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.50/compiler/interface-blocks-name-reused-globally.vert b/tests/spec/glsl-1.50/compiler/interface-blocks-name-reused-globally.vert
new file mode 100644
index 000000000..8f20695aa
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/interface-blocks-name-reused-globally.vert
@@ -0,0 +1,26 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:
+// "Block names have no other use within a shader beyond interface matching;
+// it is an error to use a block name at global scope for anything other than
+// as a block name."
+//
+// Tests that an interface block name may not be reused globally as anything
+// other than as a block name.
+
+#version 150
+
+vec4 block;
+
+out block {
+ vec4 a;
+} inst;
+
+void main()
+{
+}
+