ir_constant: Don't assert on out-of-bounds array accesses
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 17 Aug 2010 19:57:28 +0000 (12:57 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 17 Aug 2010 20:00:03 +0000 (13:00 -0700)
commit664364052f362af2789e6b0fa88b6a5ba66ba936
tree3439eafb015486f929730450d75b02d5fa51e333
parent1b708d8f4dd1a853de8537e81e6d5bf8c9f2aed1
ir_constant: Don't assert on out-of-bounds array accesses

Several optimization paths, including constant folding, can lead to
accessing an ir_constant array with an out of bounds index.  The GLSL
spec lets us produce "undefined" results, but it does not let us
crash.

Fixes piglit test case glsl-array-bounds-01 and glsl-array-bounds-03.
src/glsl/ir.cpp