Module: Mesa
Branch: master
Commit: 9abfc5ef60ba26505a333bdd0f17a83c90ce316a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9abfc5ef60ba26505a333bdd0f17a83c90ce316a

Author: Jakob Bornecrantz <[email protected]>
Date:   Thu May 13 20:27:19 2010 +0100

r600g: Fix buffer offsets

Signed-off-by: Jakob Bornecrantz <[email protected]>

---

 src/gallium/drivers/r600/r600_buffer.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_buffer.c 
b/src/gallium/drivers/r600/r600_buffer.c
index 634a02b..fd94c60 100644
--- a/src/gallium/drivers/r600/r600_buffer.c
+++ b/src/gallium/drivers/r600/r600_buffer.c
@@ -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,

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to