diff options
author | Marek Olšák <[email protected]> | 2020-02-26 15:10:47 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-28 00:53:45 +0000 |
commit | f55ae2cdbe8eca6a28c9f1a2d8e1a637e9b61103 (patch) | |
tree | 4f966dc74dc85083be0c2090cc7cbe7bfc23d285 | |
parent | 28d75fc286fd761cf1de98aa9c57dd4263d5321a (diff) |
gallium/u_threaded: convert dividing by index_size to a bit shift
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
-rw-r--r-- | src/gallium/auxiliary/util/u_threaded_context.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |