summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2011-08-22 10:52:47 -0700
committerIan Romanick <ian.d.romanick@intel.com>2011-08-23 14:52:12 -0700
commit0d636213d491f88726155e12c3b445a88e0f1cd8 (patch)
tree867f8dcfe094eb9acc45a48a963f39f5f9e4deeb /src/mesa
parent2ea1ff38164d95f8291ef2e5dfe2cb13936a60f2 (diff)
i965: Only map the necessary buffer range in brw_prepare_indices
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index ed1964f5a6f..7bc69c612e3 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -690,11 +690,10 @@ static void brw_prepare_indices(struct brw_context *brw)
*/
if ((get_size(index_buffer->type) - 1) & offset) {
GLubyte *map = ctx->Driver.MapBufferRange(ctx,
- 0,
- bufferobj->Size,
+ offset,
+ ib_size,
GL_MAP_WRITE_BIT,
bufferobj);
- map += offset;
intel_upload_data(&brw->intel, map, ib_size, ib_type_size,
&bo, &offset);