summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorRoland Scheidegger <rscheidegger@gmx.ch>2004-02-06 15:24:51 +0000
committerRoland Scheidegger <rscheidegger@gmx.ch>2004-02-06 15:24:51 +0000
commitc2f28a3fd1b3831efb34ce8cb472381efd9456b3 (patch)
treed1750c8b4cbc7b6bce2698fbbac86ff0b1201a46 /src/mesa
parent786e822cd4e4f5fb7a4177f7711683b14d2f2bc9 (diff)
align blits for texture rectangles correctly, fix potential problem overwriting dma region
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r200/r200_texmem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_texmem.c b/src/mesa/drivers/dri/r200/r200_texmem.c
index ed0ca58690..473520a950 100644
--- a/src/mesa/drivers/dri/r200/r200_texmem.c
+++ b/src/mesa/drivers/dri/r200/r200_texmem.c
@@ -231,7 +231,7 @@ static void r200UploadRectSubImage( r200ContextPtr rmesa,
tex = (char *)texImage->Data + done * src_pitch;
memset(&region, 0, sizeof(region));
- r200AllocDmaRegion( rmesa, &region, lines * dstPitch, 64 );
+ r200AllocDmaRegion( rmesa, &region, lines * dstPitch, 1024 );
/* Copy texdata to dma:
*/
@@ -240,10 +240,10 @@ static void r200UploadRectSubImage( r200ContextPtr rmesa,
__FUNCTION__, src_pitch, dstPitch);
if (src_pitch == dstPitch) {
- memcpy( region.address, tex, lines * src_pitch );
+ memcpy( region.address + region.start, tex, lines * src_pitch );
}
else {
- char *buf = region.address;
+ char *buf = region.address + region.start;
int i;
for (i = 0 ; i < lines ; i++) {
memcpy( buf, tex, src_pitch );