Track max accessed array element, reject additional out-of-bounds accesses
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 2 Apr 2010 01:31:11 +0000 (18:31 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 2 Apr 2010 01:35:08 +0000 (18:35 -0700)
commitb8a21cc6df7e9da15a24ed3dbf60cd4aeb8effaa
tree35093f0e280535046c4784b24b2c7f73b271fea2
parent27e3cf8c0d8812f9be55ca6ceb52cf8232742d99
Track max accessed array element, reject additional out-of-bounds accesses

For unsized arrays, we can't flag out-of-bounds accesses until the
array is redeclared with a size.  Track the maximum accessed element
and generate an error if the declaration specifies a size that would
cause that access to be out-of-bounds.

This causes the following tests to pass:

    glslparsertest/shaders/array10.frag
ast_to_hir.cpp
ir.cpp
ir.h