From: Marek Olšák Date: Wed, 26 Feb 2020 20:10:47 +0000 (-0500) Subject: gallium/u_threaded: convert dividing by index_size to a bit shift X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f55ae2cdbe8eca6a28c9f1a2d8e1a637e9b61103;p=mesa.git gallium/u_threaded: convert dividing by index_size to a bit shift Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index c1f74e70e32..30790949336 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -2110,7 +2110,7 @@ tc_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info) memcpy(&p->draw, info, sizeof(*info)); p->draw.has_user_indices = false; p->draw.index.resource = buffer; - p->draw.start = offset / index_size; + p->draw.start = offset >> util_logbase2(index_size); } else { /* Non-indexed call or indexed with a real index buffer. */ struct tc_full_draw_info *p = tc_add_draw_vbo(_pipe, indirect != NULL);