[Mesa-dev] [PATCH 14/14] mesa: reorder gl_light_attrib

Dave Airlie airlied at gmail.com
Fri Mar 20 00:30:09 PDT 2015


From: Dave Airlie <airlied at redhat.com>

reduces from 2664->2656.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mesa/main/mtypes.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index e77c4f0..1b45494 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -847,16 +847,17 @@ struct gl_light_attrib
    struct gl_material Material;
 
    GLboolean Enabled;			/**< Lighting enabled flag */
+   GLboolean ColorMaterialEnabled;
+
    GLenum ShadeModel;			/**< GL_FLAT or GL_SMOOTH */
    GLenum ProvokingVertex;              /**< GL_EXT_provoking_vertex */
    GLenum ColorMaterialFace;		/**< GL_FRONT, BACK or FRONT_AND_BACK */
    GLenum ColorMaterialMode;		/**< GL_AMBIENT, GL_DIFFUSE, etc */
    GLbitfield _ColorMaterialBitmask;	/**< bitmask formed from Face and Mode */
-   GLboolean ColorMaterialEnabled;
-   GLenum ClampVertexColor;             /**< GL_TRUE, GL_FALSE, GL_FIXED_ONLY */
-   GLboolean _ClampVertexColor;
 
-   struct gl_light EnabledList;         /**< List sentinel */
+
+   GLboolean _ClampVertexColor;
+   GLenum ClampVertexColor;             /**< GL_TRUE, GL_FALSE, GL_FIXED_ONLY */
 
    /** 
     * Derived state for optimizations: 
@@ -864,6 +865,8 @@ struct gl_light_attrib
    /*@{*/
    GLboolean _NeedEyeCoords;		
    GLboolean _NeedVertices;		/**< Use fast shader? */
+   struct gl_light EnabledList;         /**< List sentinel */
+
    GLfloat _BaseColor[2][3];
    /*@}*/
 };
-- 
2.1.0



More information about the mesa-dev mailing list