mesa: Mark Identity as const
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 7 Jan 2016 23:10:16 +0000 (15:10 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 11 Jan 2016 22:34:38 +0000 (14:34 -0800)
I was going to send this as review for dce1e1a8, but I missed that
window.  This saves 64 bytes of unshared data and prelaces it with 96
bytes shared text.  My guess is that some of the calls to memcpy get
optimized to something else.

   text    data     bss     dec     hex filename
7847613  220208   27432 8095253  7b8615 i965_dri.so before
7847709  220144   27432 8095285  7b8635 i965_dri.so after

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Brian Paul <brianp@vmware.com>
src/mesa/math/m_matrix.c

index b3cfcd26a148bd886e38695b07600cb5a9f03a1b..493d0e5cb275adc97c751c4089b33007d242857f 100644 (file)
@@ -131,7 +131,7 @@ static const char *types[] = {
 /**
  * Identity matrix.
  */
-static GLfloat Identity[16] = {
+static const GLfloat Identity[16] = {
    1.0, 0.0, 0.0, 0.0,
    0.0, 1.0, 0.0, 0.0,
    0.0, 0.0, 1.0, 0.0,