From 875b9b3eaebc54bdaf278a964180ac459c195e5c Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Wed, 24 Jul 2013 14:12:44 -0700 Subject: 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 --- .../interface-blocks-name-reused-globally.vert | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/spec/glsl-1.50/compiler/interface-blocks-name-reused-globally.vert (limited to 'tests/spec') 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() +{ +} + -- cgit v1.2.3