diff options
author | Brian Paul <brianp@vmware.com> | 2009-05-06 10:54:34 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-05-07 10:12:33 -0600 |
commit | 7e3bd457e8cf106391f4418d910b8267b4b0de2c (patch) | |
tree | 40c6f9c25cbc6fab2eebdc536841528c0616a62c /src | |
parent | 3acdab82cba03ea2a0dfaa3d7d5d940f1e94a374 (diff) |
mesa: use _mesa_sizeof_type() in vbo split code
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/vbo/vbo_split_copy.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c index 44b748dad7..56a9fafac4 100644 --- a/src/mesa/vbo/vbo_split_copy.c +++ b/src/mesa/vbo/vbo_split_copy.c @@ -31,6 +31,7 @@ #include "main/glheader.h" #include "main/imports.h" +#include "main/image.h" #include "main/macros.h" #include "main/enums.h" #include "main/mtypes.h" @@ -101,24 +102,9 @@ struct copy_context { }; -static GLuint type_size( GLenum type ) -{ - switch(type) { - case GL_BYTE: return sizeof(GLbyte); - case GL_UNSIGNED_BYTE: return sizeof(GLubyte); - case GL_SHORT: return sizeof(GLshort); - case GL_UNSIGNED_SHORT: return sizeof(GLushort); - case GL_INT: return sizeof(GLint); - case GL_UNSIGNED_INT: return sizeof(GLuint); - case GL_FLOAT: return sizeof(GLfloat); - case GL_DOUBLE: return sizeof(GLdouble); - default: return 0; - } -} - static GLuint attr_size( const struct gl_client_array *array ) { - return array->Size * type_size(array->Type); + return array->Size * _mesa_sizeof_type(array->Type); } |