diff mbox

[Bug,33494] crash during (or at end) of map loading in ut2004

Message ID 20110125201311.E2A2013004E@annarchy.freedesktop.org (mailing list archive)
State New, archived
Headers show

Commit Message

bugzilla-daemon@freedesktop.org Jan. 25, 2011, 8:13 p.m. UTC
None
diff mbox

Patch

diff --git a/src/gallium/drivers/r600/r600_upload.c
b/src/gallium/drivers/r600/r600_upload.c
index 44102ff..ba19185 100644
--- a/src/gallium/drivers/r600/r600_upload.c
+++ b/src/gallium/drivers/r600/r600_upload.c
@@ -103,7 +103,11 @@  int r600_upload_buffer(struct r600_upload *upload,
unsigned offset,
        }

        in_ptr = in_buffer->user_buffer;
-       memcpy(upload->ptr + upload->offset, (uint8_t *) in_ptr + offset,
size);
+       uint8_t * ptr_src = (uint8_t *) upload->ptr + upload->offset;
+       uint8_t * ptr_dest = (uint8_t *) in_ptr + offset;
+       //R600_ERR("memcpy src %d dest %d size %d\n", ptr_src, ptr_dest, size);
+       fprintf(stdout, "memcpy src %p dest %p size %d\n", ptr_src, ptr_dest,
size);
+       memcpy(ptr_src, ptr_dest, size);