xserver/hw/kdrive/neomagic ChangeLog,1.5,1.6 neo_draw.c,1.6,1.7
Franco Catrin L.
xserver-commit at pdx.freedesktop.org
Sun Apr 11 09:24:05 PDT 2004
Committed by: fcatrin
Update of /cvs/xserver/xserver/hw/kdrive/neomagic
In directory pdx:/tmp/cvs-serv20285
Modified Files:
ChangeLog neo_draw.c
Log Message:
Added ROP
Index: ChangeLog
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/neomagic/ChangeLog,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- a/ChangeLog 11 Apr 2004 15:51:04 -0000 1.5
+++ b/ChangeLog 11 Apr 2004 16:24:03 -0000 1.6
@@ -1,6 +1,7 @@
2004-04-11 Franco Catrin L. <fcatrin at tuxpan.com>
* Basic bitblt implementation
* Fixed width and height calculation in solids
+ * Added ROP (not tested)
2004-04-10 Franco Catrin L. <fcatrin at tuxpan.com>
* MMIO enabled after switching to new VT
Index: neo_draw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/neomagic/neo_draw.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- a/neo_draw.c 11 Apr 2004 15:51:04 -0000 1.6
+++ b/neo_draw.c 11 Apr 2004 16:24:03 -0000 1.7
@@ -39,10 +39,30 @@
#include "miline.h"
#include "picturestr.h"
-NeoMMIO *mmio;
+NeoMMIO *mmio;
NeoScreenInfo *screen;
NeoCardInfo *card;
-CARD32 fgColor;
+CARD32 fgColor;
+CARD32 rop;
+
+CARD32 neoRop[16] = {
+ 0x000000, /* GXclear */
+ 0x080000, /* GXand */
+ 0x040000, /* GXandReverse */
+ 0x0c0000, /* GXcopy */
+ 0x020000, /* GXandInvert */
+ 0x0a0000, /* GXnoop */
+ 0x060000, /* GXxor */
+ 0x0e0000, /* GXor */
+ 0x010000, /* GXnor */
+ 0x090000, /* GXequiv */
+ 0x050000, /* GXinvert */
+ 0x0d0000, /* GXorReverse */
+ 0x030000, /* GXcopyInvert */
+ 0x0b0000, /* GXorInverted */
+ 0x070000, /* GXnand */
+ 0x0f0000 /* GXset */
+};
static void neoWaitIdle(NeoCardInfo *neoc)
{
@@ -62,11 +82,12 @@
Pixel fg)
{
FbBits depthMask = FbFullMask(pPixmap->drawable.depth);
- DBGOUT("ROP %i\n", alu);
if ((pm & depthMask) != depthMask) {
return FALSE;
} else {
fgColor = fg;
+ if (alu!=3) DBGOUT("used ROP %i\n", alu);
+ rop = neoRop[alu];
return TRUE;
}
}
@@ -83,7 +104,7 @@
mmio->bltCntl =
NEO_BC3_FIFO_EN |
NEO_BC0_SRC_IS_FG |
- NEO_BC3_SKIP_MAPPING | 0x0c0000;
+ NEO_BC3_SKIP_MAPPING | rop;
mmio->dstStart = y * screen->pitch + x * screen->depth;
mmio->xyExt = (unsigned long)(h << 16) | (w & 0xffff);
@@ -97,6 +118,7 @@
static Bool neoPrepareCopy (PixmapPtr pSrcPixpam, PixmapPtr pDstPixmap,
int dx, int dy, int alu, Pixel pm)
{
+ rop = neoRop[alu];
return TRUE;
}
@@ -107,7 +129,7 @@
if ((dstY < srcY) || ((dstY == srcY) && (dstX < srcX))) {
mmio->bltCntl =
NEO_BC3_FIFO_EN |
- NEO_BC3_SKIP_MAPPING | 0x0c0000;
+ NEO_BC3_SKIP_MAPPING | rop;
mmio->srcStart = srcY * screen->pitch + srcX * screen->depth;
mmio->dstStart = dstY * screen->pitch + dstX * screen->depth;
More information about the xserver-commit
mailing list