aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-02-13 15:29:22 -0500
committerMarek Olšák <[email protected]>2020-03-04 19:54:42 -0500
commite92a4f817d1f7a5094066e2a47a246fd5ccf94d6 (patch)
tree75136b9e37577a469d885f7283ccbd62f041be03 /src/mesa/vbo
parent87085c673d593e6332ca2f3fb6737b77f7087f66 (diff)
mesa: replace some index_size multiplications and divisions with shifts
Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4052>
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_minmax_index.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_minmax_index.c b/src/mesa/vbo/vbo_minmax_index.c
index d1298dcdc3a..8cb5f3c0aeb 100644
--- a/src/mesa/vbo/vbo_minmax_index.c
+++ b/src/mesa/vbo/vbo_minmax_index.c
@@ -247,9 +247,9 @@ vbo_get_minmax_index(struct gl_context *ctx,
GLuint i;
GLintptr offset = 0;
- indices = (char *) ib->ptr + prim->start * ib->index_size;
+ indices = (char *) ib->ptr + (prim->start << ib->index_size_shift);
if (_mesa_is_bufferobj(ib->obj)) {
- GLsizeiptr size = MIN2(count * ib->index_size, ib->obj->Size);
+ GLsizeiptr size = MIN2(count << ib->index_size_shift, ib->obj->Size);
if (vbo_get_minmax_cached(ib->obj, ib->index_size, (GLintptr) indices,
count, min_index, max_index))