1 --- glide3x-20010309/h3/minihwc/linhwc.c.dri.orig 2004-04-26 00:29:32.000000000 +0200
2 +++ glide3x-20010309/h3/minihwc/linhwc.c.dri 2004-04-27 23:05:40.677616968 +0200
8 +hwcBufferLfbAddr(const hwcBoardInfo *bInfo, FxU32 physAddress)
10 + FxU32 retVal = 0x00UL;
21 + * This is the tile aperture stride. It is always 4096 for V3.
23 + FxU32 lfbBufferStride = 0x1000;
25 + if (bInfo->vidInfo.tiled) {
26 + GDBG_INFO(80, "\tphysAddress: 0x%08lx\n",physAddress);
28 + /* Compute address in tile space */
29 + tileAddress = physAddress - driInfo.backOffset;
30 + GDBG_INFO(80, "\ttileAddress: 0x%08lx\n",tileAddress);
32 + /* Compute tile number we're in (each tile is 4K bytes) */
33 + tileNumber = tileAddress >> 12;
34 + GDBG_INFO(80, "\ttileNumber: 0x%08lx (%d)\n",tileNumber,tileNumber);
36 + /* Compute base tile row we're in */
37 + tileRow = tileNumber / bInfo->buffInfo.bufStrideInTiles;
38 + GDBG_INFO(80, "\ttileRow: %d (stride = %d)\n",tileNumber,bInfo->buffInfo.bufStrideInTiles);
40 + /* Compute offset within the tile */
41 + tileOffset = tileAddress - (tileNumber << 12);
42 + GDBG_INFO(80, "\ttileOffset: 0x%08lx\n",tileOffset);
44 + /* Compute scanline within the tile */
45 + tileScanline = tileOffset >> 7;
46 + GDBG_INFO(80, "\ttileScanline: 0x%08lx\n",tileScanline);
48 + /* Compute tile X offset within the row */
49 + tileXOffset = tileNumber - (tileRow * bInfo->buffInfo.bufStrideInTiles);
50 + GDBG_INFO(80, "\ttileXOffset: %d\n",tileXOffset);
52 + /* Compute Y offset in LFB space */
53 + lfbYOffset = (tileRow * 32 + tileScanline);
55 + /* Compute LFB address of tile start */
56 + lfbAddress = driInfo.backOffset + lfbYOffset * lfbBufferStride + tileXOffset * 128;
58 + GDBG_INFO(80, "\tlfbAddress: %08lx\n", lfbAddress);
59 + retVal = lfbAddress;
61 + retVal = physAddress;
67 hwcAllocBuffers(hwcBoardInfo *bInfo, FxU32 nColBuffers, FxU32 nAuxBuffers)
70 * boundaries will cause the tiled lfb access to be off by a page so
71 * we add in the width of a page (HWC_TILED_BUFFER_X_ADJUST) here.
74 -hwcBufferLfbAddr(const hwcBoardInfo *bInfo, FxU32 physAddress)
76 - FxU32 retVal = 0x00UL;
87 - * This is the tile aperture stride. It is always 4096 for V3.
89 - FxU32 lfbBufferStride = 0x1000;
91 - if (bInfo->vidInfo.tiled) {
92 - GDBG_INFO(80, "\tphysAddress: 0x%08lx\n",physAddress);
94 - /* Compute address in tile space */
95 - tileAddress = physAddress - driInfo.backOffset;
96 - GDBG_INFO(80, "\ttileAddress: 0x%08lx\n",tileAddress);
98 - /* Compute tile number we're in (each tile is 4K bytes) */
99 - tileNumber = tileAddress >> 12;
100 - GDBG_INFO(80, "\ttileNumber: 0x%08lx (%d)\n",tileNumber,tileNumber);
102 - /* Compute base tile row we're in */
103 - tileRow = tileNumber / bInfo->buffInfo.bufStrideInTiles;
104 - GDBG_INFO(80, "\ttileRow: %d (stride = %d)\n",tileNumber,bInfo->buffInfo.bufStrideInTiles);
106 - /* Compute offset within the tile */
107 - tileOffset = tileAddress - (tileNumber << 12);
108 - GDBG_INFO(80, "\ttileOffset: 0x%08lx\n",tileOffset);
110 - /* Compute scanline within the tile */
111 - tileScanline = tileOffset >> 7;
112 - GDBG_INFO(80, "\ttileScanline: 0x%08lx\n",tileScanline);
114 - /* Compute tile X offset within the row */
115 - tileXOffset = tileNumber - (tileRow * bInfo->buffInfo.bufStrideInTiles);
116 - GDBG_INFO(80, "\ttileXOffset: %d\n",tileXOffset);
118 - /* Compute Y offset in LFB space */
119 - lfbYOffset = (tileRow * 32 + tileScanline);
121 - /* Compute LFB address of tile start */
122 - lfbAddress = driInfo.backOffset + lfbYOffset * lfbBufferStride + tileXOffset * 128;
124 - GDBG_INFO(80, "\tlfbAddress: %08lx\n", lfbAddress);
125 - retVal = lfbAddress;
127 - retVal = physAddress;
132 hwcInitAGPFifo(hwcBoardInfo *bInfo, FxBool enableHoleCounting)
134 --- glide3x-20010309/h3/glide3/src/gaa.c.org 2006-12-23 11:51:47.967058500 +0100
135 +++ glide3x-20010309/h3/glide3/src/gaa.c 2006-12-23 12:04:56.144316500 +0100
140 - (float *)pointers += stride;
141 + pointers += stride;
143 ptX = FARRAY(e, gc->state.vData.vertexInfo.offset);
144 ptY = FARRAY(e, gc->state.vData.vertexInfo.offset+4);
148 oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset);
149 - (float *)pointers += stride;
150 + pointers += stride;
152 ptX = FARRAY(e, gc->state.vData.vertexInfo.offset)
153 *oow*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
158 - (float *)pointers += stride;
159 + pointers += stride;
160 if (ltype == GR_LINES)
161 - (float *)pointers += stride;
162 + pointers += stride;
164 /* draw from low Y to high Y */
165 if (FARRAY(v2, gc->state.vData.vertexInfo.offset+4) < FARRAY(v1, gc->state.vData.vertexInfo.offset+4)) {
166 @@ -1018,9 +1018,9 @@
170 - (float *)pointers += stride;
171 + pointers += stride;
172 if (ltype == GR_LINES)
173 - (float *)pointers += stride;
174 + pointers += stride;
175 owa = oowa = 1.0f / FARRAY(v1, gc->state.vData.wInfo.offset);
176 owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
178 @@ -1032,7 +1032,7 @@
182 - (float *)pointers += stride;
183 + pointers += stride;
184 owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
187 @@ -1366,7 +1366,7 @@
191 - (float *)pointers += stride*3;
192 + pointers += stride*3;
194 /* move culling test to here */
196 @@ -1540,7 +1540,7 @@
200 - (float *)pointers += stride*3;
201 + pointers += stride*3;
202 oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
203 oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
204 oowc = 1.0f / FARRAY(c, gc->state.vData.wInfo.offset);
205 @@ -1705,7 +1705,7 @@
206 if (type == kSetupFan) {
207 v[0] = (mode == 0) ? pointers : *(float **)pointers;
209 - (float *)pointers += stride;
210 + pointers += stride;
212 v[1] = *(float **)pointers;
213 v[2] = *((float **)pointers+1);
214 @@ -1747,7 +1747,7 @@
215 _grAADrawTriangles(1, type, 3, v);
217 _grAAVpDrawTriangles(1, type, 3, v);
218 - (float *)pointers += stride;
219 + pointers += stride;
223 --- glide3x-20010309/h3/glide3/src/gdraw.c.org 2006-12-23 12:08:15.640784250 +0100
224 +++ glide3x-20010309/h3/glide3/src/gdraw.c 2006-12-23 12:09:03.163754250 +0100
227 if (mode) vPtr = *(float **)vPtr;
229 - (float *)pointers += stride;
230 + pointers += stride;
232 GDBG_INFO_MORE(gc->myLevel, "(%f %f)\n",
233 FARRAY(vPtr,gc->state.vData.vertexInfo.offset),
236 vPtr = *(float **)vPtr;
237 oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset);
238 - (float *)pointers += stride;
239 + pointers += stride;
247 - (float *)pointers += stride;
248 + pointers += stride;
249 if (ltype == GR_LINES)
250 - (float *)pointers += stride;
251 + pointers += stride;
254 ** compute absolute deltas and draw from low Y to high Y
259 - (float *)pointers += stride;
260 + pointers += stride;
261 owa = oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
262 owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
265 (float *)pointers += stride;
266 owa = oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
267 owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
268 - (float *)pointers += stride;
269 + pointers += stride;
277 - (float *)pointers += stride;
278 + pointers += stride;
279 owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
281 fay = tmp1 = FARRAY(a, gc->state.vData.vertexInfo.offset+4)
285 vPtr = *(float **)vPtr;
286 - (float *)pointers += stride;
287 + pointers += stride;
289 i = gc->tsuDataList[dataElem];
292 *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
293 TRI_SETF(FARRAY(vPtr, 4)
294 *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
295 - (float *)pointers += stride;
296 + pointers += stride;
298 TRI_VP_SETFS(vPtr,oow);
300 --- glide3x-20010309/h3/glide3/src/gstrip.c.org 2006-12-23 12:13:50.669722250 +0100
301 +++ glide3x-20010309/h3/glide3/src/gstrip.c 2006-12-23 12:14:04.282573000 +0100
305 vPtr = *(float **)vPtr;
306 - (float *)pointers += stride;
307 + pointers += stride;
309 TRI_SETF(FARRAY(vPtr, 0));
312 *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
313 TRI_SETF(FARRAY(vPtr, 4)
314 *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
315 - (float *)pointers += stride;
316 + pointers += stride;
318 TRI_VP_SETFS(vPtr, oow);
320 --- glide3x-20010309/h3/glide3/src/distrip.c.org 2006-12-23 12:18:36.047557250 +0100
321 +++ glide3x-20010309/h3/glide3/src/distrip.c 2006-12-23 12:18:46.088184750 +0100
324 while ((int)Count >= 3) {
325 grDrawTriangle(*(float **)pointers, *((float **)pointers+1), *((float **)pointers+2));
326 - (float *)pointers += 3;