1 diff -ruN XFree86-3.3.6/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix.h XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix.h
2 --- XFree86-3.3.6/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix.h Wed Mar 1 16:31:43 2000
3 +++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix.h Wed Mar 1 16:24:02 2000
6 -/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix.h,v 1.1.2.5 1998/11/06 09:47:02 hohndel Exp $ */
7 +/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix.h,v 1.1.2.6 1998/12/22 07:49:58 hohndel Exp $ */
9 /* this code is partly based on the MediaGX sources from the GGI project
10 based on CYRIX example code (gxvideo.c) and included with CYRIX and
12 #define CYRIXsetVectorMode() \
13 GX_REG(GP_VECTOR_MODE) = (vectorMode)
15 -#define IfDest(xrop, val) ((((xrop) & 0x5) ^ (((xrop) & 0xA) >> 1)) ? (val) : 0)
18 +#define IfDest(rop, planemask, val) \
19 + (( (((rop) & 0x5) ^ (((rop) & 0xA) >> 1)) \
20 + || (~((planemask) & 0xFF)) \
23 /* Generic MediaGX hardware register and value definitions */
25 diff -ruN XFree86-3.3.6/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_accel.c XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_accel.c
26 --- XFree86-3.3.6/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_accel.c Wed Mar 1 16:31:43 2000
27 +++ XFree86-3.3.3.1/xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_accel.c Wed Mar 1 16:24:02 2000
29 -/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_accel.c,v 1.1.2.3 1998/11/06 09:47:04 hohndel Exp $ */
30 +/* $XFree86: xc/programs/Xserver/hw/xfree86/vga256/drivers/cyrix/cyrix_accel.c,v 1.1.2.5 1998/12/22 07:49:58 hohndel Exp $ */
33 * Copyright 1998 by Annius Groenink, Amsterdam.
35 { /* General acceleration flags */
36 xf86AccelInfoRec.Flags = PIXMAP_CACHE
37 | BACKGROUND_OPERATIONS
39 + | HARDWARE_PATTERN_MONO_TRANSPARENCY
41 | HARDWARE_PATTERN_SCREEN_ORIGIN
42 | HARDWARE_PATTERN_BIT_ORDER_MSBFIRST
43 - | HARDWARE_PATTERN_PROGRAMMED_BITS
44 - | HARDWARE_PATTERN_MONO_TRANSPARENCY;
45 + | HARDWARE_PATTERN_PROGRAMMED_BITS;
48 xf86AccelInfoRec.Sync = CYRIXAccelSync;
50 CYRIXSetupForFillRectSolid;
51 xf86AccelInfoRec.SubsequentFillRectSolid =
52 CYRIXSubsequentFillRectSolid;
53 - xf86GCInfoRec.PolyFillRectSolidFlags = 0;
54 + xf86GCInfoRec.PolyFillRectSolidFlags = NO_PLANEMASK;
56 /* ScreenToScreen copies */
57 xf86AccelInfoRec.SetupForScreenToScreenCopy =
58 CYRIXSetupForScreenToScreenCopy;
59 xf86AccelInfoRec.SubsequentScreenToScreenCopy =
60 CYRIXSubsequentScreenToScreenCopy;
61 - xf86GCInfoRec.CopyAreaFlags = TRANSPARENCY_GXCOPY;
63 - /* Bresenham lines */
64 + xf86GCInfoRec.CopyAreaFlags = NO_PLANEMASK | GXCOPY_ONLY;
67 + /* Bresenham lines - disable because of minor display errors */
68 xf86AccelInfoRec.SubsequentBresenhamLine =
69 CYRIXSubsequentBresenhamLine;
70 xf86AccelInfoRec.ErrorTermBits = 15;
73 /* 8x8 color-expanded patterns */
74 xf86AccelInfoRec.SetupFor8x8PatternColorExpand =
78 xf86AccelInfoRec.ColorExpandFlags = BIT_ORDER_IN_BYTE_MSBFIRST |
80 + TRANSPARENCY_GXCOPY |
83 /* Use two blit buffers in a row for text expansion
85 CYRIXSetupForFillRectSolid(color, rop, planemask)
87 unsigned int planemask;
89 +{ if (xf86GCInfoRec.PolyFillRectSolidFlags & NO_PLANEMASK)
91 + if (xf86GCInfoRec.PolyFillRectSolidFlags & GXCOPY_ONLY)
95 CYRIXsetSourceColors01(color, color);
96 CYRIXsetPatColors01(planemask, 0);
97 CYRIXsetPatMode(rop, RM_PAT_DISABLE);
98 blitMode = BM_READ_SRC_NONE | BM_WRITE_FB | BM_SOURCE_EXPAND
99 - | IfDest(rop, BM_READ_DST_FB0);
100 - vectorMode = IfDest(rop, VM_READ_DST_FB);
101 + | IfDest(rop, planemask, BM_READ_DST_FB0);
102 + vectorMode = IfDest(rop, planemask, VM_READ_DST_FB);
108 unsigned int planemask;
109 int transparency_color;
111 +{ if (xf86GCInfoRec.CopyAreaFlags & NO_PLANEMASK)
112 + planemask = 0xFFFF;
113 + if (xf86GCInfoRec.CopyAreaFlags & GXCOPY_ONLY)
115 + if (xf86GCInfoRec.CopyAreaFlags & NO_TRANSPARENCY)
116 + transparency_color = -1;
119 CYRIXsetPatColors01(planemask, 0);
121 if (transparency_color == -1)
123 { CYRIXsetPatModeTrans(RM_PAT_DISABLE);
126 + if (xf86GCInfoRec.CopyAreaFlags & TRANSPARENCY_GXCOPY)
129 /* fill blit buffer 1 with the transparency color */
130 if (vgaBitsPerPixel == 16)
131 { int k = CYRIXbltBufSize / 4;
135 blitMode = BM_READ_SRC_FB | BM_WRITE_FB | BM_SOURCE_COLOR
136 - | (transMode ? IfDest(rop, BM_READ_DST_FB1) : BM_READ_DST_NONE)
137 + | (transMode ? BM_READ_DST_NONE : IfDest(rop, planemask, BM_READ_DST_FB1))
138 | (ydir < 0 ? BM_REVERSE_Y : 0);
142 unsigned int planemask;
143 { int trans = (bg == -1);
145 + if (xf86AccelInfoRec.ColorExpandFlags & NO_PLANEMASK)
146 + planemask = 0xFFFF;
147 + if (trans && (xf86AccelInfoRec.ColorExpandFlags & TRANSPARENCY_GXCOPY))
151 CYRIXsetSourceColors01(planemask, planemask);
152 CYRIXsetPatColors01(trans ? 0 : bg, fg);
154 CYRIXsetPatModeX(rop, RM_PAT_MONO | (trans ? RM_PAT_TRANSPARENT : 0));
156 blitMode = BM_READ_SRC_NONE | BM_WRITE_FB | BM_SOURCE_EXPAND
157 - | (trans ? IfDest(rop, BM_READ_DST_FB0) : BM_READ_DST_NONE);
158 + | (trans ? IfDest(rop, planemask, BM_READ_DST_FB0) : BM_READ_DST_NONE);
161 void CYRIXSubsequent8x8PatternColorExpand(patternx, patterny, x, y, w, h)
163 unsigned int planemask;
164 { int trans = (bg == -1);
166 + if (trans && (xf86AccelInfoRec.ColorExpandFlags & TRANSPARENCY_GXCOPY))
170 CYRIXsetSourceColors01(trans ? 0 : bg, fg);
171 CYRIXsetPatColors01(planemask, 0);
173 used. So far, this problem has not manifested itself in
175 blitMode = BM_READ_SRC_BB0 | BM_WRITE_FB | BM_SOURCE_EXPAND
176 - | (trans ? IfDest(rop, BM_READ_DST_FB1) : BM_READ_DST_NONE);
177 + | (trans ? IfDest(rop, planemask, BM_READ_DST_FB1) : BM_READ_DST_NONE);
180 void CYRIXSubsequentCPUToScreenColorExpand(x, y, w, h, skipleft)