glsl: Don't emit spurious errors for constant indexes of the wrong type
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 15 Mar 2013 22:14:18 +0000 (15:14 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 8 Apr 2013 22:17:05 +0000 (15:17 -0700)
commita131b87706a6e59be35997d24b2236130aa09689
treee8f95a8e8d28ec9863a798f8d7a50ee5b08274ac
parenta70d2f05dc972bbc4a685e65a6ffa8a092b68b4c
glsl: Don't emit spurious errors for constant indexes of the wrong type

Previously the shader

uniform float x[6];
void main() { gl_Position.x = x[1.0]; }

would have generated the errors

0:2(33): error: array index must be integer type
0:2(36): error: array index must be < 6

Now only

0:2(33): error: array index must be integer type

will be generated.

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