[Mesa-dev] [PATCH 03/15] program: Mark table const.

Matt Turner mattst88 at gmail.com
Mon Feb 29 23:34:37 UTC 2016


---
 src/mesa/program/prog_noise.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/program/prog_noise.c b/src/mesa/program/prog_noise.c
index ac920c2..e2e209e 100644
--- a/src/mesa/program/prog_noise.c
+++ b/src/mesa/program/prog_noise.c
@@ -188,7 +188,7 @@ grad4(int hash, float x, float y, float z, float t)
  * Details can be found where this table is used, in the 4D noise method.
  * TODO: This should not be required, backport it from Bill's GLSL code!
  */
-static unsigned char simplex[64][4] = {
+static const unsigned char simplex[64][4] = {
    {0, 1, 2, 3}, {0, 1, 3, 2}, {0, 0, 0, 0}, {0, 2, 3, 1},
    {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {1, 2, 3, 0},
    {0, 2, 1, 3}, {0, 0, 0, 0}, {0, 3, 1, 2}, {0, 3, 2, 1},
-- 
2.4.10



More information about the mesa-dev mailing list