gallium: Keep only pipe_context::draw_vbo.
authorChia-I Wu <olv@lunarg.com>
Fri, 16 Jul 2010 17:10:46 +0000 (01:10 +0800)
committerChia-I Wu <olv@lunarg.com>
Thu, 29 Jul 2010 05:45:31 +0000 (13:45 +0800)
That is, remove pipe_context::draw_arrays, pipe_context::draw_elements,
pipe_context::draw_arrays_instanced,
pipe_context::draw_elements_instanced,
pipe_context::draw_range_elements.

25 files changed:
src/gallium/drivers/cell/ppu/cell_draw_arrays.c
src/gallium/drivers/failover/fo_context.c
src/gallium/drivers/galahad/glhd_context.c
src/gallium/drivers/i915/i915_context.c
src/gallium/drivers/i965/brw_draw.c
src/gallium/drivers/identity/id_context.c
src/gallium/drivers/llvmpipe/lp_draw_arrays.c
src/gallium/drivers/nv50/nv50_context.c
src/gallium/drivers/nv50/nv50_context.h
src/gallium/drivers/nv50/nv50_vbo.c
src/gallium/drivers/nvfx/nvfx_context.c
src/gallium/drivers/nvfx/nvfx_context.h
src/gallium/drivers/nvfx/nvfx_vbo.c
src/gallium/drivers/r300/r300_render.c
src/gallium/drivers/r300/r300_render_stencilref.c
src/gallium/drivers/r600/r600_context.c
src/gallium/drivers/r600/r600_context.h
src/gallium/drivers/r600/r600_draw.c
src/gallium/drivers/rbug/rbug_context.c
src/gallium/drivers/softpipe/sp_context.c
src/gallium/drivers/softpipe/sp_draw_arrays.c
src/gallium/drivers/softpipe/sp_state.h
src/gallium/drivers/svga/svga_pipe_draw.c
src/gallium/drivers/trace/tr_context.c
src/gallium/include/pipe/p_context.h

index e06226fbfe36f5180e5740d26b4c394a021e5371..4adef5b8c074fcb206250f7851592dcbbbdf2be5 100644 (file)
@@ -34,7 +34,6 @@
 #include "pipe/p_defines.h"
 #include "pipe/p_context.h"
 #include "util/u_inlines.h"
-#include "util/u_draw_quad.h"
 
 #include "cell_context.h"
 #include "cell_draw_arrays.h"
@@ -113,71 +112,9 @@ cell_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
 }
 
 
-static void
-cell_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)
-{
-   struct cell_context *cell = cell_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.index_bias = indexBias;
-   info.min_index = min_index;
-   info.max_index = max_index;
-
-   if (indexBuffer) {
-      info.indexed = TRUE;
-      saved_ib = cell->index_buffer;
-
-      ib.buffer = indexBuffer;
-      ib.offset = 0;
-      ib.index_size = indexSize;
-      pipe->set_index_buffer(pipe, &ib);
-   }
-
-   cell_draw_vbo(pipe, &info);
-
-   if (indexBuffer)
-      pipe->set_index_buffer(pipe, &saved_ib);
-}
-
-
-static void
-cell_draw_elements(struct pipe_context *pipe,
-                   struct pipe_resource *indexBuffer,
-                   unsigned indexSize, int indexBias,
-                   unsigned mode, unsigned start, unsigned count)
-{
-   cell_draw_range_elements( pipe, indexBuffer,
-                             indexSize, indexBias,
-                             0, 0xffffffff,
-                             mode, start, count );
-}
-
-
-static void
-cell_draw_arrays(struct pipe_context *pipe, unsigned mode,
-                     unsigned start, unsigned count)
-{
-   cell_draw_elements(pipe, NULL, 0, 0, mode, start, count);
-}
-
-
 void
 cell_init_draw_functions(struct cell_context *cell)
 {
-   cell->pipe.draw_arrays = cell_draw_arrays;
-   cell->pipe.draw_elements = cell_draw_elements;
-   cell->pipe.draw_range_elements = cell_draw_range_elements;
    cell->pipe.draw_vbo = cell_draw_vbo;
 }
 
index 1048d58313d19846a19567e65cd1a299a7146447..761a0fce721617f39971b433e962073dcdf483e6 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "pipe/p_defines.h"
 #include "util/u_memory.h"
-#include "util/u_draw_quad.h"
 #include "pipe/p_context.h"
 
 #include "fo_context.h"
@@ -88,47 +87,6 @@ static void failover_draw_vbo( struct pipe_context *pipe,
    }
 }
 
