summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec_draw.c
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
commitbc4e0c486874ee8c6f2e616b91589a1da63164d8 (patch)
treea4932ee13a6a4a11e1b065a45f8e3caa91066701 /src/mesa/vbo/vbo_exec_draw.c
parent22e5d4a1ee02089258d1fc67dfe7fa02a1dfcf22 (diff)
vbo: Use a bitmask to track the active arrays in vbo_exec*.
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_exec_draw.c')
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 0d42618f246..8d1b2c08d27 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -214,6 +214,8 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
exec->vtx.attrsz[VERT_ATTRIB_GENERIC0] = exec->vtx.attrsz[0];
exec->vtx.attrptr[VERT_ATTRIB_GENERIC0] = exec->vtx.attrptr[0];
exec->vtx.attrsz[0] = 0;
+ exec->vtx.enabled &= (~BITFIELD64_BIT(VBO_ATTRIB_POS));
+ exec->vtx.enabled |= BITFIELD64_BIT(VBO_ATTRIB_GENERIC0);
}
break;
default: