diff options
author | Marek Olšák <[email protected]> | 2015-12-19 17:54:31 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-01-02 15:15:45 +0100 |
commit | ecb2da1559bcb9a9eec7ac224c8ff47b026c95ff (patch) | |
tree | 33acc93ea88f258e8941cb9270f1dfaa5195cf14 /src/mesa/state_tracker | |
parent | 37d0aea772a39f9ae7fe3d791e23c1be03ccf9de (diff) |
u_upload_mgr: allow specifying PIPE_USAGE_* for the upload buffer
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 4f6d379723f..2fb792d628f 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -172,16 +172,19 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe, /* Create upload manager for vertex data for glBitmap, glDrawPixels, * glClear, etc. */ - st->uploader = u_upload_create(st->pipe, 65536, PIPE_BIND_VERTEX_BUFFER); + st->uploader = u_upload_create(st->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(st->pipe, 128 * 1024, - PIPE_BIND_INDEX_BUFFER); + 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_BIND_CONSTANT_BUFFER, + PIPE_USAGE_STREAM); st->cso_context = cso_create_context(pipe); |