diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/vbo/vbo.h | 18 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_exec_array.c | 16 |
2 files changed, 16 insertions, 18 deletions
diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h index bf925ab16f3..2d01d9823cc 100644 --- a/src/mesa/vbo/vbo.h +++ b/src/mesa/vbo/vbo.h @@ -123,8 +123,22 @@ void vbo_rebase_prims( struct gl_context *ctx, GLuint max_index, vbo_draw_func draw ); -int -vbo_sizeof_ib_type(GLenum type); +static inline int +vbo_sizeof_ib_type(GLenum type) +{ + switch (type) { + case GL_UNSIGNED_INT: + return sizeof(GLuint); + case GL_UNSIGNED_SHORT: + return sizeof(GLushort); + case GL_UNSIGNED_BYTE: + return sizeof(GLubyte); + default: + assert(!"unsupported index data type"); + /* In case assert is turned off */ + return 0; + } +} void vbo_get_minmax_indices(struct gl_context *ctx, const struct _mesa_prim *prim, diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 06e36a677eb..b0a4261e764 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -75,22 +75,6 @@ vbo_check_buffers_are_unmapped(struct gl_context *ctx) assert(!_mesa_bufferobj_mapped(exec->vtx.bufferobj)); } -int -vbo_sizeof_ib_type(GLenum type) -{ - switch (type) { - case GL_UNSIGNED_INT: - return sizeof(GLuint); - case GL_UNSIGNED_SHORT: - return sizeof(GLushort); - case GL_UNSIGNED_BYTE: - return sizeof(GLubyte); - default: - assert(!"unsupported index data type"); - /* In case assert is turned off */ - return 0; - } -} /** |