gallivm: Add a lp_build_const_func_pointer() helper.
[mesa.git] / src / mesa / vbo / vbo.h
index ed8fc1722aea5f72fca989dca888cffba044b8c3..2d01d9823ccbd69b0457f45cbc85843bdc021585 100644 (file)
@@ -123,13 +123,27 @@ 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_index(struct gl_context *ctx, const struct _mesa_prim *prim,
-                    const struct _mesa_index_buffer *ib,
-                    GLuint *min_index, GLuint *max_index);
+vbo_get_minmax_indices(struct gl_context *ctx, const struct _mesa_prim *prim,
+                       const struct _mesa_index_buffer *ib,
+                       GLuint *min_index, GLuint *max_index, GLuint nr_prims);
 
 void vbo_use_buffer_objects(struct gl_context *ctx);