wined3d: Use wined3d_bit_scan() in context_unload_numbered_arrays().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2018-04-19 15:50:14 +04:30 committed by Alexandre Julliard
parent 8dc789fe3b
commit e93e943ba4
1 changed files with 2 additions and 4 deletions

View File

@ -5273,15 +5273,13 @@ static void context_unload_numbered_array(struct wined3d_context *context, unsig
context->numbered_array_mask &= ~(1u << i);
}
/* This should match any arrays loaded in loadNumberedArrays.
* TODO: Only load / unload arrays if we have to. */
static void context_unload_numbered_arrays(struct wined3d_context *context)
{
unsigned int i;
/* Disable any attributes. */
for (i = 0; i < context->gl_info->limits.vertex_attribs; ++i)
while (context->numbered_array_mask)
{
i = wined3d_bit_scan(&context->numbered_array_mask);
context_unload_numbered_array(context, i);
}
}