intel: Transition intel_region_map() to being a miptree operation.
[mesa.git] / src / mesa / vbo / vbo.h
index bf925ab16f3991b51697391c29b08796982b1da5..49dab23144a67ffc8073e8265aa542322ffc1d4e 100644 (file)
@@ -50,7 +50,8 @@ struct _mesa_prim {
    GLuint start;
    GLuint count;
    GLint basevertex;
-   GLsizei num_instances;
+   GLuint num_instances;
+   GLuint base_instance;
 };
 
 /* Would like to call this a "vbo_index_buffer", but this would be
@@ -72,7 +73,6 @@ void _vbo_InvalidateState( struct gl_context *ctx, GLuint new_state );
 
 
 typedef void (*vbo_draw_func)( struct gl_context *ctx,
-                              const struct gl_client_array **arrays,
                               const struct _mesa_prim *prims,
                               GLuint nr_prims,
                               const struct _mesa_index_buffer *ib,
@@ -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,
@@ -142,7 +156,14 @@ void vbo_check_buffers_are_unmapped(struct gl_context *ctx);
 void vbo_bind_arrays(struct gl_context *ctx);
 
 size_t
-count_tessellated_primitives(const struct _mesa_prim *prim);
+vbo_count_tessellated_primitives(GLenum mode, GLuint count,
+                                 GLuint num_instances);
+
+void
+vbo_sw_primitive_restart(struct gl_context *ctx,
+                         const struct _mesa_prim *prim,
+                         GLuint nr_prims,
+                         const struct _mesa_index_buffer *ib);
 
 void GLAPIENTRY
 _es_Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a);