From ed2dae86aef759a6858f56d77eba77895bec5020 Mon Sep 17 00:00:00 2001 From: Mathias Fröhlich Date: Thu, 9 Jun 2016 06:35:34 +0200 Subject: mesa: Make use of u_bit_scan{,64}. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Paul Tested-by: Brian Paul Signed-off-by: Mathias Fröhlich --- src/mesa/main/arrayobj.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa/main/arrayobj.c') diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c index 897dac6e5db..9c3451ec203 100644 --- a/src/mesa/main/arrayobj.c +++ b/src/mesa/main/arrayobj.c @@ -52,6 +52,7 @@ #include "mtypes.h" #include "varray.h" #include "main/dispatch.h" +#include "util/bitscan.h" /** @@ -342,13 +343,12 @@ _mesa_update_vao_client_arrays(struct gl_context *ctx, GLbitfield64 arrays = vao->NewArrays; while (arrays) { + const int attrib = u_bit_scan64(&arrays); + struct gl_client_array *client_array; struct gl_vertex_attrib_array *attrib_array; struct gl_vertex_buffer_binding *buffer_binding; - GLint attrib = ffsll(arrays) - 1; - arrays ^= BITFIELD64_BIT(attrib); - attrib_array = &vao->VertexAttrib[attrib]; buffer_binding = &vao->VertexBinding[attrib_array->VertexBinding]; client_array = &vao->_VertexAttrib[attrib]; -- cgit v1.2.3