diff options
author | Marek Olšák <[email protected]> | 2017-04-02 19:07:49 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-04-22 22:51:15 +0200 |
commit | 070072ad43bb41624d271f10697ea21a776b1ec1 (patch) | |
tree | 2f88efd83530f8a71e4dec1634378020a8826565 /src/mesa/vbo/vbo_rebase.c | |
parent | e137b9eed9501858e2037719a94aafee35179249 (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_rebase.c')
-rw-r--r-- | src/mesa/vbo/vbo_rebase.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/vbo/vbo_rebase.c b/src/mesa/vbo/vbo_rebase.c index f40c59fdf35..9f5dc4678f8 100644 --- a/src/mesa/vbo/vbo_rebase.c +++ b/src/mesa/vbo/vbo_rebase.c @@ -182,14 +182,14 @@ void vbo_rebase_prims( struct gl_context *ctx, /* Some users might prefer it if we translated elements to * GLuints here. Others wouldn't... */ - switch (ib->type) { - case GL_UNSIGNED_INT: + switch (ib->index_size) { + case 4: tmp_indices = rebase_GLuint( ptr, ib->count, min_index ); break; - case GL_UNSIGNED_SHORT: + case 2: tmp_indices = rebase_GLushort( ptr, ib->count, min_index ); break; - case GL_UNSIGNED_BYTE: + case 1: tmp_indices = rebase_GLubyte( ptr, ib->count, min_index ); break; } @@ -204,7 +204,7 @@ void vbo_rebase_prims( struct gl_context *ctx, tmp_ib.obj = ctx->Shared->NullBufferObj; tmp_ib.ptr = tmp_indices; tmp_ib.count = ib->count; - tmp_ib.type = ib->type; + tmp_ib.index_size = ib->index_size; ib = &tmp_ib; } |