mesa/st: fix tracking of mapped buffer ranges
authorKeith Whitwell <keithw@vmware.com>
Tue, 9 Jun 2009 17:32:18 +0000 (18:32 +0100)
committerKeith Whitwell <keithw@vmware.com>
Tue, 9 Jun 2009 17:32:18 +0000 (18:32 +0100)
In st_bufferobj_map_range(), set obj->Offset consistently with its
usage elsewhere.

src/mesa/state_tracker/st_cb_bufferobjects.c

index fbe6aa25de6b48af3938ad2912121a5c40c6dee9..19a0e6736237b3f6fab4596442b549c0b2db4359 100644 (file)
@@ -250,7 +250,7 @@ st_bufferobj_map_range(GLcontext *ctx, GLenum target,
 
    map = obj->Pointer = pipe_buffer_map_range(pipe->screen, st_obj->buffer, offset, length, flags);
    if(obj->Pointer) {
-      obj->Offset = 0;
+      obj->Offset = offset;
       obj->Length = length;
       map += offset;
    }