mesa: Prevent negative indexing on noise2, noise3 and noise4
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Wed, 2 Apr 2014 13:13:57 +0000 (16:13 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Wed, 2 Apr 2014 16:54:37 +0000 (19:54 +0300)
commit68a45b130e12d5a1d6c7dca20a930b9433ec1992
tree46bf02818bbb89ec6fc7c7dcaa8f0f11bb67ac8d
parent1056c50d574eebaf5a1769f52d95b022aaf27c80
mesa: Prevent negative indexing on noise2, noise3 and noise4

% operator could return negative value which would cause
indexing before perm table. Change %256 to &0xff

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/program/prog_noise.c