]> git.pld-linux.org Git - packages/XFree86-Servers.git/blame - XFree86-Servers-morecyrix.patch
- move compressed patch to distfiles
[packages/XFree86-Servers.git] / XFree86-Servers-morecyrix.patch
CommitLineData
3d715510
JB
1diff -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
4@@ -1,5 +1,5 @@
5
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 $ */
8
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
11@@ -88,9 +88,10 @@
12 #define CYRIXsetVectorMode() \
13 GX_REG(GP_VECTOR_MODE) = (vectorMode)
14
15-#define IfDest(xrop, val) ((((xrop) & 0x5) ^ (((xrop) & 0xA) >> 1)) ? (val) : 0)
16-
17-
18+#define IfDest(rop, planemask, val) \
19+ (( (((rop) & 0x5) ^ (((rop) & 0xA) >> 1)) \
20+ || (~((planemask) & 0xFF)) \
21+ ) ? (val) : 0)
22
23 /* Generic MediaGX hardware register and value definitions */
24
25diff -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
28@@ -1,4 +1,4 @@
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 $ */
31
32 /*
33 * Copyright 1998 by Annius Groenink, Amsterdam.
34@@ -80,10 +80,12 @@
35 { /* General acceleration flags */
36 xf86AccelInfoRec.Flags = PIXMAP_CACHE
37 | BACKGROUND_OPERATIONS
38+#if 0
39+ | HARDWARE_PATTERN_MONO_TRANSPARENCY
40+#endif
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;
46
47 /* Sync */
48 xf86AccelInfoRec.Sync = CYRIXAccelSync;
49@@ -93,19 +95,22 @@
50 CYRIXSetupForFillRectSolid;
51 xf86AccelInfoRec.SubsequentFillRectSolid =
52 CYRIXSubsequentFillRectSolid;
53- xf86GCInfoRec.PolyFillRectSolidFlags = 0;
54+ xf86GCInfoRec.PolyFillRectSolidFlags = NO_PLANEMASK;
55
56 /* ScreenToScreen copies */
57 xf86AccelInfoRec.SetupForScreenToScreenCopy =
58 CYRIXSetupForScreenToScreenCopy;
59 xf86AccelInfoRec.SubsequentScreenToScreenCopy =
60 CYRIXSubsequentScreenToScreenCopy;
61- xf86GCInfoRec.CopyAreaFlags = TRANSPARENCY_GXCOPY;
62
63- /* Bresenham lines */
64+ xf86GCInfoRec.CopyAreaFlags = NO_PLANEMASK | GXCOPY_ONLY;
65+
66+#if 0
67+ /* Bresenham lines - disable because of minor display errors */
68 xf86AccelInfoRec.SubsequentBresenhamLine =
69 CYRIXSubsequentBresenhamLine;
70 xf86AccelInfoRec.ErrorTermBits = 15;
71+#endif
72
73 /* 8x8 color-expanded patterns */
74 xf86AccelInfoRec.SetupFor8x8PatternColorExpand =
75@@ -115,6 +120,8 @@
76
77 /* Color expansion */
78 xf86AccelInfoRec.ColorExpandFlags = BIT_ORDER_IN_BYTE_MSBFIRST |
79+ NO_PLANEMASK |
80+ TRANSPARENCY_GXCOPY |
81 SCANLINE_PAD_BYTE;
82
83 /* Use two blit buffers in a row for text expansion
84@@ -175,13 +182,18 @@
85 CYRIXSetupForFillRectSolid(color, rop, planemask)
86 int color, rop;
87 unsigned int planemask;
88-{ CYRIXsetupSync();
89+{ if (xf86GCInfoRec.PolyFillRectSolidFlags & NO_PLANEMASK)
90+ planemask = 0xFFFF;
91+ if (xf86GCInfoRec.PolyFillRectSolidFlags & GXCOPY_ONLY)
92+ rop = GXcopy;
93+
94+ CYRIXsetupSync();
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);
103 }
104
105
106@@ -209,7 +221,14 @@
107 int rop;
108 unsigned int planemask;
109 int transparency_color;
110-{ CYRIXsetupSync();
111+{ if (xf86GCInfoRec.CopyAreaFlags & NO_PLANEMASK)
112+ planemask = 0xFFFF;
113+ if (xf86GCInfoRec.CopyAreaFlags & GXCOPY_ONLY)
114+ rop = GXcopy;
115+ if (xf86GCInfoRec.CopyAreaFlags & NO_TRANSPARENCY)
116+ transparency_color = -1;
117+
118+ CYRIXsetupSync();
119 CYRIXsetPatColors01(planemask, 0);
120
121 if (transparency_color == -1)
122@@ -220,6 +239,9 @@
123 { CYRIXsetPatModeTrans(RM_PAT_DISABLE);
124 transMode = 1;
125
126+ if (xf86GCInfoRec.CopyAreaFlags & TRANSPARENCY_GXCOPY)
127+ rop = GXcopy;
128+
129 /* fill blit buffer 1 with the transparency color */
130 if (vgaBitsPerPixel == 16)
131 { int k = CYRIXbltBufSize / 4;
132@@ -235,7 +257,7 @@
133 }
134
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);
139
140 copyXdir = xdir;
141@@ -318,6 +340,11 @@
142 unsigned int planemask;
143 { int trans = (bg == -1);
144
145+ if (xf86AccelInfoRec.ColorExpandFlags & NO_PLANEMASK)
146+ planemask = 0xFFFF;
147+ if (trans && (xf86AccelInfoRec.ColorExpandFlags & TRANSPARENCY_GXCOPY))
148+ rop = GXcopy;
149+
150 CYRIXsetupSync();
151 CYRIXsetSourceColors01(planemask, planemask);
152 CYRIXsetPatColors01(trans ? 0 : bg, fg);
153@@ -325,7 +352,7 @@
154 CYRIXsetPatModeX(rop, RM_PAT_MONO | (trans ? RM_PAT_TRANSPARENT : 0));
155
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);
159 }
160
161 void CYRIXSubsequent8x8PatternColorExpand(patternx, patterny, x, y, w, h)
162@@ -341,6 +368,9 @@
163 unsigned int planemask;
164 { int trans = (bg == -1);
165
166+ if (trans && (xf86AccelInfoRec.ColorExpandFlags & TRANSPARENCY_GXCOPY))
167+ rop = GXcopy;
168+
169 CYRIXsetupSync();
170 CYRIXsetSourceColors01(trans ? 0 : bg, fg);
171 CYRIXsetPatColors01(planemask, 0);
172@@ -352,7 +382,7 @@
173 used. So far, this problem has not manifested itself in
174 practice. */
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);
178 }
179
180 void CYRIXSubsequentCPUToScreenColorExpand(x, y, w, h, skipleft)
This page took 0.090304 seconds and 4 git commands to generate.