summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2006-08-10 20:42:56 +0200
committerTilman Sauerbeck <tilman@code-monkey.de>2006-08-10 20:42:56 +0200
commit9141effdbbcd2b3419874ebb4e3898fca3474417 (patch)
tree8ba505e15c7cb5e48918a3710f09f48272c0c0ef
parent3f440e499b5d0b073118855fe39fa4077971c06e (diff)
Added another chunk of kdrive code to mgaPrepareSolid().
-rw-r--r--src/mga_exa.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mga_exa.c b/src/mga_exa.c
index 2f24293..3e3fbac 100644
--- a/src/mga_exa.c
+++ b/src/mga_exa.c
@@ -188,6 +188,23 @@ mgaPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg)
PMGA(pPixmap);
QUIESCE_DMA(pPixmap);
+ /* FIXME: taken from kdrive. Is this needed? Doesn't seem to affect
+ * rendering...
+ *
+ * We must pad planemask and fg depending on the format of the
+ * destination pixmap
+ */
+ switch (pPixmap->drawable.bitsPerPixel) {
+ case 16:
+ fg |= fg << 16;
+ planemask |= planemask << 16;
+ break;
+ case 8:
+ fg |= (fg << 8) | (fg << 16) | (fg << 24);
+ planemask |= (planemask << 8) | (planemask << 16) | (planemask << 24);
+ break;
+ }
+
pMga->FilledRectCMD = MGADWG_TRAP | MGADWG_SOLID | MGADWG_ARZERO |
MGADWG_SGNZERO | MGADWG_SHIFTZERO | mgaRop[alu];