mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 16:28:08 +02:00
align blits for texture rectangles correctly, fix potential problem overwriting dma region
This commit is contained in:
parent
786e822cd4
commit
c2f28a3fd1
1 changed files with 3 additions and 3 deletions
|
|
@ -231,7 +231,7 @@ static void r200UploadRectSubImage( r200ContextPtr rmesa,
|
|||
tex = (char *)texImage->Data + done * src_pitch;
|
||||
|
||||
memset(®ion, 0, sizeof(region));
|
||||
r200AllocDmaRegion( rmesa, ®ion, lines * dstPitch, 64 );
|
||||
r200AllocDmaRegion( rmesa, ®ion, 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 );
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue