summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_primitive_restart.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_primitive_restart.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_primitive_restart.c')
-rw-r--r--src/mesa/vbo/vbo_primitive_restart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_primitive_restart.c b/src/mesa/vbo/vbo_primitive_restart.c
index 0662c5cd4ef..8f04def377c 100644
--- a/src/mesa/vbo/vbo_primitive_restart.c
+++ b/src/mesa/vbo/vbo_primitive_restart.c
@@ -175,7 +175,7 @@ vbo_sw_primitive_restart(struct gl_context *ctx,
GLuint sub_prim_num;
GLuint end_index;
GLuint sub_end_index;
- GLuint restart_index = _mesa_primitive_restart_index(ctx, ib->type);
+ GLuint restart_index = _mesa_primitive_restart_index(ctx, ib->index_size);
struct _mesa_prim temp_prim;
struct vbo_context *vbo = vbo_context(ctx);
vbo_draw_func draw_prims_func = vbo->draw_prims;
@@ -226,7 +226,7 @@ vbo_sw_primitive_restart(struct gl_context *ctx,
ptr = ADD_POINTERS(ib->obj->Mappings[MAP_INTERNAL].Pointer, ib->ptr);
- sub_prims = find_sub_primitives(ptr, vbo_sizeof_ib_type(ib->type),
+ sub_prims = find_sub_primitives(ptr, ib->index_size,
0, ib->count, restart_index,
&num_sub_prims);