summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-04-13 19:27:45 +0200
committerMarek Olšák <[email protected]>2012-04-18 16:19:38 +0200
commit76d9a99d6bafa5b2ad7839a79deda1a7d5e6d902 (patch)
tree53b5c5da342ad6271c7cc02c50490982928eae6a /src/mesa/state_tracker/st_context.c
parent0ef90e52d1c1898ae1e4618536a85622689c0b19 (diff)
st/mesa: use u_upload_mgr to upload vertices for glBitmap
instead of recreating the vertex buffer for each draw_vbo call.
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index a3fd4dbcb7f..0245fd92b3e 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -63,6 +63,7 @@
#include "st_program.h"
#include "pipe/p_context.h"
#include "util/u_inlines.h"
+#include "util/u_upload_mgr.h"
#include "cso_cache/cso_context.h"
@@ -130,6 +131,7 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe )
st->dirty.mesa = ~0;
st->dirty.st = ~0;
+ st->uploader = u_upload_create(st->pipe, 65536, 4, PIPE_BIND_VERTEX_BUFFER);
st->cso_context = cso_create_context(pipe);
st_init_atoms( st );
@@ -235,6 +237,7 @@ static void st_destroy_context_priv( struct st_context *st )
st->default_texture = NULL;
}
+ u_upload_destroy(st->uploader);
free( st );
}