aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_split_inplace.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-04-02 19:07:49 +0200
committerMarek Olšák <[email protected]>2017-04-22 22:51:15 +0200
commit070072ad43bb41624d271f10697ea21a776b1ec1 (patch)
tree2f88efd83530f8a71e4dec1634378020a8826565 /src/mesa/vbo/vbo_split_inplace.c
parente137b9eed9501858e2037719a94aafee35179249 (diff)
mesa: replace _mesa_index_buffer::type with index_size
This avoids repeated translations of the enum. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_split_inplace.c')
-rw-r--r--src/mesa/vbo/vbo_split_inplace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_split_inplace.c b/src/mesa/vbo/vbo_split_inplace.c
index 1430ac98960..9c5c288700f 100644
--- a/src/mesa/vbo/vbo_split_inplace.c
+++ b/src/mesa/vbo/vbo_split_inplace.c
@@ -75,7 +75,7 @@ static void flush_vertex( struct split_context *split )
ib.count = split->max_index - split->min_index + 1;
ib.ptr = (const void *)((const char *)ib.ptr +
- split->min_index * _mesa_sizeof_type(ib.type));
+ split->min_index * ib.index_size);
/* Rebase the primitives to save index buffer entries. */
for (i = 0; i < split->dstprim_nr; i++)
@@ -223,7 +223,7 @@ static void split_prims( struct split_context *split)
elts[j] = prim->start + j;
ib.count = count;
- ib.type = GL_UNSIGNED_INT;
+ ib.index_size = 4;
ib.obj = split->ctx->Shared->NullBufferObj;
ib.ptr = elts;