[Mesa-dev] [PATCH 31/31] vbo: Use a bitmask to track the active arrays in vbo_save*.
Matt Turner
mattst88 at gmail.com
Tue Jun 7 06:27:53 UTC 2016
On Mon, Jun 6, 2016 at 10:31 PM, <Mathias.Froehlich at gmx.net> wrote:
> From: Mathias Fröhlich <mathias.froehlich at web.de>
>
> 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.
>
> Reviewed-by: Brian Paul <brianp at vmware.com>
> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich at web.de>
> ---
> src/mesa/vbo/vbo_save.h | 2 ++
> src/mesa/vbo/vbo_save_api.c | 66 +++++++++++++++++++++++++-------------------
> src/mesa/vbo/vbo_save_draw.c | 54 +++++++++++++++++++-----------------
> 3 files changed, 67 insertions(+), 55 deletions(-)
>
> diff --git a/src/mesa/vbo/vbo_save.h b/src/mesa/vbo/vbo_save.h
> index 8032db8..e3b86bc 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. */
Space before the comment.
> 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. */
Space before the comment.
Given that this is the first patch I looked at and this occurred
twice, please give the rest of the patches a review for this.
More information about the mesa-dev
mailing list