-
-static void failover_draw_elements( struct pipe_context *pipe,
-                                    struct pipe_resource *indexResource,
-                                    unsigned indexSize,
-                                    int indexBias,
-                                    unsigned prim, 
-                                    unsigned start, 
-                                    unsigned count)
-{
-   struct failover_context *failover = failover_context( pipe );
-   struct pipe_draw_info info;
-   struct pipe_index_buffer saved_ib, ib;
-
-   util_draw_init_info(&info);
-   info.mode = prim;
-   info.start = start;
-   info.count = count;
-
-   if (indexResource) {
-      info.indexed = TRUE;
-      saved_ib = failover->index_buffer;
-
-      ib.buffer = indexResource;
-      ib.offset = 0;
-      ib.index_size = indexSize;
-      pipe->set_index_buffer(pipe, &ib);
-   }
-
-   failover_draw_vbo(pipe, &info);
-
-   if (indexResource)
-      pipe->set_index_buffer(pipe, &saved_ib);
-}
-
-
-static void failover_draw_arrays( struct pipe_context *pipe,
-                                    unsigned prim, unsigned start, unsigned count)
-{
-   failover_draw_elements(pipe, NULL, 0, 0, prim, start, count);
-}
-
 static unsigned int
 failover_is_resource_referenced( struct pipe_context *_pipe,
                                 struct pipe_resource *resource,
@@ -161,8 +119,6 @@ struct pipe_context *failover_create( struct pipe_context *hw,
    failover->pipe.get_paramf = hw->get_paramf;
 #endif
 
-   failover->pipe.draw_arrays = failover_draw_arrays;
-   failover->pipe.draw_elements = failover_draw_elements;
    failover->pipe.draw_vbo = failover_draw_vbo;
    failover->pipe.clear = hw->clear;
    failover->pipe.clear_render_target = hw->clear_render_target;
index 6473f2d499b27c5b2f8a10cc316ca4c0d92c2a8e..fe14a287efbb2c37080f77a8a98bd4947fd090e1 100644 (file)
@@ -47,71 +47,6 @@ galahad_destroy(struct pipe_context *_pipe)
    FREE(glhd_pipe);
 }
 
-static void
-galahad_draw_arrays(struct pipe_context *_pipe,
-                     unsigned prim,
-                     unsigned start,
-                     unsigned count)
-{
-   struct galahad_context *glhd_pipe = galahad_context(_pipe);
-   struct pipe_context *pipe = glhd_pipe->pipe;
-
-   pipe->draw_arrays(pipe,
-                     prim,
-                     start,
-                     count);
-}
-
-static void
-galahad_draw_elements(struct pipe_context *_pipe,
-                       struct pipe_resource *_indexResource,
-                       unsigned indexSize,
-                       int indexBias,
-                       unsigned prim,
-                       unsigned start,
-                       unsigned count)
-{
-   struct galahad_context *glhd_pipe = galahad_context(_pipe);
-   struct galahad_resource *glhd_resource = galahad_resource(_indexResource);
-   struct pipe_context *pipe = glhd_pipe->pipe;
-   struct pipe_resource *indexResource = glhd_resource->resource;
-
-   pipe->draw_elements(pipe,
-                       indexResource,
-                       indexSize,
-                       indexBias,
-                       prim,
-                       start,
-                       count);
-}
-
-static void
-galahad_draw_range_elements(struct pipe_context *_pipe,
-                             struct pipe_resource *_indexResource,
-                             unsigned indexSize,
-                             int indexBias,
-                             unsigned minIndex,
-                             unsigned maxIndex,
-                             unsigned mode,
-                             unsigned start,
-                             unsigned count)
-{
-   struct galahad_context *glhd_pipe = galahad_context(_pipe);
-   struct galahad_resource *glhd_resource = galahad_resource(_indexResource);
-   struct pipe_context *pipe = glhd_pipe->pipe;
-   struct pipe_resource *indexResource = glhd_resource->resource;
-
-   pipe->draw_range_elements(pipe,
-                             indexResource,
-                             indexSize,
-                             indexBias,
-                             minIndex,
-                             maxIndex,
-                             mode,
-                             start,
-                             count);
-}
-
 static void
 galahad_draw_vbo(struct pipe_context *_pipe,
                  const struct pipe_draw_info *info)
@@ -979,9 +914,6 @@ galahad_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
    glhd_pipe->base.draw = NULL;
 
    glhd_pipe->base.destroy = galahad_destroy;
-   glhd_pipe->base.draw_arrays = galahad_draw_arrays;
-   glhd_pipe->base.draw_elements = galahad_draw_elements;
-   glhd_pipe->base.draw_range_elements = galahad_draw_range_elements;
    glhd_pipe->base.draw_vbo = galahad_draw_vbo;
    glhd_pipe->base.create_query = galahad_create_query;
    glhd_pipe->base.destroy_query = galahad_destroy_query;
index ca07b3e235179ddd630e1ae01feceff4a573c106..496efc99da46dc2d9f37554e12d46ead8bf0cfa7 100644 (file)
@@ -36,7 +36,6 @@
 #include "pipe/p_defines.h"
 #include "util/u_inlines.h"
 #include "util/u_memory.h"
-#include "util/u_draw_quad.h"
 #include "pipe/p_screen.h"
 
 
@@ -102,64 +101,6 @@ i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
    }
 }
 
-static void
-i915_draw_range_elements(struct pipe_context *pipe,
-                         struct pipe_resource *indexBuffer,
-                         unsigned indexSize,
-                         int indexBias,
-                         unsigned min_index,
-                         unsigned max_index,
-                         unsigned prim, unsigned start, unsigned count)
-{
-   struct i915_context *i915 = i915_context(pipe);
-   struct pipe_draw_info info;
-   struct pipe_index_buffer saved_ib, ib;
-
-   util_draw_init_info(&info);
-   info.mode = prim;
-   info.start = start;
-   info.count = count;
-   info.index_bias = indexBias;
-   info.min_index = min_index;
-   info.max_index = max_index;
-
-   if (indexBuffer) {
-      info.indexed = TRUE;
-      saved_ib = i915->index_buffer;
-
-      ib.buffer = indexBuffer;
-      ib.offset = 0;
-      ib.index_size = indexSize;
-      pipe->set_index_buffer(pipe, &ib);
-   }
-
-   i915_draw_vbo(pipe, &info);
-
-   if (indexBuffer)
-      pipe->set_index_buffer(pipe, &saved_ib);
-}
-
-static void
-i915_draw_elements(struct pipe_context *pipe,
-                   struct pipe_resource *indexBuffer,
-                   unsigned indexSize, int indexBias,
-                   unsigned prim, unsigned start, unsigned count)
-{
-   i915_draw_range_elements(pipe, indexBuffer,
-                            indexSize, indexBias,
-                            0, 0xffffffff,
-                            prim, start, count);
-}
-
-static void
-i915_draw_arrays(struct pipe_context *pipe,
-                 unsigned prim, unsigned start, unsigned count)
-{
-   i915_draw_elements(pipe, NULL, 0, 0, prim, start, count);
-}
-
-
-
 
 /*
  * Generic context functions
@@ -203,9 +144,6 @@ i915_create_context(struct pipe_screen *screen, void *priv)
 
    i915->base.clear = i915_clear;
 
-   i915->base.draw_arrays = i915_draw_arrays;
-   i915->base.draw_elements = i915_draw_elements;
-   i915->base.draw_range_elements = i915_draw_range_elements;
    i915->base.draw_vbo = i915_draw_vbo;
 
    /*
index fa7d047e0bd20af21e8fe1423deeb6c10cd1f1c7..3ab9024c31e3b19d465cdf65f4365f0da19a6ed3 100644 (file)
@@ -29,7 +29,6 @@
 #include "util/u_inlines.h"
 #include "util/u_prim.h"
 #include "util/u_upload_mgr.h"
-#include "util/u_draw_quad.h"
 
 #include "brw_draw.h"
 #include "brw_defines.h"
@@ -220,74 +219,11 @@ brw_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
    }
 }
 
-static void
-brw_draw_range_elements(struct pipe_context *pipe,
-                       struct pipe_resource *index_buffer,
-                       unsigned index_size, int index_bias,
-                       unsigned min_index,
-                       unsigned max_index,
-                       unsigned mode, unsigned start, unsigned count)
-{
-   struct brw_context *brw = brw_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.index_bias = index_bias;
-   info.min_index = min_index;
-   info.max_index = max_index;
-
-   if (index_buffer) {
-      info.indexed = TRUE;
-      saved_ib.buffer = brw->curr.index_buffer;
-      saved_ib.offset = brw->curr.index_offset;
-      saved_ib.index_size = brw->curr.index_size;
-
-      ib.buffer = index_buffer;
-      ib.offset = 0;
-      ib.index_size = index_size;
-      pipe->set_index_buffer(pipe, &ib);
-   }
-
-   brw_draw_vbo(pipe, &info);
-
-   if (index_buffer)
-      pipe->set_index_buffer(pipe, &saved_ib);
-}
-
-static void
-brw_draw_elements(struct pipe_context *pipe,
-                 struct pipe_resource *index_buffer,
-                 unsigned index_size, int index_bias,
-                 unsigned mode, 
-                 unsigned start, unsigned count)
-{
-   brw_draw_range_elements( pipe, index_buffer,
-                            index_size, index_bias,
-                            0, 0xffffffff,
-                            mode, 
-                            start, count );
-}
-
-static void
-brw_draw_arrays(struct pipe_context *pipe, unsigned mode,
-                     unsigned start, unsigned count)
-{
-   brw_draw_elements(pipe, NULL, 0, 0, mode, start, count);
-}
-
-
 
 boolean brw_draw_init( struct brw_context *brw )
 {
    /* Register our drawing function: 
     */
