glsl: fix crashes on out of bound matrix access using constant index
authorMarcin Ślusarz <marcin.slusarz@intel.com>
Mon, 11 May 2020 21:26:40 +0000 (23:26 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 18 Aug 2020 11:34:54 +0000 (11:34 +0000)
commit16f1d8b3910496e04faba22f5d7b0ba84c07e6ad
tree1f2d1bc9e211c28b7932c952e90855e803fc7191
parent7dcb1d272fa29d2003ccbae180aba5dee52921e8
glsl: fix crashes on out of bound matrix access using constant index

Fixes these piglit tests:
- spec@glsl-1.20@execution@matrix-out-of-bounds-access@fs-mat4-out-of-bounds-2
- spec@glsl-1.20@execution@matrix-out-of-bounds-access@fs-mat4-out-of-bounds-4
- spec@glsl-1.20@execution@matrix-out-of-bounds-access@fs-mat4-out-of-bounds-5

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4998>
.gitlab-ci/piglit/quick_shader.txt
src/compiler/glsl/ir_constant_expression.cpp