From 0c47195ca805881e3fbd5b9224be5c930feeeb8c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 24 Mar 2010 17:37:39 +0000 Subject: [PATCH] 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 --- src/i830_uxa.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/i830_uxa.c b/src/i830_uxa.c index 22792fe..3af4042 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); { -- 1.7.0.3