Mesa (master): gallium/u_threaded: convert dividing by index_size to a bit shift
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 28 01:10:26 UTC 2020
Module: Mesa
Branch: master
Commit: f55ae2cdbe8eca6a28c9f1a2d8e1a637e9b61103
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f55ae2cdbe8eca6a28c9f1a2d8e1a637e9b61103
Author: Marek Olšák <marek.olsak at amd.com>
Date: Wed Feb 26 15:10:47 2020 -0500
gallium/u_threaded: convert dividing by index_size to a bit shift
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3990>
---
src/gallium/auxiliary/util/u_threaded_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
More information about the mesa-commit
mailing list