summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_save.h
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2016-05-22 14:10:19 +0200
committerMathias Fröhlich <[email protected]>2016-06-16 05:50:55 +0200
commit0e73d9454d626f4ac96be51733d3d3db4b77392c (patch)
tree08e171c55dc3a550b7d6e6ce7974bd073c7acae8 /src/mesa/vbo/vbo_save.h
parentbc4e0c486874ee8c6f2e616b91589a1da63164d8 (diff)
vbo: Use a bitmask to track the active arrays in vbo_save*.
The use of a bitmask makes functions iterating only active attributes less visible in profiles. v2: Use _mesa_bit_scan{,64} instead of open coding. v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_save.h')
-rw-r--r--src/mesa/vbo/vbo_save.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_save.h b/src/mesa/vbo/vbo_save.h
index 8032db8a9e0..2843b3c9b9c 100644
--- a/src/mesa/vbo/vbo_save.h
+++ b/src/mesa/vbo/vbo_save.h
@@ -61,6 +61,7 @@ struct vbo_save_copied_vtx {
* compiled using the fallback opcode mechanism provided by dlist.c.
*/
struct vbo_save_vertex_list {
+ GLbitfield64 enabled; /**< mask of enabled vbo arrays. */
GLubyte attrsz[VBO_ATTRIB_MAX];
GLenum attrtype[VBO_ATTRIB_MAX];
GLuint vertex_size; /**< size in GLfloats */
@@ -126,6 +127,7 @@ struct vbo_save_context {
struct gl_client_array arrays[VBO_ATTRIB_MAX];
const struct gl_client_array *inputs[VBO_ATTRIB_MAX];
+ GLbitfield64 enabled; /**< mask of enabled vbo arrays. */
GLubyte attrsz[VBO_ATTRIB_MAX]; /**< 1, 2, 3 or 4 */
GLenum attrtype[VBO_ATTRIB_MAX]; /**< GL_FLOAT, GL_INT, etc */
GLubyte active_sz[VBO_ATTRIB_MAX]; /**< 1, 2, 3 or 4 */