summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-07-17 01:10:46 +0800
committerChia-I Wu <olv@lunarg.com>2010-07-17 03:24:46 +0800
commit79fadecea102c13c1876a6e0fc2a2f637ce1dae0 (patch)
tree40d43468390fd8d0351b5861830551b8c15eab6d
parent594969e078d9799495c7ff429dad967b42984411 (diff)
gallium: Keep only pipe_context::draw_vbo.gallium-unified-draw
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.
-rw-r--r--src/gallium/drivers/cell/ppu/cell_draw_arrays.c52
-rw-r--r--src/gallium/drivers/failover/fo_context.c35
-rw-r--r--src/gallium/drivers/galahad/glhd_context.c68
-rw-r--r--src/gallium/drivers/i915/i915_context.c52
-rw-r--r--src/gallium/drivers/i965/brw_draw.c52
-rw-r--r--src/gallium/drivers/identity/id_context.c68
-rw-r--r--src/gallium/drivers/llvmpipe/lp_draw_arrays.c137
-rw-r--r--src/gallium/drivers/nv50/nv50_context.c4
-rw-r--r--src/gallium/drivers/nv50/nv50_context.h18
-rw-r--r--src/gallium/drivers/nv50/nv50_vbo.c21
-rw-r--r--src/gallium/drivers/nvfx/nvfx_context.c2
-rw-r--r--src/gallium/drivers/nvfx/nvfx_context.h7
-rw-r--r--src/gallium/drivers/nvfx/nvfx_vbo.c4
-rw-r--r--src/gallium/drivers/r300/r300_render.c68
-rw-r--r--src/gallium/drivers/r300/r300_render_stencilref.c55
-rw-r--r--src/gallium/drivers/r600/r600_context.c3
-rw-r--r--src/gallium/drivers/r600/r600_context.h11
-rw-r--r--src/gallium/drivers/r600/r600_draw.c50
-rw-r--r--src/gallium/drivers/rbug/rbug_context.c86
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c5
-rw-r--r--src/gallium/drivers/softpipe/sp_draw_arrays.c137
-rw-r--r--src/gallium/drivers/softpipe/sp_state.h35
-rw-r--r--src/gallium/drivers/svga/svga_pipe_draw.c25
-rw-r--r--src/gallium/drivers/trace/tr_context.c88
-rw-r--r--src/gallium/include/pipe/p_context.h41
25 files changed, 7 insertions, 1117 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_draw_arrays.c b/src/gallium/drivers/cell/ppu/cell_draw_arrays.c
index 739dd1eabb..2f395f1a07 100644
--- a/src/gallium/drivers/cell/ppu/cell_draw_arrays.c
+++ b/src/gallium/drivers/cell/ppu/cell_draw_arrays.c
@@ -110,61 +110,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 pipe_draw_info info;
-
- memset(&info, 0, sizeof(info));
- info.index_buffer = indexBuffer;
- info.index_size = indexSize;
- info.index_bias = indexBias;
- info.range_valid = TRUE;
- info.min_index = minIndex;
- info.max_index = maxIndex;
- info.mode = mode;
- info.start = start;
- info.count = count;
- info.start_instance = 0;
- info.instance_count = 1;
-
- cell_draw_vbo(pipe, &info);
-}
-
-
-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;
}
diff --git a/src/gallium/drivers/failover/fo_context.c b/src/gallium/drivers/failover/fo_context.c
index 10c4c5424f..66adf53564 100644
--- a/src/gallium/drivers/failover/fo_context.c
+++ b/src/gallium/drivers/failover/fo_context.c
@@ -87,39 +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 pipe_draw_info info;
-
- memset(&info, 0, sizeof(info));
- info.mode = prim;
- info.start = start;
- info.count = count;
-
- info.index_buffer = indexResource;
- info.index_size = indexSize;
- info.index_bias = indexBias;
- info.range_valid = FALSE;
-
- info.instance_count = 1;
-
- failover_draw_vbo(pipe, &info);
-}
-
-
-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,
@@ -152,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;
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index 53fe9fa3b4..52c450e0a0 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -48,71 +48,6 @@ galahad_destroy(struct pipe_context *_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)
{
@@ -950,9 +885,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;
diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c
index 74222a0971..08da488eef 100644
--- a/src/gallium/drivers/i915/i915_context.c
+++ b/src/gallium/drivers/i915/i915_context.c
@@ -106,55 +106,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 pipe_draw_info info;
-
- memset(&info, 0, sizeof(info));
- info.mode = prim;
- info.start = start;
- info.count = count;
-
- info.index_buffer = indexBuffer;
- info.index_size = indexSize;
- info.index_bias = indexBias;
- info.range_valid = TRUE;
- info.min_index = min_index;
- info.max_index = max_index;
-
- info.instance_count = 1;
-
- i915_draw_vbo(pipe, &info);
-}
-
-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
@@ -198,9 +149,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;
/*
diff --git a/src/gallium/drivers/i965/brw_draw.c b/src/gallium/drivers/i965/brw_draw.c
index 0a0dfe5a79..f9649c43f5 100644
--- a/src/gallium/drivers/i965/brw_draw.c
+++ b/src/gallium/drivers/i965/brw_draw.c
@@ -230,63 +230,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 pipe_draw_info info;
-
- memset(&info, 0, sizeof(info));
- info.mode = mode;
- info.start = start;
- info.count = count;
-
- info.index_buffer = index_buffer;
- info.index_size = index_size;
- info.index_bias = index_bias;
- info.range_valid = TRUE;
- info.min_index = min_index;
- info.max_index = max_index;
-
- info.instance_count = 1;
-
- brw_draw_vbo(pipe, &info);
-}
-
-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:
diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c
index 177f9fe1b3..b23e805912 100644
--- a/src/gallium/drivers/identity/id_context.c
+++ b/src/gallium/drivers/identity/id_context.c
@@ -46,71 +46,6 @@ identity_destroy(struct pipe_context *_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)
{
@@ -905,9 +840,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;
diff --git a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
index e37352f60f..52c53d0306 100644
--- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
+++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
@@ -118,145 +118,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 pipe_draw_info info;
-
- memset(&info, 0, sizeof(info));
- info.index_buffer = indexBuffer;
- info.index_size = indexSize;
- info.index_bias = indexBias;
- info.range_valid = TRUE;
- info.min_index = minIndex;
- info.max_index = maxIndex;
- info.mode = mode;
- info.start = start;
- info.count = count;
- info.start_instance = startInstance;
- info.instance_count = instanceCount;
-
- llvmpipe_draw_vbo(pipe, &info);
-}
-
-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;
}
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index 3fc39c1137..0874cb5e4e 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -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;
diff --git a/src/gallium/drivers/nv50/nv50_context.h b/src/gallium/drivers/nv50/nv50_context.h
index da2c9b0f1d..519f24c251 100644
--- a/src/gallium/drivers/nv50/nv50_context.h
+++ b/src/gallium/drivers/nv50/nv50_context.h
@@ -177,24 +177,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);
diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
index 97a173fc99..54e025816b 100644
--- a/src/gallium/drivers/nv50/nv50_vbo.c
+++ b/src/gallium/drivers/nv50/nv50_vbo.c
@@ -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,
@@ -464,16 +457,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)
{
if (info->index_buffer) {
diff --git a/src/gallium/drivers/nvfx/nvfx_context.c b/src/gallium/drivers/nvfx/nvfx_context.c
index f30795f69a..7218abff22 100644
--- a/src/gallium/drivers/nvfx/nvfx_context.c
+++ b/src/gallium/drivers/nvfx/nvfx_context.c
@@ -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;
diff --git a/src/gallium/drivers/nvfx/nvfx_context.h b/src/gallium/drivers/nvfx/nvfx_context.h
index d905de0dab..9eb9d9c273 100644
--- a/src/gallium/drivers/nvfx/nvfx_context.h
+++ b/src/gallium/drivers/nvfx/nvfx_context.h
@@ -235,13 +235,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);
diff --git a/src/gallium/drivers/nvfx/nvfx_vbo.c b/src/gallium/drivers/nvfx/nvfx_vbo.c
index 9a11545685..a6b91aa53d 100644
--- a/src/gallium/drivers/nvfx/nvfx_vbo.c
+++ b/src/gallium/drivers/nvfx/nvfx_vbo.c
@@ -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,
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index ac49a3881d..990ab3ef33 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -567,19 +567,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)
{
@@ -670,6 +657,7 @@ static void r300_draw_vbo(struct pipe_context* pipe,
* keep these functions separated so that they are easier to locate. ~C. *
***************************************************************************/
+/* SW TCL elements, using Draw. */
static void r300_swtcl_draw_vbo(struct pipe_context* pipe,
const struct pipe_draw_info *info)
{
@@ -739,53 +727,6 @@ static void r300_swtcl_draw_vbo(struct pipe_context* pipe,
}
}
-static void r300_swtcl_draw_arrays(struct pipe_context* pipe,
- unsigned mode,
- unsigned start,
- unsigned count)
-{
- struct pipe_draw_info info;
-
- memset(&info, 0, sizeof(info));
- info.mode = mode;
- info.start = start;
- info.count = count;
-
- info.instance_count = 1;
-
- r300_swtcl_draw_vbo(pipe, &info);
-}
-
-/* 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 pipe_draw_info info;
-
- memset(&info, 0, sizeof(info));
- info.mode = mode;
- info.start = start;
- info.count = count;
-
- info.index_buffer = indexBuffer;
- info.index_size = indexSize;
- info.index_bias = indexBias;
- info.range_valid = TRUE;
- info.min_index = minIndex;
- info.max_index = maxIndex;
-
- info.instance_count = 1;
-
- r300_swtcl_draw_vbo(pipe, &info);
-}
-
/* Object for rendering using Draw. */
struct r300_render {
/* Parent class */
@@ -1182,17 +1123,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;
}
diff --git a/src/gallium/drivers/r300/r300_render_stencilref.c b/src/gallium/drivers/r300/r300_render_stencilref.c
index 6d801cf159..1f035d64a2 100644
--- a/src/gallium/drivers/r300/r300_render_stencilref.c
+++ b/src/gallium/drivers/r300/r300_render_stencilref.c
@@ -34,14 +34,6 @@
#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;
}
diff --git a/src/gallium/drivers/r600/r600_context.c b/src/gallium/drivers/r600/r600_context.c
index f14e37e17c..cbc638f025 100644
--- a/src/gallium/drivers/r600/r600_context.c
+++ b/src/gallium/drivers/r600/r600_context.c
@@ -73,9 +73,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;
diff --git a/src/gallium/drivers/r600/r600_context.h b/src/gallium/drivers/r600/r600_context.h
index 9d0e5cbbf9..46e7f2dfb1 100644
--- a/src/gallium/drivers/r600/r600_context.h
+++ b/src/gallium/drivers/r600/r600_context.h
@@ -73,17 +73,6 @@ static INLINE struct r600_context *r600_context(struct pipe_context *pipe)
return (struct r600_context*)pipe;
}
-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);
diff --git a/src/gallium/drivers/r600/r600_draw.c b/src/gallium/drivers/r600/r600_draw.c
index 6316aeccf4..648f21532a 100644
--- a/src/gallium/drivers/r600/r600_draw.c
+++ b/src/gallium/drivers/r600/r600_draw.c
@@ -166,56 +166,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_draw draw;
diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
index 0ea9081f5f..557bb8afe3 100644
--- a/src/gallium/drivers/rbug/rbug_context.c
+++ b/src/gallium/drivers/rbug/rbug_context.c
@@ -103,89 +103,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)
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
@@ -1059,9 +976,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;
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index 2c982391c4..38985cea17 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -283,11 +283,6 @@ softpipe_create_context( struct pipe_screen *screen,
softpipe->pipe.set_stream_output_buffers = softpipe_set_stream_output_buffers;
softpipe->pipe.set_vertex_buffers = softpipe_set_vertex_buffers;
- 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;
diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c
index 6692adcb7e..9e18c43833 100644
--- a/src/gallium/drivers/softpipe/sp_draw_arrays.c
+++ b/src/gallium/drivers/softpipe/sp_draw_arrays.c
@@ -183,140 +183,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 pipe_draw_info info;
-
- memset(&info, 0, sizeof(info));
- info.index_buffer = indexBuffer;
- info.index_size = indexSize;
- info.index_bias = indexBias;
- info.range_valid = TRUE;
- info.min_index = minIndex;
- info.max_index = maxIndex;
- info.mode = mode;
- info.start = start;
- info.count = count;
- info.start_instance = startInstance;
- info.instance_count = instanceCount;
-
- softpipe_draw_vbo(pipe, &info);
-}
-
-
-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);
-}
-
diff --git a/src/gallium/drivers/softpipe/sp_state.h b/src/gallium/drivers/softpipe/sp_state.h
index 0cf0b55306..d8c574fcbe 100644
--- a/src/gallium/drivers/softpipe/sp_state.h
+++ b/src/gallium/drivers/softpipe/sp_state.h
@@ -225,41 +225,6 @@ void softpipe_set_vertex_buffers(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);
diff --git a/src/gallium/drivers/svga/svga_pipe_draw.c b/src/gallium/drivers/svga/svga_pipe_draw.c
index b780ae0c17..9119d4c836 100644
--- a/src/gallium/drivers/svga/svga_pipe_draw.c
+++ b/src/gallium/drivers/svga/svga_pipe_draw.c
@@ -227,28 +227,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)
{
svga_draw_range_elements(pipe, info->index_buffer,
@@ -261,8 +239,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;
}
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 5947c761b9..c7013f426e 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -83,91 +83,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)
{
@@ -1466,9 +1381,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;
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index e85d115f8a..0c98ddcd15 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -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 );