-   brw->base.draw_arrays = brw_draw_arrays;
-   brw->base.draw_elements = brw_draw_elements;
-   brw->base.draw_range_elements = brw_draw_range_elements;
    brw->base.draw_vbo = brw_draw_vbo;
 
    /* Create helpers for uploading data in user buffers:
index e10d3a141306392f91152c5fffa105944dae77b4..de83c249057a3bcff2cd87e2dd31e645d406e764 100644 (file)
@@ -45,71 +45,6 @@ identity_destroy(struct pipe_context *_pipe)
    FREE(id_pipe);
 }
 
-static void
-identity_draw_arrays(struct pipe_context *_pipe,
-                     unsigned prim,
-                     unsigned start,
-                     unsigned count)
-{
-   struct identity_context *id_pipe = identity_context(_pipe);
-   struct pipe_context *pipe = id_pipe->pipe;
-
-   pipe->draw_arrays(pipe,
-                     prim,
-                     start,
-                     count);
-}
-
-static void
-identity_draw_elements(struct pipe_context *_pipe,
-                       struct pipe_resource *_indexResource,
-                       unsigned indexSize,
-                       int indexBias,
-                       unsigned prim,
-                       unsigned start,
-                       unsigned count)
-{
-   struct identity_context *id_pipe = identity_context(_pipe);
-   struct identity_resource *id_resource = identity_resource(_indexResource);
-   struct pipe_context *pipe = id_pipe->pipe;
-   struct pipe_resource *indexResource = id_resource->resource;
-
-   pipe->draw_elements(pipe,
-                       indexResource,
-                       indexSize,
-                       indexBias,
-                       prim,
-                       start,
-                       count);
-}
-
-static void
-identity_draw_range_elements(struct pipe_context *_pipe,
-                             struct pipe_resource *_indexResource,
-                             unsigned indexSize,
-                             int indexBias,
-                             unsigned minIndex,
-                             unsigned maxIndex,
-                             unsigned mode,
-                             unsigned start,
-                             unsigned count)
-{
-   struct identity_context *id_pipe = identity_context(_pipe);
-   struct identity_resource *id_resource = identity_resource(_indexResource);
-   struct pipe_context *pipe = id_pipe->pipe;
-   struct pipe_resource *indexResource = id_resource->resource;
-
-   pipe->draw_range_elements(pipe,
-                             indexResource,
-                             indexSize,
-                             indexBias,
-                             minIndex,
-                             maxIndex,
-                             mode,
-                             start,
-                             count);
-}
-
 static void
 identity_draw_vbo(struct pipe_context *_pipe,
                   const struct pipe_draw_info *info)
@@ -917,9 +852,6 @@ identity_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
    id_pipe->base.draw = NULL;
 
    id_pipe->base.destroy = identity_destroy;
-   id_pipe->base.draw_arrays = identity_draw_arrays;
-   id_pipe->base.draw_elements = identity_draw_elements;
-   id_pipe->base.draw_range_elements = identity_draw_range_elements;
    id_pipe->base.draw_vbo = identity_draw_vbo;
    id_pipe->base.create_query = identity_create_query;
    id_pipe->base.destroy_query = identity_destroy_query;
index b6dbb9d288ebc5d565a28ec855280a87a8fd2ff2..22c2836e225b93e350e91d280b6c7e85ff96d98d 100644 (file)
@@ -34,7 +34,6 @@
 #include "pipe/p_defines.h"
 #include "pipe/p_context.h"
 #include "util/u_prim.h"
-#include "util/u_draw_quad.h"
 
 #include "lp_context.h"
 #include "lp_state.h"
@@ -109,158 +108,8 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
 }
 
 
-static void
-llvmpipe_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 llvmpipe_context *lp = llvmpipe_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 = lp->index_buffer;
-
-      ib.buffer = indexBuffer;
-      ib.offset = 0;
-      ib.index_size = indexSize;
-      pipe->set_index_buffer(pipe, &ib);
-   }
-
-   llvmpipe_draw_vbo(pipe, &info);
-
-   if (indexBuffer)
-      pipe->set_index_buffer(pipe, &saved_ib);
-}
-
-static void
-llvmpipe_draw_arrays_instanced(struct pipe_context *pipe,
-                               unsigned mode,
-                               unsigned start,
-                               unsigned count,
-                               unsigned startInstance,
-                               unsigned instanceCount)
-{
-   llvmpipe_draw_range_elements_instanced(pipe,
-                                          NULL, /* no indexBuffer */
-                                          0, 0, /* indexSize, indexBias */
-                                          0, ~0, /* minIndex, maxIndex */
-                                          mode,
-                                          start,
-                                          count,
-                                          startInstance,
-                                          instanceCount);
-}
-
-
-static void
-llvmpipe_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)
-{
-   llvmpipe_draw_range_elements_instanced(pipe,
-                                          indexBuffer,
-                                          indexSize, indexBias,
-                                          0, ~0, /* minIndex, maxIndex */
-                                          mode,
-                                          start,
-                                          count,
-                                          startInstance,
-                                          instanceCount);
-}
-
-
-static void
-llvmpipe_draw_elements(struct pipe_context *pipe,
-                       struct pipe_resource *indexBuffer,
-                       unsigned indexSize,
-                       int indexBias,
-                       unsigned mode,
-                       unsigned start,
-                       unsigned count)
-{
-   llvmpipe_draw_range_elements_instanced(pipe,
-                                          indexBuffer,
-                                          indexSize, indexBias,
-                                          0, 0xffffffff,  /* min, maxIndex */
-                                          mode, start, count,
-                                          0,  /* startInstance */
-                                          1);  /* instanceCount */
-}
-
-
-static void
-llvmpipe_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)
-{
-   llvmpipe_draw_range_elements_instanced(pipe,
-                                          indexBuffer,
-                                          indexSize, indexBias,
-                                          min_index, max_index,
-                                          mode, start, count,
-                                          0,  /* startInstance */
-                                          1);  /* instanceCount */
-}
-
-
-static void
-llvmpipe_draw_arrays(struct pipe_context *pipe,
-                     unsigned mode,
-                     unsigned start,
-                     unsigned count)
-{
-   llvmpipe_draw_range_elements_instanced(pipe,
-                                          NULL,  /* indexBuffer */
-                                          0,  /* indexSize */
-                                          0,  /* indexBias */
-                                          0, ~0,  /* min, maxIndex */
-                                          mode, start, count,
-                                          0,  /* startInstance */
-                                          1);  /* instanceCount */
-}
-
-
 void
 llvmpipe_init_draw_funcs(struct llvmpipe_context *llvmpipe)
 {
-   llvmpipe->pipe.draw_arrays = llvmpipe_draw_arrays;
-   llvmpipe->pipe.draw_elements = llvmpipe_draw_elements;
-   llvmpipe->pipe.draw_range_elements = llvmpipe_draw_range_elements;
-   llvmpipe->pipe.draw_arrays_instanced = llvmpipe_draw_arrays_instanced;
-   llvmpipe->pipe.draw_elements_instanced = llvmpipe_draw_elements_instanced;
-
    llvmpipe->pipe.draw_vbo = llvmpipe_draw_vbo;
 }
