diff options
author | Paul Berry <[email protected]> | 2013-07-31 11:25:13 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-08-01 20:19:39 -0700 |
commit | cea946e39d62b95139b2d16520bf7b9b509d5fbc (patch) | |
tree | c2a66ce2ed1f77f2e9044b0d61c5acbf411a63ea /src/glsl/ir_variable_refcount.h | |
parent | 1c789d8087327203d3dcf5c140bf9d9c65b86086 (diff) |
glsl: In ir_set_program_inouts, handle indexing outside array/matrix bounds.
According to GLSL, indexing into an array or matrix with an
out-of-range constant results in a compile error. However, indexing
with an out-of-range value that isn't constant merely results in
undefined results.
Since optimization passes (e.g. loop unrolling) can convert
non-constant array indices into constant array indices, it's possible
that ir_set_program_inouts will encounter a constant array index that
is out of range; if this happens, just mark the whole array as used.
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/ir_variable_refcount.h')
0 files changed, 0 insertions, 0 deletions