glsl: Clean-up spurious error message on bad structure definitions
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 26 Oct 2011 00:49:07 +0000 (17:49 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 28 Oct 2011 20:28:55 +0000 (13:28 -0700)
commitf5ba4d055ee27bfd741ad019e3b3d4b1a1ce9bd9
tree5fd5a9817d772c4bdabafb774cef9b1b15efa8d3
parenta04211ecb8c907eaef69832abc2e16cd6f9887a0
glsl: Clean-up spurious error message on bad structure definitions

Previously a shader like

int X;
struct X { int i; };

void main() { gl_Position = vec4(0.0); }

would generate two error message:

0:2(19): error: struct `X' previously defined
0:2(20): error: incomplete declaration

The first one is the real error, and the second is spurious.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/ast_to_hir.cpp