From 1e20112abd83e6fb2697f2e81aff00ab3fc443fe Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 27 Jan 2017 02:20:04 +0100 Subject: st/mesa: use the common uploader (v2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v2: use const_uploader Reviewed-by: Nicolai Hähnle Tested-by: Edmondo Tommasina (v1) Tested-by: Charmaine Lee --- src/mesa/state_tracker/st_context.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) (limited to 'src/mesa/state_tracker/st_context.c') 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); -- cgit v1.2.3