glsl: Eliminate out-of-bounds writes to gl_TessLevel*

Danylo Piliaiev requested to merge GL/mesa:fix/lower-tess-levels-oob-access into main

Out-of-bounds writes could be eliminated per spec:

Section 5.11 (Out-of-Bounds Accesses) of the GLSL 4.60 spec says:

"In the subsections described above for array, vector, matrix and
 structure accesses, any out-of-bounds access produced undefined
 behavior.... Out-of-bounds writes may be discarded or overwrite
 other variables of the active program."

Fixes: 73a9a153

Fixes tcs-tes-levels-out-of-bounds-write.shader_test from piglit!373 (merged) on at least llvmpipe.

Merge request reports