summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorArnas Milasevicius <[email protected]>2013-06-07 01:21:19 +0300
committerBrian Paul <[email protected]>2013-06-07 09:29:29 -0600
commit3069357ef0cfa112c3c77a25c010df7f9af4467d (patch)
treecf6c235e13ed489ab8dc814414fd8071cb8c1aca /src/mesa/state_tracker
parent14541dacab218cbe82310d999d44130ebc3f6526 (diff)
gallium: Remove draw_arrays() and draw_arrays_instanced() functions
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 <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_draw_feedback.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c
index b19d913e5d5..1ac9585e7d5 100644
--- a/src/mesa/state_tracker/st_draw_feedback.c
+++ b/src/mesa/state_tracker/st_draw_feedback.c
@@ -40,6 +40,7 @@
#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"
@@ -81,6 +82,27 @@ set_feedback_vertex_format(struct gl_context *ctx)
/**
+ * 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.