summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec_draw.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-01-27 21:15:19 +0100
committerMarek Olšák <[email protected]>2014-02-25 16:04:22 +0100
commit7e548d05076c430f9c532add478080bea82515ba (patch)
treed94dad927288bfba0f61b5af041c40a551677d6a /src/mesa/vbo/vbo_exec_draw.c
parentaea4933287d6deff2ef1729febb5bfabdc88c21e (diff)
mesa: add storage flags parameter to Driver.BufferData
It will be used by glBufferStorage. The parameters are chosen according to ARB_buffer_storage. Reviewed-by: Fredrik Höglund <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_exec_draw.c')
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 75115ce6631..46be65fc010 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -325,8 +325,12 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec )
exec->vtx.buffer_used = 0;
if (ctx->Driver.BufferData(ctx, GL_ARRAY_BUFFER_ARB,
- VBO_VERT_BUFFER_SIZE,
- NULL, usage, exec->vtx.bufferobj)) {
+ VBO_VERT_BUFFER_SIZE,
+ NULL, usage,
+ GL_MAP_WRITE_BIT |
+ GL_DYNAMIC_STORAGE_BIT |
+ GL_CLIENT_STORAGE_BIT,
+ exec->vtx.bufferobj)) {
/* buffer allocation worked, now map the buffer */
exec->vtx.buffer_map =
(GLfloat *)ctx->Driver.MapBufferRange(ctx,