[Mesa-dev] [PATCH 04/14] mesa: Repack single-byte fields in gl_renderbuffer.

Eric Anholt eric at anholt.net
Sun Apr 17 11:59:59 PDT 2011


Cuts 8 out of 120 bytes in the struct.
---
 src/mesa/main/mtypes.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 6ca7405..39fde0a 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2413,18 +2413,18 @@ struct gl_renderbuffer
    GLuint Width, Height;
    GLboolean Purgeable;   /**< Is the buffer purgeable under memory pressure? */
 
+   GLboolean AttachedAnytime; /**< TRUE if it was attached to a framebuffer */
+
+   GLubyte NumSamples;
+
    GLenum InternalFormat; /**< The user-specified format */
    GLenum _BaseFormat;    /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or
                                GL_STENCIL_INDEX. */
    gl_format Format;      /**< The actual renderbuffer memory format */
 
-   GLubyte NumSamples;
-
    GLenum DataType;      /**< Type of values passed to the Get/Put functions */
    GLvoid *Data;        /**< This may not be used by some kinds of RBs */
 
-   GLboolean AttachedAnytime; /**< TRUE if it was attached to a framebuffer */
-
    /* Used to wrap one renderbuffer around another: */
    struct gl_renderbuffer *Wrapped;
 
-- 
1.7.4.1



More information about the mesa-dev mailing list