i965: Fix access mode of index buffer rebase.
authorEric Anholt <eric@anholt.net>
Wed, 23 Jan 2013 23:23:43 +0000 (15:23 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 11 Feb 2013 21:14:51 +0000 (13:14 -0800)
It doesn't matter with our current implementation of MapBufferRange,
but it was wrong -- the result pointer is read by intel_upload_data().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_draw_upload.c

index e7f45ada482015cc619c5b9256f306de11c0b1da..29ec9bb49dc7a86d04e2522ff8c7efb37cfb4ad0 100644 (file)
@@ -811,7 +811,7 @@ static void brw_upload_indices(struct brw_context *brw)
           GLubyte *map = ctx->Driver.MapBufferRange(ctx,
                                                     offset,
                                                     ib_size,
-                                                    GL_MAP_WRITE_BIT,
+                                                    GL_MAP_READ_BIT,
                                                     bufferobj);
 
           intel_upload_data(&brw->intel, map, ib_size, ib_type_size,