mesa: treat Color._AdvancedBlendMode as enum
[mesa.git] / src / mesa / tnl / tnl.h
index 4b6d5ec3919291447145ca586f2a611a2ca99004..58503016a9b3a0d5438b959b5db3f5750fd53471 100644 (file)
@@ -30,7 +30,6 @@
 
 #include "main/glheader.h"
 
-struct gl_vertex_array;
 struct gl_context;
 struct gl_program;
 struct gl_buffer_object;
@@ -66,7 +65,22 @@ _tnl_wakeup( struct gl_context *ctx );
 extern void
 _tnl_need_projected_coords( struct gl_context *ctx, GLboolean flag );
 
-extern const struct gl_vertex_array*
+
+/**
+ * Vertex array information which is derived from gl_array_attributes
+ * and gl_vertex_buffer_binding information.  Used by the TNL module and
+ * device drivers.
+ */
+struct tnl_vertex_array
+{
+   /** Vertex attribute array */
+   const struct gl_array_attributes *VertexAttrib;
+   /** Vertex buffer binding */
+   const struct gl_vertex_buffer_binding *BufferBinding;
+};
+
+
+extern const struct tnl_vertex_array*
 _tnl_bind_inputs( struct gl_context *ctx );
 
 
@@ -86,24 +100,23 @@ struct _mesa_index_buffer;
 
 void
 _tnl_draw_prims(struct gl_context *ctx,
-                const struct gl_vertex_array *arrays,
+                const struct tnl_vertex_array *arrays,
                     const struct _mesa_prim *prim,
                     GLuint nr_prims,
                     const struct _mesa_index_buffer *ib,
                     GLboolean index_bounds_valid,
                     GLuint min_index,
                     GLuint max_index,
-                    struct gl_transform_feedback_object *tfb_vertcount,
-                     unsigned stream,
-                    struct gl_buffer_object *indirect );
+                     GLuint num_instances,
+                     GLuint base_instance);
 
 void
 _tnl_draw(struct gl_context *ctx,
           const struct _mesa_prim *prim, GLuint nr_prims,
           const struct _mesa_index_buffer *ib,
           GLboolean index_bounds_valid, GLuint min_index, GLuint max_index,
-          struct gl_transform_feedback_object *tfb_vertcount, unsigned stream,
-          struct gl_buffer_object *indirect);
+          GLuint num_instances, GLuint base_instance,
+          struct gl_transform_feedback_object *tfb_vertcount, unsigned stream);
 
 extern void
 _tnl_RasterPos(struct gl_context *ctx, const GLfloat vObj[4]);
@@ -153,16 +166,15 @@ _tnl_validate_shine_tables( struct gl_context *ctx );
  *                  This may be deprecated in the future
  */
 typedef void (*tnl_draw_func)(struct gl_context *ctx,
-                              const struct gl_vertex_array* arrays,
+                              const struct tnl_vertex_array* arrays,
                               const struct _mesa_prim *prims,
                               GLuint nr_prims,
                               const struct _mesa_index_buffer *ib,
                               GLboolean index_bounds_valid,
                               GLuint min_index,
                               GLuint max_index,
-                              struct gl_transform_feedback_object *tfb_vertcount,
-                              unsigned tfb_stream,
-                              struct gl_buffer_object *indirect);
+                              GLuint num_instances,
+                              GLuint base_instance);
 
 
 /* Utility function to cope with various constraints on tnl modules or
@@ -181,12 +193,14 @@ struct split_limits
 
 void
 _tnl_split_prims(struct gl_context *ctx,
-                 const struct gl_vertex_array *arrays,
+                 const struct tnl_vertex_array *arrays,
                  const struct _mesa_prim *prim,
                  GLuint nr_prims,
                  const struct _mesa_index_buffer *ib,
                  GLuint min_index,
                  GLuint max_index,
+                 GLuint num_instances,
+                 GLuint base_instance,
                  tnl_draw_func draw,
                  const struct split_limits *limits);