index 3fc39c113721cd3e6501b76ba096ba8e4c8c9ba6..0874cb5e4ea45f35365c79c1b62afc393931d780 100644 (file)
@@ -82,10 +82,6 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
 
        nv50->pipe.destroy = nv50_destroy;
 
-       nv50->pipe.draw_arrays = nv50_draw_arrays;
-       nv50->pipe.draw_arrays_instanced = nv50_draw_arrays_instanced;
-       nv50->pipe.draw_elements = nv50_draw_elements;
-       nv50->pipe.draw_elements_instanced = nv50_draw_elements_instanced;
        nv50->pipe.draw_vbo = nv50_draw_vbo;
        nv50->pipe.clear = nv50_clear;
 
index a7c2b5d4874c0a966d79f824dd07b90315e7eff6..d24d6c50ea8062b7f6e4e43c3e6e5840fb710733 100644 (file)
@@ -180,24 +180,6 @@ nv50_surface_do_copy(struct nv50_screen *screen, struct pipe_surface *dst,
 extern struct draw_stage *nv50_draw_render_stage(struct nv50_context *nv50);
 
 /* nv50_vbo.c */
-extern void nv50_draw_arrays(struct pipe_context *, unsigned mode,
-                               unsigned start, unsigned count);
-extern void nv50_draw_arrays_instanced(struct pipe_context *, unsigned mode,
-                                       unsigned start, unsigned count,
-                                       unsigned startInstance,
-                                       unsigned instanceCount);
-extern void nv50_draw_elements(struct pipe_context *pipe,
-                                 struct pipe_resource *indexBuffer,
-                                 unsigned indexSize, int indexBias,
-                                 unsigned mode, unsigned start,
-                                 unsigned count);
-extern void nv50_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);
 extern void nv50_draw_vbo(struct pipe_context *pipe,
                           const struct pipe_draw_info *info);
 extern void nv50_vtxelt_construct(struct nv50_vtxelt_stateobj *cso);
index 11ffc182c2da92720dac8d8837a86d9b1147f351..e7f8fe33edf5b7d2723274c8e3945f7c6044be14 100644 (file)
@@ -173,7 +173,7 @@ instance_step(struct nv50_context *nv50, struct instance *a)
        }
 }
 
-void
+static void
 nv50_draw_arrays_instanced(struct pipe_context *pipe,
                           unsigned mode, unsigned start, unsigned count,
                           unsigned startInstance, unsigned instanceCount)
@@ -220,13 +220,6 @@ nv50_draw_arrays_instanced(struct pipe_context *pipe,
        }
 }
 
