[Mesa-dev] [PATCH 10/10] mesa: Remove unneeded bitfield widths from the VAO.

Mathias.Froehlich at gmx.net Mathias.Froehlich at gmx.net
Sat Nov 17 12:14:58 UTC 2018


From: Mathias Fröhlich <mathias.froehlich at web.de>

With the current VAO layout we do not need to make these
fields a bitfield. We get a tight struct layout with this change
for VAO attributes.

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich at web.de>
---
 src/mesa/main/mtypes.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 421b078337..e3e16de9d0 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1439,7 +1439,7 @@ struct gl_array_attributes
    /** Stride as specified with gl*Pointer() */
    GLshort Stride;
    /** Index into gl_vertex_array_object::BufferBinding[] array */
-   unsigned BufferBindingIndex:6;
+   unsigned char BufferBindingIndex;
 
    /**
     * Derived effective buffer binding index
@@ -1454,7 +1454,7 @@ struct gl_array_attributes
     * Note that _mesa_update_vao_derived_arrays is called when binding
     * the VAO to Array._DrawVAO.
     */
-   unsigned _EffBufferBindingIndex:6;
+   unsigned char _EffBufferBindingIndex;
    /**
     * Derived effective relative offset.
     *
-- 
2.17.2



More information about the mesa-dev mailing list