summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-03-24 17:37:39 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-03-24 17:37:39 +0000
commit0c47195ca805881e3fbd5b9224be5c930feeeb8c (patch)
tree47ba92d6d6cacd5677726c02f39de01c49990661
parent5537079c29a56133446f1874d24d9e6516825edb (diff)
downloadxf86-video-intel-0c47195ca805881e3fbd5b9224be5c930feeeb8c.tar.gz
xf86-video-intel-0c47195ca805881e3fbd5b9224be5c930feeeb8c.tar.bz2
xf86-video-intel-0c47195ca805881e3fbd5b9224be5c930feeeb8c.zip
i830: Clip solid fills to surface.
There is a reasonable surfeit of evidence to support this error, for instance: http://bugs.freedesktop.org/attachment.cgi?id=34417 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/i830_uxa.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 22792feae..3af4042da 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -264,6 +264,15 @@ static void i830_uxa_solid(PixmapPtr pixmap, int x1, int y1, int x2, int y2)
unsigned long pitch;
uint32_t cmd;
+ if (x1 < 0)
+ x1 = 0;
+ if (y1 < 0)
+ y1 = 0;
+ if (x2 > pixmap->drawable.width)
+ x2 = pixmap->drawable.width;
+ if (y2 > pixmap->drawable.height)
+ y2 = pixmap->drawable.height;
+
pitch = i830_pixmap_pitch(pixmap);
{