summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellström <thomas@shipmail.org>2007-02-10 14:36:06 +0000
committerThomas Hellström <thomas@shipmail.org>2007-02-10 14:36:06 +0000
commitdcdbab5efb5801504b1ca9eeb54ad4cece35c9c1 (patch)
tree76228278e3d5bf341bdb4038eefc09a04f5a57ef
parentbd1bb1aecafe5dd0b5a0ec9c1813d20a44c92d1b (diff)
Fix possible line clipping bug.
-rw-r--r--ChangeLog7
-rw-r--r--unichrome/via_accel.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a7274b..b4bbee0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-02-10 Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
+
+ * unichrome/via_accel.c: (viaFlushDRIEnabled),
+ (viaSubsequentSolidTwoPointLine):
+
+ Fix possible line clipping bug.
+
2007-02-06 Benno Schulenberg <bensberg-at-justemail-dot-net>
* unichrome/via_driver.c:
diff --git a/unichrome/via_accel.c b/unichrome/via_accel.c
index c6c15e9..3a27da3 100644
--- a/unichrome/via_accel.c
+++ b/unichrome/via_accel.c
@@ -147,6 +147,7 @@ viaFlushDRIEnabled(ViaCommandBuffer * cb)
* Align command buffer end for AGP DMA.
*/
+ OUT_RING_H1(0x2f8, 0x67676767);
if (pVia->agpDMA && cb->mode == 2 && cb->rindex != HC_ParaType_CmdVdata
&& (cb->pos & 1)) {
OUT_RING(HC_DUMMY);
@@ -879,6 +880,7 @@ viaSubsequentSolidTwoPointLine(ScrnInfoPtr pScrn, int x1, int y1,
RING_VARS;
+ sub = viaAccelClippingHelper(cb, (y1 < y2) ? y1 : y2, tdc);
cmd = tdc->cmd | VIA_GEC_LINE;
dx = x2 - x1;
@@ -905,8 +907,6 @@ viaSubsequentSolidTwoPointLine(ScrnInfoPtr pScrn, int x1, int y1,
cmd |= VIA_GEC_LASTPIXEL_OFF;
}
- sub = viaAccelClippingHelper(cb, (y1 < y2) ? y1 : y2, tdc);
-
dstBase = pScrn->fbOffset + sub * pVia->Bpl;
y1 -= sub;
y2 -= sub;