[Mesa-dev] [PATCH 3/3] mesa/mtypes: repack display list structs.

Thomas Helland thomashelland90 at gmail.com
Sun Sep 3 11:15:40 UTC 2017


It's also possible to use "pragma pack" but I believe
reordering should be preferred when possible due to
overhead of unaligned access, if memory serves me right.

All of the reordering patches in main/mtypes has my:

Reviewed-by: Thomas Helland<thomashelland90 at gmail.com>

2017-09-03 13:06 GMT+02:00 Dave Airlie <airlied at gmail.com>:
> From: Dave Airlie <airlied at redhat.com>
>
> This reduces each of these by 8 bytes.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/mesa/main/mtypes.h | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index a72a3b2..34da6b9 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -4342,8 +4342,8 @@ union gl_dlist_node;
>  struct gl_display_list
>  {
>     GLuint Name;
> -   GLchar *Label;     /**< GL_KHR_debug */
>     GLbitfield Flags;  /**< DLIST_x flags */
> +   GLchar *Label;     /**< GL_KHR_debug */
>     /** The dlist commands are in a linked list of nodes */
>     union gl_dlist_node *Head;
>  };
> @@ -4354,11 +4354,10 @@ struct gl_display_list
>   */
>  struct gl_dlist_state
>  {
> -   GLuint CallDepth;           /**< Current recursion calling depth */
> -
>     struct gl_display_list *CurrentList; /**< List currently being compiled */
>     union gl_dlist_node *CurrentBlock; /**< Pointer to current block of nodes */
>     GLuint CurrentPos;          /**< Index into current block of nodes */
> +   GLuint CallDepth;           /**< Current recursion calling depth */
>
>     GLvertexformat ListVtxfmt;
>
> --
> 2.9.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list