commit | 6f0089e92e9a3b096b978bb09a87db6a38acb7b2 | [log] [tgz] |
---|---|---|
author | Anuj Phogat <anuj.phogat@gmail.com> | Thu Sep 18 16:30:31 2014 -0700 |
committer | Anuj Phogat <anuj.phogat@gmail.com> | Wed Oct 22 16:13:37 2014 -0700 |
tree | 32e9cae1c76ec629753b54d898f2544460324c02 | |
parent | 8ec40adf7eaaf4a107ee76497d69d1479580f711 [diff] |
glsl: Fix crash due to negative array index Currently Mesa crashes with a shader like this: [fragmnet shader] float[5] array; int idx = -2; void main() { gl_FragColor = vec4(0.0, 1.0, 0.0, array[idx]); } Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>