gallium: Keep only pipe_context::draw_vbo.
[mesa.git] / src / gallium / drivers / softpipe / sp_draw_arrays.c
index 2855f55a0e160828244baf4db68836246d7848c8..3a33cdef962bfcd2c09c32add0c61a6029d65df4 100644 (file)
@@ -35,7 +35,6 @@
 #include "pipe/p_context.h"
 #include "util/u_inlines.h"
 #include "util/u_prim.h"
-#include "util/u_draw_quad.h"
 
 #include "sp_context.h"
 #include "sp_query.h"
@@ -173,152 +172,3 @@ softpipe_draw_vbo(struct pipe_context *pipe,
    /* Note: leave drawing surfaces mapped */
    sp->dirty_render_cache = TRUE;
 }
-
-static void
-softpipe_draw_range_elements_instanced(struct pipe_context *pipe,
-                                       struct pipe_resource *indexBuffer,
-                                       unsigned indexSize,
-                                       int indexBias,
-                                       unsigned minIndex,
-                                       unsigned maxIndex,
-                                       unsigned mode,
-                                       unsigned start,
-                                       unsigned count,
-                                       unsigned startInstance,
-                                       unsigned instanceCount)
-{
-   struct softpipe_context *sp = softpipe_context(pipe);
-   struct pipe_draw_info info;
-   struct pipe_index_buffer saved_ib, ib;
-
-   util_draw_init_info(&info);
-   info.mode = mode;
-   info.start = start;
-   info.count = count;
-   info.start_instance = startInstance;
-   info.instance_count = instanceCount;
-   info.index_bias = indexBias;
-   info.min_index = minIndex;
-   info.max_index = maxIndex;
-
-   if (indexBuffer) {
-      info.indexed = TRUE;
-
-      saved_ib = sp->index_buffer;
-      ib.buffer = indexBuffer;
-      ib.offset = 0;
-      ib.index_size = indexSize;
-      pipe->set_index_buffer(pipe, &ib);
-   }
-
-   softpipe_draw_vbo(pipe, &info);
-
-   if (indexBuffer)
-      pipe->set_index_buffer(pipe, &saved_ib);
-}
-
-
-void
-softpipe_draw_range_elements(struct pipe_context *pipe,
-                             struct pipe_resource *indexBuffer,
-                             unsigned indexSize,
-                             int indexBias,
-                             unsigned min_index,
-                             unsigned max_index,
-                             unsigned mode, unsigned start, unsigned count)
-{
-   softpipe_draw_range_elements_instanced(pipe,
-                                          indexBuffer,
-                                          indexSize,
-                                          indexBias,
-                                          min_index,
-                                          max_index,
-                                          mode,
-                                          start,
-                                          count,
-                                          0,
-                                          1);
-}
-
-
-void
-softpipe_draw_elements(struct pipe_context *pipe,
-                       struct pipe_resource *indexBuffer,
-                       unsigned indexSize, int indexBias,
-                       unsigned mode, unsigned start, unsigned count)
-{
-   softpipe_draw_range_elements_instanced(pipe,
-                                          indexBuffer,
-                                          indexSize,
-                                          indexBias,
-                                          0,
-                                          0xffffffff,
-                                          mode,
-                                          start,
-                                          count,
-                                          0,
-                                          1);
-}
-
-void
-softpipe_draw_arrays_instanced(struct pipe_context *pipe,
-                               unsigned mode,
-                               unsigned start,
-                               unsigned count,
-                               unsigned startInstance,
-                               unsigned instanceCount)
-{
-   softpipe_draw_range_elements_instanced(pipe,
-                                          NULL,
-                                          0,
-                                          0,
-                                          0,
-                                          0xffffffff,
-                                          mode,
-                                          start,
-                                          count,
-                                          startInstance,
-                                          instanceCount);
-}
-
-void
-softpipe_draw_elements_instanced(struct pipe_context *pipe,
-                                 struct pipe_resource *indexBuffer,
-                                 unsigned indexSize,
-                                 int indexBias,
-                                 unsigned mode,
-                                 unsigned start,
-                                 unsigned count,
-                                 unsigned startInstance,
-                                 unsigned instanceCount)
-{
-   softpipe_draw_range_elements_instanced(pipe,
-                                          indexBuffer,
-                                          indexSize,
-                                          indexBias,
-                                          0,
-                                          0xffffffff,
-                                          mode,
-                                          start,
-                                          count,
-                                          startInstance,
-                                          instanceCount);
-}
-
-void
-softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
-                     unsigned start, unsigned count)
-{
-   softpipe_draw_range_elements_instanced(pipe,
-                                          NULL,
-                                          0,
-                                          0,
-                                          0,
-                                          0xffffffff,
-                                          mode,
-                                          start,
-                                          count,
-                                          0,
-                                          1);
-}
-