Can't see any reason this wouldn't be better off as an inline.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
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,
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;
- }
-}
/**