[Mesa-dev] [PATCH] Remove gallium draw_arrays() and draw_arrays_instanced() functions

Arnas Milasevicius giant1gf at gmail.com
Thu Jun 6 01:56:03 PDT 2013


Because draw_arrays() is only sued in state_tracker's st_draw_feedback.c file, I moved it from draw_pt.c to there and mate it static.
---
 v2: removed draw_arrays_instanced() function and modified draw_arrays()
 src/mesa/state_tracker/st_draw_feedback.c | 26 +++++++-------------------
 1 file changed, 7 insertions(+), 19 deletions(-)

diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c
index 56e3018..6bc0383 100644
--- a/src/mesa/state_tracker/st_draw_feedback.c
+++ b/src/mesa/state_tracker/st_draw_feedback.c
@@ -86,12 +86,12 @@ set_feedback_vertex_format(struct gl_context *ctx)
  * \sa draw_vbo
  */
 static void
-draw_arrays_instanced(struct draw_context *draw,
-                      unsigned mode,
-                      unsigned start,
-                      unsigned count,
-                      unsigned startInstance,
-                      unsigned instanceCount)
+draw_arrays(struct draw_context *draw,
+			unsigned mode,
+            unsigned start,
+			unsigned count,
+			unsigned startInstance,
+			unsigned instanceCount)
 {
    struct pipe_draw_info info;
 
@@ -110,18 +110,6 @@ draw_arrays_instanced(struct draw_context *draw,
 
 
 /**
- * Non-instanced drawing.
- * \sa draw_arrays_instanced
- */
-static void
-draw_arrays(struct draw_context *draw, unsigned prim,
-            unsigned start, unsigned count)
-{
-   draw_arrays_instanced(draw, prim, start, count, 0, 1);
-}
-
-
-/**
  * 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.
@@ -285,7 +273,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
 
    /* draw here */
    for (i = 0; i < nr_prims; i++) {
-      draw_arrays(draw, prims[i].mode, prims[i].start, prims[i].count);
+      draw_arrays(draw, prims[i].mode, prims[i].start, prims[i].count, 0, 1);
    }
 
 
-- 
1.8.3



More information about the mesa-dev mailing list