From 0932f0ff14ce02e35a1aad126c80fe329b92150d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 22 Jan 2014 02:57:28 +0100 Subject: [PATCH] radeonsi: inline si_upload_index_buffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Michel Dänzer Reviewed-by: Tom Stellard --- src/gallium/drivers/radeonsi/si_buffer.c | 7 ------- src/gallium/drivers/radeonsi/si_pipe.h | 5 ----- src/gallium/drivers/radeonsi/si_state_draw.c | 3 ++- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_buffer.c b/src/gallium/drivers/radeonsi/si_buffer.c index 6b05c9f52b8..79944052689 100644 --- a/src/gallium/drivers/radeonsi/si_buffer.c +++ b/src/gallium/drivers/radeonsi/si_buffer.c @@ -35,13 +35,6 @@ #include "si.h" #include "si_pipe.h" -void si_upload_index_buffer(struct si_context *sctx, - struct pipe_index_buffer *ib, unsigned count) -{ - u_upload_data(sctx->b.uploader, 0, count * ib->index_size, - ib->user_buffer, &ib->offset, &ib->buffer); -} - void si_upload_const_buffer(struct si_context *sctx, struct r600_resource **rbuffer, const uint8_t *ptr, unsigned size, uint32_t *const_offset) diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index d7d701bc7f9..bb4d82a9ad4 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -161,11 +161,6 @@ void si_flush_depth_textures(struct si_context *sctx, void si_decompress_color_textures(struct si_context *sctx, struct si_textures_info *textures); -/* si_buffer.c */ -void si_upload_index_buffer(struct si_context *sctx, - struct pipe_index_buffer *ib, unsigned count); - - /* si_pipe.c */ void si_flush(struct pipe_context *ctx, struct pipe_fence_handle **fence, unsigned flags); diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 45dd4baa470..f325a64040b 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -721,7 +721,8 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) si_translate_index_buffer(sctx, &ib, info->count); if (ib.user_buffer && !ib.buffer) { - si_upload_index_buffer(sctx, &ib, info->count); + u_upload_data(sctx->b.uploader, 0, info->count * ib.index_size, + ib.user_buffer, &ib.offset, &ib.buffer); } } -- 2.30.2