[Mesa-dev] [PATCH] mesa: Mark Identity as const

Ilia Mirkin imirkin at alum.mit.edu
Thu Jan 7 15:19:09 PST 2016


On Thu, Jan 7, 2016 at 6:16 PM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> 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

replaces

> 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 at intel.com>
> Cc: Brian Paul <brianp at vmware.com>

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

> ---
>  src/mesa/math/m_matrix.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/math/m_matrix.c b/src/mesa/math/m_matrix.c
> index b3cfcd2..493d0e5 100644
> --- a/src/mesa/math/m_matrix.c
> +++ b/src/mesa/math/m_matrix.c
> @@ -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,
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list