Moved draw_arrays() to st_draw_feedback.c and removed draw_arrays_instanced().
draw_arrays() was used by nobody else. Now there's just one "draw" entrypoint
into the draw module.
Signed-off-by: Brian Paul <brianp@vmware.com>
void draw_vbo(struct draw_context *draw,
const struct pipe_draw_info *info);
-void draw_arrays(struct draw_context *draw, unsigned prim,
- unsigned start, unsigned count);
-
-void
-draw_arrays_instanced(struct draw_context *draw,
- unsigned mode,
- unsigned start,
- unsigned count,
- unsigned startInstance,
- unsigned instanceCount);
-
/*******************************************************************************
* Driver backend interface
}
-
-/**
- * Non-instanced drawing.
- * \sa draw_arrays_instanced
- */
-void
-draw_arrays(struct draw_context *draw, unsigned prim,
- unsigned start, unsigned count)
-{
- draw_arrays_instanced(draw, prim, start, count, 0, 1);
-}
-
-
-/**
- * Instanced drawing.
- * \sa draw_vbo
- */
-void
-draw_arrays_instanced(struct draw_context *draw,
- unsigned mode,
- unsigned start,
- unsigned count,
- unsigned startInstance,
- unsigned instanceCount)
-{
- struct pipe_draw_info info;
-
- util_draw_init_info(&info);
-
- info.mode = mode;
- info.start = start;
- info.count = count;
- info.start_instance = startInstance;
- info.instance_count = instanceCount;
- info.min_index = start;
- info.max_index = start + count - 1;
-
- draw_vbo(draw, &info);
-}
-
/**
* Resolve true values within pipe_draw_info.
* If we're rendering from transform feedback/stream output
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "util/u_inlines.h"
+#include "util/u_draw.h"
#include "draw/draw_private.h"
#include "draw/draw_context.h"
/**
+ * Helper for drawing current vertex arrays.
+ */
+static void
+draw_arrays(struct draw_context *draw, unsigned mode,
+ unsigned start, unsigned count)
+{
+ struct pipe_draw_info info;
+
+ util_draw_init_info(&info);
+
+ info.mode = mode;
+ info.start = start;
+ info.count = count;
+ info.min_index = start;
+ info.max_index = start + count - 1;
+
+ draw_vbo(draw, &info);
+}
+
+
+/**
* Called by VBO to draw arrays when in selection or feedback mode and
* to implement glRasterPos.
* This is very much like the normal draw_vbo() function above.