radeonsi: inline si_upload_index_buffer
authorMarek Olšák <marek.olsak@amd.com>
Wed, 22 Jan 2014 01:57:28 +0000 (02:57 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 28 Jan 2014 00:39:53 +0000 (01:39 +0100)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
src/gallium/drivers/radeonsi/si_buffer.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_state_draw.c

index 6b05c9f52b8003466ff0f0d99f20de4f9ffc20df..79944052689a99565ba873c555d8eb991f23f29a 100644 (file)
 #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)
index d7d701bc7f90eb5086bd21410154aa096bef1e39..bb4d82a9ad4b1527532e258a1b942a1c784b9f92 100644 (file)
@@ -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);
index 45dd4baa4709b19101fa87a9b6a17cf3c4d866fc..f325a64040b261d713f108c37103494f9505de69 100644 (file)
@@ -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);
                }
        }