diff options
author | Marek Olšák <[email protected]> | 2017-01-27 02:20:04 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-02-14 21:46:16 +0100 |
commit | 1e20112abd83e6fb2697f2e81aff00ab3fc443fe (patch) | |
tree | c26c06a0883adb620457e0938d8c041404d979ff /src/mesa/state_tracker/st_context.c | |
parent | d3de8e1096662d6e0865db5724e550e5f42a36fa (diff) |
st/mesa: use the common uploader (v2)
v2: use const_uploader
Reviewed-by: Nicolai Hähnle <[email protected]>
Tested-by: Edmondo Tommasina <[email protected]> (v1)
Tested-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 55237345fc1..3d0455f9326 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -298,14 +298,6 @@ st_destroy_context_priv(struct st_context *st, bool destroy_pipe) } } - u_upload_destroy(st->uploader); - if (st->indexbuf_uploader) { - u_upload_destroy(st->indexbuf_uploader); - } - if (st->constbuf_uploader) { - u_upload_destroy(st->constbuf_uploader); - } - /* free glDrawPixels cache data */ free(st->drawpix_cache.image); pipe_resource_reference(&st->drawpix_cache.texture, NULL); @@ -345,22 +337,10 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe, st->dirty = ST_ALL_STATES_MASK; - /* Create upload manager for vertex data for glBitmap, glDrawPixels, - * glClear, etc. - */ - st->uploader = u_upload_create(pipe, 65536, PIPE_BIND_VERTEX_BUFFER, - PIPE_USAGE_STREAM); - - if (!screen->get_param(screen, PIPE_CAP_USER_INDEX_BUFFERS)) { - st->indexbuf_uploader = u_upload_create(pipe, 128 * 1024, - PIPE_BIND_INDEX_BUFFER, - PIPE_USAGE_STREAM); - } - - if (!screen->get_param(screen, PIPE_CAP_USER_CONSTANT_BUFFERS)) - st->constbuf_uploader = u_upload_create(pipe, 128 * 1024, - PIPE_BIND_CONSTANT_BUFFER, - PIPE_USAGE_STREAM); + st->has_user_indexbuf = + screen->get_param(screen, PIPE_CAP_USER_INDEX_BUFFERS); + st->has_user_constbuf = + screen->get_param(screen, PIPE_CAP_USER_CONSTANT_BUFFERS); st->cso_context = cso_create_context(pipe); |