diff options
author | marha <marha@users.sourceforge.net> | 2012-02-29 13:47:34 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-02-29 13:47:34 +0100 |
commit | c14f2432d6bfb3de6c6289efd0471f038a289327 (patch) | |
tree | 8864ad1e5d0ae65dd665aa45245f2dab86c3f178 /mesalib/src/mesa/vbo/vbo.h | |
parent | 8475e285d0146b123f0ac1a87294c42088af12b0 (diff) | |
parent | 15a500d3edb03668b43cc6898fafcda024d0f006 (diff) | |
download | vcxsrv-c14f2432d6bfb3de6c6289efd0471f038a289327.tar.gz vcxsrv-c14f2432d6bfb3de6c6289efd0471f038a289327.tar.bz2 vcxsrv-c14f2432d6bfb3de6c6289efd0471f038a289327.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/vbo/vbo.h')
-rw-r--r-- | mesalib/src/mesa/vbo/vbo.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mesalib/src/mesa/vbo/vbo.h b/mesalib/src/mesa/vbo/vbo.h index bf925ab16..2d01d9823 100644 --- a/mesalib/src/mesa/vbo/vbo.h +++ b/mesalib/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, |