nir: fix out-of-bounds condition in loop unrolling

Pierre-Eric Pelloux-Prayer requested to merge pepp/mesa:nir_fix_2689 into master

Out-of-bounds will happen if trip_count is strictly bigger than the size of the array. If they are equal it'll be fine.

For issue 2689, trip_count and glsl_get_length() are 16.

Closes: #2689 (closed) Fixes: e8a8937a ("nir: add partial loop unrolling support")

Merge request reports