diff options
author | Dennis Kasprzyk <[email protected]> | 2008-05-29 11:25:21 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2008-05-29 11:25:21 +0200 |
commit | 328621509f4690fb945201a90425662e4fd2fc2d (patch) | |
tree | ff34a15525acaf40ce92731d9a29aa465ed750bd /src | |
parent | 377016d728ace47c9eeb3ac2f01191608ab060f6 (diff) |
R1/2/3/4/5xx: fixed calculation of cliprects in CopyBuffer.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_ioctl.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/radeon_ioctl.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_ioctl.c | 10 |
3 files changed, 18 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.c b/src/mesa/drivers/dri/r200/r200_ioctl.c index 7008832965a..20482a41244 100644 --- a/src/mesa/drivers/dri/r200/r200_ioctl.c +++ b/src/mesa/drivers/dri/r200/r200_ioctl.c @@ -477,16 +477,18 @@ void r200CopyBuffer( __DRIdrawablePrivate *dPriv, if (rect->y2 < b->y2) b->y2 = rect->y2; - if (b->x1 < b->x2 && b->y1 < b->y2) - b++; + if (b->x1 >= b->x2 || b->y1 >= b->y2) + continue; } - else - b++; + b++; n++; } rmesa->sarea->nbox = n; + if (!n) + continue; + ret = drmCommandNone( rmesa->dri.fd, DRM_RADEON_SWAP ); if ( ret ) { diff --git a/src/mesa/drivers/dri/r300/radeon_ioctl.c b/src/mesa/drivers/dri/r300/radeon_ioctl.c index 31a000d5e66..0c1a19507b2 100644 --- a/src/mesa/drivers/dri/r300/radeon_ioctl.c +++ b/src/mesa/drivers/dri/r300/radeon_ioctl.c @@ -215,16 +215,18 @@ void radeonCopyBuffer(__DRIdrawablePrivate * dPriv, if (rect->y2 < b->y2) b->y2 = rect->y2; - if (b->x1 < b->x2 && b->y1 < b->y2) - b++; + if (b->x1 >= b->x2 || b->y1 >= b->y2) + continue; } - else - b++; + b++; n++; } radeon->sarea->nbox = n; + if (!n) + continue; + ret = drmCommandNone(radeon->dri.fd, DRM_RADEON_SWAP); if (ret) { diff --git a/src/mesa/drivers/dri/radeon/radeon_ioctl.c b/src/mesa/drivers/dri/radeon/radeon_ioctl.c index 078ac9a29a2..446025b6312 100644 --- a/src/mesa/drivers/dri/radeon/radeon_ioctl.c +++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.c @@ -919,16 +919,18 @@ void radeonCopyBuffer( __DRIdrawablePrivate *dPriv, if (rect->y2 < b->y2) b->y2 = rect->y2; - if (b->x1 < b->x2 && b->y1 < b->y2) - b++; + if (b->x1 >= b->x2 || b->y1 >= b->y2) + continue; } - else - b++; + b++; n++; } rmesa->sarea->nbox = n; + if (!n) + continue; + ret = drmCommandNone( rmesa->dri.fd, DRM_RADEON_SWAP ); if ( ret ) { |