From a57f84251926045a3358822d0fd92ca95a4f0fde Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sat, 17 Jul 2010 01:10:46 +0800 Subject: gallium: Keep only pipe_context::draw_vbo. 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. --- src/gallium/drivers/softpipe/sp_draw_arrays.c | 150 -------------------------- 1 file changed, 150 deletions(-) (limited to 'src/gallium/drivers/softpipe/sp_draw_arrays.c') diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c index 2855f55a0e..3a33cdef96 100644 --- a/src/gallium/drivers/softpipe/sp_draw_arrays.c +++ b/src/gallium/drivers/softpipe/sp_draw_arrays.c @@ -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); -} - -- cgit v1.2.3