From 328621509f4690fb945201a90425662e4fd2fc2d Mon Sep 17 00:00:00 2001 From: Dennis Kasprzyk Date: Thu, 29 May 2008 11:25:21 +0200 Subject: R1/2/3/4/5xx: fixed calculation of cliprects in CopyBuffer. --- src/mesa/drivers/dri/radeon/radeon_ioctl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/mesa/drivers/dri/radeon/radeon_ioctl.c') 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 ) { -- cgit v1.2.3