diff options
author | Marek Olšák <[email protected]> | 2017-01-27 01:42:41 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-02-14 21:46:16 +0100 |
commit | 2ca3548eb926e0c89a3ef72bb07dedf85d3c250a (patch) | |
tree | babf7539e0b0fc06e26a881be8278154b025ae74 /src/gallium/drivers/radeon | |
parent | 1e20112abd83e6fb2697f2e81aff00ab3fc443fe (diff) |
gallium/radeon: remove the internal u_upload_mgr pointer
also remove the BIND flags
Reviewed-by: Nicolai Hähnle <[email protected]>
Tested-by: Edmondo Tommasina <[email protected]>
Tested-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_buffer_common.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 17 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.h | 1 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c index 86163b8c90f..9e5a8a6dff8 100644 --- a/src/gallium/drivers/radeon/r600_buffer_common.c +++ b/src/gallium/drivers/radeon/r600_buffer_common.c @@ -367,8 +367,10 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx, unsigned offset; struct r600_resource *staging = NULL; - u_upload_alloc(rctx->uploader, 0, box->width + (box->x % R600_MAP_BUFFER_ALIGNMENT), - 256, &offset, (struct pipe_resource**)&staging, (void**)&data); + u_upload_alloc(ctx->stream_uploader, 0, + box->width + (box->x % R600_MAP_BUFFER_ALIGNMENT), + 256, &offset, (struct pipe_resource**)&staging, + (void**)&data); if (staging) { data += box->x % R600_MAP_BUFFER_ALIGNMENT; diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 732f5c348c1..53d3dc6935d 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -193,7 +193,8 @@ void r600_draw_rectangle(struct blitter_context *blitter, /* Upload vertices. The hw rectangle has only 3 vertices, * I guess the 4th one is derived from the first 3. * The vertex specification should match u_blitter's vertex element state. */ - u_upload_alloc(rctx->uploader, 0, sizeof(float) * 24, 256, &offset, &buf, (void**)&vb); + u_upload_alloc(rctx->b.stream_uploader, 0, sizeof(float) * 24, 256, + &offset, &buf, (void**)&vb); if (!buf) return; @@ -601,13 +602,11 @@ bool r600_common_context_init(struct r600_common_context *rctx, if (!rctx->allocator_zeroed_memory) return false; - rctx->uploader = u_upload_create(&rctx->b, 1024 * 1024, - PIPE_BIND_INDEX_BUFFER | - PIPE_BIND_CONSTANT_BUFFER, PIPE_USAGE_STREAM); - if (!rctx->uploader) + rctx->b.stream_uploader = u_upload_create(&rctx->b, 1024 * 1024, + 0, PIPE_USAGE_STREAM); + if (!rctx->b.stream_uploader) return false; - rctx->b.stream_uploader = rctx->uploader; - rctx->b.const_uploader = rctx->uploader; + rctx->b.const_uploader = rctx->b.stream_uploader; rctx->ctx = rctx->ws->ctx_create(rctx->ws); if (!rctx->ctx) @@ -649,8 +648,8 @@ void r600_common_context_cleanup(struct r600_common_context *rctx) if (rctx->ctx) rctx->ws->ctx_destroy(rctx->ctx); - if (rctx->uploader) { - u_upload_destroy(rctx->uploader); + if (rctx->b.stream_uploader) { + u_upload_destroy(rctx->b.stream_uploader); } slab_destroy_child(&rctx->pool_transfers); diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index 6eff9aaf095..a01351c93bc 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -567,7 +567,6 @@ struct r600_common_context { unsigned last_dirty_tex_counter; unsigned last_compressed_colortex_counter; - struct u_upload_mgr *uploader; struct u_suballocator *allocator_zeroed_memory; struct slab_child_pool pool_transfers; |