-void
-nv50_draw_arrays(struct pipe_context *pipe, unsigned mode, unsigned start,
-                unsigned count)
-{
-       nv50_draw_arrays_instanced(pipe, mode, start, count, 0, 1);
-}
-
 struct inline_ctx {
        struct nv50_context *nv50;
        void *map;
@@ -384,7 +377,7 @@ nv50_draw_elements_inline(struct pipe_context *pipe,
        pipe_buffer_unmap(pipe, indexBuffer, transfer);
 }
 
-void
+static void
 nv50_draw_elements_instanced(struct pipe_context *pipe,
                             struct pipe_resource *indexBuffer,
                             unsigned indexSize, int indexBias,
@@ -463,16 +456,6 @@ nv50_draw_elements_instanced(struct pipe_context *pipe,
        }
 }
 
-void
-nv50_draw_elements(struct pipe_context *pipe,
-                  struct pipe_resource *indexBuffer,
-                  unsigned indexSize, int indexBias,
-                  unsigned mode, unsigned start, unsigned count)
-{
-       nv50_draw_elements_instanced(pipe, indexBuffer, indexSize, indexBias,
-                                    mode, start, count, 0, 1);
-}
-
 void
 nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
 {
index f30795f69af84a5c75702f9e3783abf851f38c09..7218abff22ddf8f1da5381899bba5e03db3dde75 100644 (file)
@@ -55,8 +55,6 @@ nvfx_create(struct pipe_screen *pscreen, void *priv)
        nvfx->pipe.screen = pscreen;
        nvfx->pipe.priv = priv;
        nvfx->pipe.destroy = nvfx_destroy;
-       nvfx->pipe.draw_arrays = nvfx_draw_arrays;
-       nvfx->pipe.draw_elements = nvfx_draw_elements;
        nvfx->pipe.draw_vbo = nvfx_draw_vbo;
        nvfx->pipe.clear = nvfx_clear;
        nvfx->pipe.flush = nvfx_flush;
index d6cd272eed51a939e4f65dd0447f26e9076fcec9..89f94c10bd13b560ca8ae9083e0ea520be8c0d8a 100644 (file)
@@ -236,13 +236,6 @@ extern void nvfx_init_transfer_functions(struct nvfx_context *nvfx);
 /* nvfx_vbo.c */
 extern boolean nvfx_vbo_validate(struct nvfx_context *nvfx);
 extern void nvfx_vbo_relocate(struct nvfx_context *nvfx);
-extern void nvfx_draw_arrays(struct pipe_context *, unsigned mode,
-                               unsigned start, unsigned count);
-extern void nvfx_draw_elements(struct pipe_context *pipe,
-                               struct pipe_resource *indexBuffer,
-                               unsigned indexSize, int indexBias,
-                               unsigned mode, unsigned start,
-                               unsigned count);
 extern void nvfx_draw_vbo(struct pipe_context *pipe,
                           const struct pipe_draw_info *info);
 
index 23a59b589b90e75a1fb31db76936e92e91004a38..4aa37938425c0600a820a84c2a259133521b4ee7 100644 (file)
@@ -158,7 +158,7 @@ nvfx_vbo_static_attrib(struct nvfx_context *nvfx,
        pipe_buffer_unmap(&nvfx->pipe, vb->buffer, transfer);
 }
 
-void
+static void
 nvfx_draw_arrays(struct pipe_context *pipe,
                 unsigned mode, unsigned start, unsigned count)
 {
@@ -463,7 +463,7 @@ nvfx_draw_elements_vbo(struct pipe_context *pipe,
        }
 }
 
-void
+static void
 nvfx_draw_elements(struct pipe_context *pipe,
                   struct pipe_resource *indexBuffer,
                   unsigned indexSize, int indexBias,
index da96098cc44ca36112f5344448bdd2cb9efb86e9..c179b07e86a52e9566cbeae2f6967215a60d4557 100644 (file)
@@ -33,7 +33,6 @@
 #include "util/u_memory.h"
 #include "util/u_upload_mgr.h"
 #include "util/u_prim.h"
-#include "util/u_draw_quad.h"
 
 #include "r300_cs.h"
 #include "r300_context.h"
@@ -567,19 +566,6 @@ static void r300_draw_range_elements(struct pipe_context* pipe,
     }
 }
 
-/* Simple helpers for context setup. Should probably be moved to util. */
-static void r300_draw_elements(struct pipe_context* pipe,
-                               struct pipe_resource* indexBuffer,
-                               unsigned indexSize, int indexBias, unsigned mode,
-                               unsigned start, unsigned count)
-{
-    struct r300_context *r300 = r300_context(pipe);
-
-    pipe->draw_range_elements(pipe, indexBuffer, indexSize, indexBias,
-                              0, r300->vertex_buffer_max_index,
-                              mode, start, count);
-}
-
 static void r300_draw_arrays(struct pipe_context* pipe, unsigned mode,
                              unsigned start, unsigned count)
 {
@@ -735,54 +721,6 @@ static void r300_swtcl_draw_vbo(struct pipe_context* pipe,
     }
 }
 
-/* SW TCL elements, using Draw. */
-static void r300_swtcl_draw_range_elements(struct pipe_context* pipe,
-                                           struct pipe_resource* indexBuffer,
-                                           unsigned indexSize,
-                                           int indexBias,
-                                           unsigned minIndex,
-                                           unsigned maxIndex,
-                                           unsigned mode,
-                                           unsigned start,
-                                           unsigned count)
-{
-    struct r300_context* r300 = r300_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.index_bias = indexBias;
-    info.min_index = minIndex;
-    info.max_index = maxIndex;
-
-    if (indexBuffer) {
-       info.indexed = TRUE;
-
-       saved_ib = r300->index_buffer;
-       ib.buffer = indexBuffer;
-       ib.offset = 0;
-       ib.index_size = indexSize;
-       pipe->set_index_buffer(pipe, &ib);
-    }
-
-    r300_swtcl_draw_vbo(pipe, &info);
-
-    if (indexBuffer)
-       pipe->set_index_buffer(pipe, &saved_ib);
-}
-
-static void r300_swtcl_draw_arrays(struct pipe_context* pipe,
-                                   unsigned mode,
-                                   unsigned start,
-                                   unsigned count)
-{
-   r300_swtcl_draw_range_elements(pipe, NULL, 0, 0,
-           start, start + count -1, mode, start, count);
-}
-
 /* Object for rendering using Draw. */
 struct r300_render {
     /* Parent class */
@@ -1179,17 +1117,10 @@ static void r300_resource_resolve(struct pipe_context* pipe,
 
 void r300_init_render_functions(struct r300_context *r300)
 {
-    /* Set generic functions. */
-    r300->context.draw_elements = r300_draw_elements;
-
     /* Set draw functions based on presence of HW TCL. */
     if (r300->screen->caps.has_tcl) {
-        r300->context.draw_arrays = r300_draw_arrays;
-        r300->context.draw_range_elements = r300_draw_range_elements;
         r300->context.draw_vbo = r300_draw_vbo;
     } else {
-        r300->context.draw_arrays = r300_swtcl_draw_arrays;
-        r300->context.draw_range_elements = r300_swtcl_draw_range_elements;
         r300->context.draw_vbo = r300_swtcl_draw_vbo;
     }
 
index 6d801cf1594145ba4ecff460d208a37c8fb28819..1f035d64a28450d75d67db3669a9c28f1d5ea30d 100644 (file)
 #include "r300_reg.h"
 
 struct r300_stencilref_context {
-    void (*draw_arrays)(struct pipe_context *pipe,
-                        unsigned mode, unsigned start, unsigned count);
-
-    void (*draw_range_elements)(
-        struct pipe_context *pipe, struct pipe_resource *indexBuffer,
-        unsigned indexSize, int indexBias, unsigned minIndex, unsigned maxIndex,
-        unsigned mode, unsigned start, unsigned count);
-
     void (*draw_vbo)(struct pipe_context *pipe,
                      const struct pipe_draw_info *info);
 
@@ -108,45 +100,6 @@ static void r300_stencilref_end(struct r300_context *r300)
     r300->dsa_state.dirty = TRUE;
 }
 
-static void r300_stencilref_draw_arrays(struct pipe_context *pipe, unsigned mode,
-                                        unsigned start, unsigned count)
-{
-    struct r300_context *r300 = r300_context(pipe);
-    struct r300_stencilref_context *sr = r300->stencilref_fallback;
-
-    if (!r300_stencilref_needed(r300)) {
-        sr->draw_arrays(pipe, mode, start, count);
-    } else {
-        r300_stencilref_begin(r300);
-        sr->draw_arrays(pipe, mode, start, count);
-        r300_stencilref_switch_side(r300);
-        sr->draw_arrays(pipe, mode, start, count);
-        r300_stencilref_end(r300);
-    }
-}
-
-static void r300_stencilref_draw_range_elements(
-    struct pipe_context *pipe, struct pipe_resource *indexBuffer,
-    unsigned indexSize, int indexBias, unsigned minIndex, unsigned maxIndex,
-    unsigned mode, unsigned start, unsigned count)
-{
-    struct r300_context *r300 = r300_context(pipe);
-    struct r300_stencilref_context *sr = r300->stencilref_fallback;
-
-    if (!r300_stencilref_needed(r300)) {
-        sr->draw_range_elements(pipe, indexBuffer, indexSize, indexBias,
-                                minIndex, maxIndex, mode, start, count);
-    } else {
-        r300_stencilref_begin(r300);
-        sr->draw_range_elements(pipe, indexBuffer, indexSize, indexBias,
-                                minIndex, maxIndex, mode, start, count);
-        r300_stencilref_switch_side(r300);
-        sr->draw_range_elements(pipe, indexBuffer, indexSize, indexBias,
-                                minIndex, maxIndex, mode, start, count);
-        r300_stencilref_end(r300);
-    }
-}
-
 static void r300_stencilref_draw_vbo(struct pipe_context *pipe,
                                      const struct pipe_draw_info *info)
 {
@@ -168,13 +121,9 @@ void r300_plug_in_stencil_ref_fallback(struct r300_context *r300)
 {
     r300->stencilref_fallback = CALLOC_STRUCT(r300_stencilref_context);
 
-    /* Save original draw functions. */
-    r300->stencilref_fallback->draw_arrays = r300->context.draw_arrays;
-    r300->stencilref_fallback->draw_range_elements = r300->context.draw_range_elements;
+    /* Save original draw function. */
     r300->stencilref_fallback->draw_vbo = r300->context.draw_vbo;
 
-    /* Override the draw functions. */
-    r300->context.draw_arrays = r300_stencilref_draw_arrays;
-    r300->context.draw_range_elements = r300_stencilref_draw_range_elements;
+    /* Override the draw function. */
     r300->context.draw_vbo = r300_stencilref_draw_vbo;
 }
index 2c2bd4672befc7ab6a795b18ffdb95e83a9d0710..fc8aa1b866d6186f67144e404d2735c432eb192e 100644 (file)
@@ -313,9 +313,6 @@ struct pipe_context *r600_create_context(struct pipe_screen *screen, void *priv)
        rctx->context.screen = screen;
        rctx->context.priv = priv;
        rctx->context.destroy = r600_destroy_context;
-       rctx->context.draw_arrays = r600_draw_arrays;
-       rctx->context.draw_elements = r600_draw_elements;
-       rctx->context.draw_range_elements = r600_draw_range_elements;
        rctx->context.draw_vbo = r600_draw_vbo;
        rctx->context.flush = r600_flush;
 
index 9427c19d059641e6456c9c8ebf23a7e530e68961..97c8a46bb05c3d44582e65b6274a4f34056366a4 100644 (file)
@@ -191,17 +191,6 @@ struct r600_context_state *r600_context_state_decref(struct r600_context_state *
 
 int r600_context_hw_states(struct r600_context *rctx);
 
-void r600_draw_arrays(struct pipe_context *ctx, unsigned mode,
-                       unsigned start, unsigned count);
-void r600_draw_elements(struct pipe_context *ctx,
-               struct pipe_resource *index_buffer,
-               unsigned index_size, int index_bias, unsigned mode,
-               unsigned start, unsigned count);
-void r600_draw_range_elements(struct pipe_context *ctx,
-               struct pipe_resource *index_buffer,
-               unsigned index_size, int index_bias, unsigned min_index,
-               unsigned max_index, unsigned mode,
-               unsigned start, unsigned count);
 void r600_draw_vbo(struct pipe_context *ctx,
                    const struct pipe_draw_info *info);
 
index eeaa677edbd05dc315e3ce0693d5003b2184b908..c52dfd3fb3fc5ccaf233be4738625766b0935e1e 100644 (file)
@@ -176,56 +176,6 @@ static int r600_draw_common(struct r600_draw *draw)
        return 0;
 }
 
-void r600_draw_range_elements(struct pipe_context *ctx,
-               struct pipe_resource *index_buffer,
-               unsigned index_size, int index_bias, unsigned min_index,
-               unsigned max_index, unsigned mode,
-               unsigned start, unsigned count)
-{
-       struct r600_draw draw;
-       assert(index_bias == 0);
-
-       draw.ctx = ctx;
-       draw.mode = mode;
-       draw.start = start;
-       draw.count = count;
-       draw.index_size = index_size;
-       draw.index_buffer = index_buffer;
-printf("index_size %d min %d max %d  start %d  count %d\n", index_size, min_index, max_index, start, count);
-       r600_draw_common(&draw);
-}
-
-void r600_draw_elements(struct pipe_context *ctx,
-               struct pipe_resource *index_buffer,
-               unsigned index_size, int index_bias, unsigned mode,
-               unsigned start, unsigned count)
-{
-       struct r600_draw draw;
-       assert(index_bias == 0);
-
-       draw.ctx = ctx;
-       draw.mode = mode;
-       draw.start = start;
-       draw.count = count;
-       draw.index_size = index_size;
-       draw.index_buffer = index_buffer;
-       r600_draw_common(&draw);
-}
-
-void r600_draw_arrays(struct pipe_context *ctx, unsigned mode,
-                       unsigned start, unsigned count)
-{
-       struct r600_draw draw;
-
-       draw.ctx = ctx;
-       draw.mode = mode;
-       draw.start = start;
-       draw.count = count;
-       draw.index_size = 0;
-       draw.index_buffer = NULL;
-       r600_draw_common(&draw);
-}
-
 void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
 {
        struct r600_context *rctx = r600_context(ctx);
index c748073b2a2b0cffdb96339edc1175f71e5f7b3b..3ffda87520f063a16a59929259ef7d31d94f23e2 100644 (file)
@@ -102,89 +102,6 @@ rbug_draw_block_locked(struct rbug_context *rb_pipe, int flag)
 
 }
 
-static void
-rbug_draw_arrays(struct pipe_context *_pipe,
-                 unsigned prim,
-                 unsigned start,
-                 unsigned count)
-{
-   struct rbug_context *rb_pipe = rbug_context(_pipe);
-   struct pipe_context *pipe = rb_pipe->pipe;
-
-   pipe_mutex_lock(rb_pipe->draw_mutex);
-   rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_BEFORE);
-
-   pipe->draw_arrays(pipe,
-                     prim,
-                     start,
-                     count);
-
-   rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_AFTER);
-   pipe_mutex_unlock(rb_pipe->draw_mutex);
-}
-
-static void
-rbug_draw_elements(struct pipe_context *_pipe,
-                   struct pipe_resource *_indexResource,
-                   unsigned indexSize,
-                   int indexBias,
-                   unsigned prim,
-                   unsigned start,
-                   unsigned count)
-{
-   struct rbug_context *rb_pipe = rbug_context(_pipe);
-   struct rbug_resource *rb_resource = rbug_resource(_indexResource);
-   struct pipe_context *pipe = rb_pipe->pipe;
-   struct pipe_resource *indexResource = rb_resource->resource;
-
-   pipe_mutex_lock(rb_pipe->draw_mutex);
-   rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_BEFORE);
-
-   pipe->draw_elements(pipe,
-                       indexResource,
-                       indexSize,
-                       indexBias,
-                       prim,
-                       start,
-                       count);
-
-   rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_AFTER);
-   pipe_mutex_unlock(rb_pipe->draw_mutex);
-}
-
-static void
-rbug_draw_range_elements(struct pipe_context *_pipe,
-                         struct pipe_resource *_indexResource,
-                         unsigned indexSize,
-                         int indexBias,
-                         unsigned minIndex,
-                         unsigned maxIndex,
-                         unsigned mode,
-                         unsigned start,
-                         unsigned count)
-{
-   struct rbug_context *rb_pipe = rbug_context(_pipe);
-   struct rbug_resource *rb_resource = rbug_resource(_indexResource);
-   struct pipe_context *pipe = rb_pipe->pipe;
-   struct pipe_resource *indexResource = rb_resource->resource;
-
-   pipe_mutex_lock(rb_pipe->draw_mutex);
-   rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_BEFORE);
-
-   pipe->draw_range_elements(pipe,
-                             indexResource,
-                             indexSize,
-                             indexBias,
-                             minIndex,
-                             maxIndex,
-                             mode,
-                             start,
-                             count);
-
-   rbug_draw_block_locked(rb_pipe, RBUG_BLOCK_AFTER);
-   pipe_mutex_unlock(rb_pipe->draw_mutex);
-}
-
 static void
 rbug_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info)
 {
@@ -1072,9 +989,6 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
    rb_pipe->base.draw = NULL;
 
    rb_pipe->base.destroy = rbug_destroy;
-   rb_pipe->base.draw_arrays = rbug_draw_arrays;
-   rb_pipe->base.draw_elements = rbug_draw_elements;
-   rb_pipe->base.draw_range_elements = rbug_draw_range_elements;
    rb_pipe->base.draw_vbo = rbug_draw_vbo;
    rb_pipe->base.create_query = rbug_create_query;
    rb_pipe->base.destroy_query = rbug_destroy_query;
index fa1fae6f006a15e8f611e92c49db167e284f2731..a7c9959b3e13c1ca9c995c0037ce73cbab3b0933 100644 (file)
@@ -284,11 +284,6 @@ softpipe_create_context( struct pipe_screen *screen,
    softpipe->pipe.set_vertex_buffers = softpipe_set_vertex_buffers;
    softpipe->pipe.set_index_buffer = softpipe_set_index_buffer;
 
-   softpipe->pipe.draw_arrays = softpipe_draw_arrays;
-   softpipe->pipe.draw_elements = softpipe_draw_elements;
-   softpipe->pipe.draw_range_elements = softpipe_draw_range_elements;
-   softpipe->pipe.draw_arrays_instanced = softpipe_draw_arrays_instanced;
-   softpipe->pipe.draw_elements_instanced = softpipe_draw_elements_instanced;
    softpipe->pipe.draw_vbo = softpipe_draw_vbo;
    softpipe->pipe.draw_stream_output = softpipe_draw_stream_output;
 
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);
-}
-
index f04b0a5d31e1314fd7ad91a022dda16b46f98182..39d204de8a92988f5eca7e3bc5d48e7ce1ba680c 100644 (file)
@@ -228,41 +228,6 @@ void softpipe_set_index_buffer(struct pipe_context *,
 void softpipe_update_derived( struct softpipe_context *softpipe );
 
 
-void softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
-                          unsigned start, unsigned count);
-
-void softpipe_draw_elements(struct pipe_context *pipe,
-                            struct pipe_resource *indexBuffer,
-                            unsigned indexSize, int indexBias,
-                            unsigned mode, unsigned start, unsigned count);
-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);
-
-void
-softpipe_draw_arrays_instanced(struct pipe_context *pipe,
-                               unsigned mode,
-                               unsigned start,
-                               unsigned count,
-                               unsigned startInstance,
-                               unsigned 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);
-
 void
 softpipe_draw_vbo(struct pipe_context *pipe,
                   const struct pipe_draw_info *info);
