swrast-dri: Silence several "warning: unused parameter"
[mesa.git] / src / mesa / drivers / dri / i965 / brw_draw_upload.c
index 2049850417b4f0b9364e7d8015180f775a36ca1e..7bc69c612e321b89480221aced8406300b36d5f2 100644 (file)
@@ -689,11 +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_ELEMENT_ARRAY_BUFFER_ARB,
-                                                GL_DYNAMIC_DRAW_ARB,
-                                                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);