i965: clip: Remove no-longer-needed variables.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_draw_upload.c
index 9acec45799a6c8b3bd5f0a0cc4e538ec07a7422e..7bc69c612e321b89480221aced8406300b36d5f2 100644 (file)
@@ -689,8 +689,11 @@ 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_WRITE_ONLY, bufferobj);
-           map += offset;
+           GLubyte *map = ctx->Driver.MapBufferRange(ctx,
+                                                    offset,
+                                                    ib_size,
+                                                    GL_MAP_WRITE_BIT,
+                                                    bufferobj);
 
           intel_upload_data(&brw->intel, map, ib_size, ib_type_size,
                             &bo, &offset);