aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c4
-rw-r--r--src/mesa/main/api_arrayelt.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 66c42aa0779..9acec45799a 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -689,9 +689,7 @@ static void brw_prepare_indices(struct brw_context *brw)
* rebase it into a temporary.
*/
if ((get_size(index_buffer->type) - 1) & offset) {
- GLubyte *map = ctx->Driver.MapBuffer(ctx,
- GL_DYNAMIC_DRAW_ARB,
- bufferobj);
+ GLubyte *map = ctx->Driver.MapBuffer(ctx, GL_WRITE_ONLY, bufferobj);
map += offset;
intel_upload_data(&brw->intel, map, ib_size, ib_type_size,
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index 6400c8f59d7..8e1e3ff8dd5 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -1602,9 +1602,7 @@ void _ae_map_vbos( struct gl_context *ctx )
_ae_update_state(ctx);
for (i = 0; i < actx->nr_vbos; i++)
- ctx->Driver.MapBuffer(ctx,
- GL_DYNAMIC_DRAW_ARB,
- actx->vbo[i]);
+ ctx->Driver.MapBuffer(ctx, GL_READ_ONLY, actx->vbo[i]);
if (actx->nr_vbos)
actx->mapped_vbos = GL_TRUE;