From 2ca3548eb926e0c89a3ef72bb07dedf85d3c250a Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 27 Jan 2017 01:42:41 +0100 Subject: gallium/radeon: remove the internal u_upload_mgr pointer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit also remove the BIND flags Reviewed-by: Nicolai Hähnle Tested-by: Edmondo Tommasina Tested-by: Charmaine Lee --- src/gallium/drivers/radeonsi/si_compute.c | 8 ++++---- src/gallium/drivers/radeonsi/si_descriptors.c | 7 ++++--- src/gallium/drivers/radeonsi/si_state_draw.c | 6 ++++-- 3 files changed, 12 insertions(+), 9 deletions(-) (limited to 'src/gallium/drivers/radeonsi') diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index d05c488f38c..aae651c4f62 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -503,9 +503,9 @@ static void si_setup_user_sgprs_co_v2(struct si_context *sctx, dispatch.kernarg_address = kernel_args_va; - u_upload_data(sctx->b.uploader, 0, sizeof(dispatch), 256, - &dispatch, &dispatch_offset, - (struct pipe_resource**)&dispatch_buf); + u_upload_data(sctx->b.b.stream_uploader, 0, sizeof(dispatch), + 256, &dispatch, &dispatch_offset, + (struct pipe_resource**)&dispatch_buf); if (!dispatch_buf) { fprintf(stderr, "Error: Failed to allocate dispatch " @@ -565,7 +565,7 @@ static void si_upload_compute_input(struct si_context *sctx, /* The extra num_work_size_bytes are for work group / work item size information */ kernel_args_size = program->input_size + num_work_size_bytes; - u_upload_alloc(sctx->b.uploader, 0, kernel_args_size, 256, + u_upload_alloc(sctx->b.b.stream_uploader, 0, kernel_args_size, 256, &kernel_args_offset, (struct pipe_resource**)&input_buffer, &kernel_args_ptr); diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index b0faf421a44..3c981761dc5 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -234,7 +234,7 @@ static bool si_upload_descriptors(struct si_context *sctx, } else { void *ptr; - u_upload_alloc(sctx->b.uploader, 0, list_size, 256, + u_upload_alloc(sctx->b.b.stream_uploader, 0, list_size, 256, &desc->buffer_offset, (struct pipe_resource**)&desc->buffer, &ptr); if (!desc->buffer) @@ -961,7 +961,8 @@ bool si_upload_vertex_buffer_descriptors(struct si_context *sctx) * directly through a staging buffer and don't go through * the fine-grained upload path. */ - u_upload_alloc(sctx->b.uploader, 0, velems->desc_list_byte_size, 256, + u_upload_alloc(sctx->b.b.stream_uploader, 0, + velems->desc_list_byte_size, 256, &desc->buffer_offset, (struct pipe_resource**)&desc->buffer, (void**)&ptr); if (!desc->buffer) @@ -1068,7 +1069,7 @@ void si_upload_const_buffer(struct si_context *sctx, struct r600_resource **rbuf { void *tmp; - u_upload_alloc(sctx->b.uploader, 0, size, 256, const_offset, + u_upload_alloc(sctx->b.b.stream_uploader, 0, size, 256, const_offset, (struct pipe_resource**)rbuffer, &tmp); if (*rbuffer) util_memcpy_cpu_to_le32(tmp, ptr, size); diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 643ff745173..d4533093e46 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -1054,7 +1054,8 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) si_get_draw_start_count(sctx, info, &start, &count); start_offset = start * ib.index_size; - u_upload_alloc(sctx->b.uploader, start_offset, count * 2, 256, + u_upload_alloc(ctx->stream_uploader, start_offset, + count * 2, 256, &out_offset, &out_buffer, &ptr); if (!out_buffer) { pipe_resource_reference(&ib.buffer, NULL); @@ -1077,7 +1078,8 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) si_get_draw_start_count(sctx, info, &start, &count); start_offset = start * ib.index_size; - u_upload_data(sctx->b.uploader, start_offset, count * ib.index_size, + u_upload_data(ctx->stream_uploader, start_offset, + count * ib.index_size, 256, (char*)ib.user_buffer + start_offset, &ib.offset, &ib.buffer); if (!ib.buffer) -- cgit v1.2.3