r600g: Fix buffer offsets
authorJakob Bornecrantz <wallbraker@gmail.com>
Thu, 13 May 2010 19:27:19 +0000 (20:27 +0100)
committerJerome Glisse <jglisse@redhat.com>
Thu, 27 May 2010 21:24:07 +0000 (23:24 +0200)
Signed-off-by: Jakob Bornecrantz <wallbraker@gmail.com>
src/gallium/drivers/r600/r600_buffer.c

index 634a02b686e50ec697a30d424e0297cd627f99e4..fd94c605bb1f5d99f93b7014c3060a403cb16207 100644 (file)
@@ -151,7 +151,7 @@ static void *r600_buffer_transfer_map(struct pipe_context *pipe,
        int write = 0;
 
        if (rbuffer->pb) {
-               return pb_map(rbuffer->pb, transfer->usage) + transfer->box.x;
+               return (uint8_t*)pb_map(rbuffer->pb, transfer->usage) + transfer->box.x;
        }
        if (transfer->usage & PIPE_TRANSFER_DONTBLOCK) {
                /* FIXME */
@@ -162,7 +162,7 @@ static void *r600_buffer_transfer_map(struct pipe_context *pipe,
        if (radeon_bo_map(rscreen->rw, rbuffer->bo)) {
                return NULL;
        }
-       return rbuffer->bo->data + transfer->box.x;
+       return (uint8_t*)rbuffer->bo->data + transfer->box.x;
 }
 
 static void r600_buffer_transfer_unmap(struct pipe_context *pipe,