summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranco Catrin L <fcatrin@tuxpan.com>2004-04-11 15:51:04 +0000
committerFranco Catrin L <fcatrin@tuxpan.com>2004-04-11 15:51:04 +0000
commit784d37ee369b94c83c4cc6e280a39f32da8aa678 (patch)
treecb3242259e47ea66649ab06007e7919d2c9f9adb
parent056322336cbb6093d74aa9d22bbfd42e2248a16a (diff)
Fixed size calculation in solid rendering
-rw-r--r--hw/kdrive/neomagic/ChangeLog1
-rw-r--r--hw/kdrive/neomagic/neo_draw.c17
2 files changed, 5 insertions, 13 deletions
diff --git a/hw/kdrive/neomagic/ChangeLog b/hw/kdrive/neomagic/ChangeLog
index 6566271f7..3b631f684 100644
--- a/hw/kdrive/neomagic/ChangeLog
+++ b/hw/kdrive/neomagic/ChangeLog
@@ -1,5 +1,6 @@
2004-04-11 Franco Catrin L. <fcatrin@tuxpan.com>
* Basic bitblt implementation
+ * Fixed width and height calculation in solids
2004-04-10 Franco Catrin L. <fcatrin@tuxpan.com>
* MMIO enabled after switching to new VT
diff --git a/hw/kdrive/neomagic/neo_draw.c b/hw/kdrive/neomagic/neo_draw.c
index 5cca6cc9f..38efc5843 100644
--- a/hw/kdrive/neomagic/neo_draw.c
+++ b/hw/kdrive/neomagic/neo_draw.c
@@ -62,7 +62,7 @@ static Bool neoPrepareSolid(PixmapPtr pPixmap,
Pixel fg)
{
FbBits depthMask = FbFullMask(pPixmap->drawable.depth);
-
+ DBGOUT("ROP %i\n", alu);
if ((pm & depthMask) != depthMask) {
return FALSE;
} else {
@@ -76,17 +76,8 @@ static void neoSolid (int x1, int y1, int x2, int y2)
int x, y, w, h;
x = x1;
y = y1;
- w = x2-x1 + 1;
- h = y2-y1 + 1;
- if (x1>x2) {
- x = x2;
- w = -w;
- }
- if (y1>y2) {
- y = y2;
- h = -h;
- }
-
+ w = x2-x1;
+ h = y2-y1;
neoWaitIdle(card);
mmio->fgColor = fgColor;
mmio->bltCntl =
@@ -115,7 +106,7 @@ static void neoCopy (int srcX, int srcY, int dstX, int dstY, int w, int h)
if ((dstY < srcY) || ((dstY == srcY) && (dstX < srcX))) {
mmio->bltCntl =
- NEO_BC3_FIFO_EN |
+ NEO_BC3_FIFO_EN |
NEO_BC3_SKIP_MAPPING | 0x0c0000;
mmio->srcStart = srcY * screen->pitch + srcX * screen->depth;
mmio->dstStart = dstY * screen->pitch + dstX * screen->depth;