index fceaa83d70187c6deb364678159c0ac4bd6ad0a6..de08bc5e562879f92cd35095077f704b5ba29c31 100644 (file)
@@ -226,28 +226,6 @@ svga_draw_range_elements( struct pipe_context *pipe,
 }
 
 
-static void
-svga_draw_elements( struct pipe_context *pipe,
-                    struct pipe_resource *index_buffer,
-                    unsigned index_size, int index_bias,
-                    unsigned prim, unsigned start, unsigned count)
-{
-   svga_draw_range_elements( pipe, index_buffer,
-                             index_size, index_bias,
-                             0, 0xffffffff,
-                             prim, start, count );
-}
-
-static void
-svga_draw_arrays( struct pipe_context *pipe,
-                  unsigned prim, unsigned start, unsigned count)
-{
-   svga_draw_range_elements(pipe, NULL, 0, 0,
-                            start, start + count - 1, 
-                            prim, 
-                            start, count);
-}
-
 static void
 svga_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
 {
@@ -274,8 +252,5 @@ svga_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
 
 void svga_init_draw_functions( struct svga_context *svga )
 {
-   svga->pipe.draw_arrays = svga_draw_arrays;
-   svga->pipe.draw_elements = svga_draw_elements;
-   svga->pipe.draw_range_elements = svga_draw_range_elements;
    svga->pipe.draw_vbo = svga_draw_vbo;
 }
index 91c9bf09999abb0c650e28475698c44891471da7..84e5a6a8242f3ebccb5081db486f7fca0d1ff0d4 100644 (file)
@@ -82,91 +82,6 @@ trace_surface_unwrap(struct trace_context *tr_ctx,
 }
 
 
-static INLINE void
-trace_context_draw_arrays(struct pipe_context *_pipe,
-                          unsigned mode, unsigned start, unsigned count)
-{
-   struct trace_context *tr_ctx = trace_context(_pipe);
-   struct pipe_context *pipe = tr_ctx->pipe;
-
-   trace_dump_call_begin("pipe_context", "draw_arrays");
-
-   trace_dump_arg(ptr, pipe);
-   trace_dump_arg(uint, mode);
-   trace_dump_arg(uint, start);
-   trace_dump_arg(uint, count);
-
-   pipe->draw_arrays(pipe, mode, start, count);
-
-   trace_dump_call_end();
-}
-
-
-static INLINE void
-trace_context_draw_elements(struct pipe_context *_pipe,
-                            struct pipe_resource *_indexBuffer,
-                            unsigned indexSize, int indexBias,
-                            unsigned mode, unsigned start, unsigned count)
-{
-   struct trace_context *tr_ctx = trace_context(_pipe);
-   struct trace_resource *tr_buf = trace_resource(_indexBuffer);
-   struct pipe_context *pipe = tr_ctx->pipe;
-   struct pipe_resource *indexBuffer = tr_buf->resource;
-
-   trace_dump_call_begin("pipe_context", "draw_elements");
-
-   trace_dump_arg(ptr, pipe);
-   trace_dump_arg(ptr, indexBuffer);
-   trace_dump_arg(uint, indexSize);
-   trace_dump_arg(int, indexBias);
-   trace_dump_arg(uint, mode);
-   trace_dump_arg(uint, start);
-   trace_dump_arg(uint, count);
-
-   pipe->draw_elements(pipe, indexBuffer, indexSize, indexBias,
-                       mode, start, count);
-
-   trace_dump_call_end();
-}
-
-
-static INLINE void
-trace_context_draw_range_elements(struct pipe_context *_pipe,
-                                  struct pipe_resource *_indexBuffer,
-                                  unsigned indexSize,
-                                  int indexBias,
-                                  unsigned minIndex,
-                                  unsigned maxIndex,
-                                  unsigned mode,
-                                  unsigned start,
-                                  unsigned count)
-{
-   struct trace_context *tr_ctx = trace_context(_pipe);
-   struct trace_resource *tr_buf = trace_resource(_indexBuffer);
-   struct pipe_context *pipe = tr_ctx->pipe;
-   struct pipe_resource *indexBuffer = tr_buf->resource;
-
-   trace_dump_call_begin("pipe_context", "draw_range_elements");
-
-   trace_dump_arg(ptr, pipe);
-   trace_dump_arg(ptr, indexBuffer);
-   trace_dump_arg(uint, indexSize);
-   trace_dump_arg(int, indexBias);
-   trace_dump_arg(uint, minIndex);
-   trace_dump_arg(uint, maxIndex);
-   trace_dump_arg(uint, mode);
-   trace_dump_arg(uint, start);
-   trace_dump_arg(uint, count);
-
-   pipe->draw_range_elements(pipe,
-                             indexBuffer, indexSize, indexBias,
-                             minIndex, maxIndex,
-                             mode, start, count);
-
-   trace_dump_call_end();
-}
-
-
 static INLINE void
 trace_context_draw_vbo(struct pipe_context *_pipe,
                        const struct pipe_draw_info *info)
@@ -1483,9 +1398,6 @@ trace_context_create(struct trace_screen *tr_scr,
    tr_ctx->base.screen = &tr_scr->base;
 
    tr_ctx->base.destroy = trace_context_destroy;
-   tr_ctx->base.draw_arrays = trace_context_draw_arrays;
-   tr_ctx->base.draw_elements = trace_context_draw_elements;
-   tr_ctx->base.draw_range_elements = trace_context_draw_range_elements;
    tr_ctx->base.draw_vbo = trace_context_draw_vbo;
    tr_ctx->base.create_query = trace_context_create_query;
    tr_ctx->base.destroy_query = trace_context_destroy_query;
index 3314b1e0e0f560302facdf30af4ed5f89c923a8e..0579962ec69212eabbffb38df998401e91a7759f 100644 (file)
@@ -61,47 +61,6 @@ struct pipe_context {
     * VBO drawing
     */
    /*@{*/
-   void (*draw_arrays)( struct pipe_context *pipe,
-                        unsigned mode, unsigned start, unsigned count);
-
-   void (*draw_elements)( struct pipe_context *pipe,
-                          struct pipe_resource *indexBuffer,
-                          unsigned indexSize,
-                          int indexBias,
-                          unsigned mode, unsigned start, unsigned count);
-
-   void (*draw_arrays_instanced)(struct pipe_context *pipe,
-                                 unsigned mode,
-                                 unsigned start,
-                                 unsigned count,
-                                 unsigned startInstance,
-                                 unsigned instanceCount);
-
-   void (*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);
-
-   /* XXX: this is (probably) a temporary entrypoint, as the range
-    * information should be available from the vertex_buffer state.
-    * Using this to quickly evaluate a specialized path in the draw
-    * module.
-    */
-   void (*draw_range_elements)( struct pipe_context *pipe,
-                                struct pipe_resource *indexBuffer,
-                                unsigned indexSize,
-                                int indexBias,
-                                unsigned minIndex,
-                                unsigned maxIndex,
-                                unsigned mode, 
-                                unsigned start, 
-                                unsigned count);
-
    void (*draw_vbo)( struct pipe_context *pipe,
                      const struct pipe_draw_info *info );