]> git.pld-linux.org Git - packages/Glide_V3-DRI.git/blob - glide-gcc34.patch
- dropped pre-cvs changelog
[packages/Glide_V3-DRI.git] / glide-gcc34.patch
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
3 @@ -304,6 +304,65 @@
4    return FXTRUE;
5  }
6  
7 +static FxU32
8 +hwcBufferLfbAddr(const hwcBoardInfo *bInfo, FxU32 physAddress)
9 +{
10 +  FxU32 retVal = 0x00UL;
11 +
12 +  FxU32 tileAddress;
13 +  FxU32 tileNumber;
14 +  FxU32 tileOffset;
15 +  FxU32 tileXOffset;
16 +  FxU32 tileScanline;
17 +  FxU32 tileRow;
18 +  FxU32 lfbAddress;
19 +  FxU32 lfbYOffset;
20 +  /*
21 +   * This is the tile aperture stride.  It is always 4096 for V3.
22 +   */
23 +  FxU32 lfbBufferStride = 0x1000;
24 +
25 +  if (bInfo->vidInfo.tiled) {    
26 +    GDBG_INFO(80, "\tphysAddress: 0x%08lx\n",physAddress);
27 +
28 +    /* Compute address in tile space */
29 +    tileAddress = physAddress - driInfo.backOffset;
30 +    GDBG_INFO(80, "\ttileAddress: 0x%08lx\n",tileAddress);
31 +
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);
35 +
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);
39 +
40 +    /* Compute offset within the tile */
41 +    tileOffset = tileAddress - (tileNumber << 12);
42 +    GDBG_INFO(80, "\ttileOffset: 0x%08lx\n",tileOffset);
43 +
44 +    /* Compute scanline within the tile */
45 +    tileScanline = tileOffset >> 7;
46 +    GDBG_INFO(80, "\ttileScanline: 0x%08lx\n",tileScanline);
47 +
48 +    /* Compute tile X offset within the row */
49 +    tileXOffset = tileNumber - (tileRow * bInfo->buffInfo.bufStrideInTiles);
50 +    GDBG_INFO(80, "\ttileXOffset: %d\n",tileXOffset);
51 +
52 +    /* Compute Y offset in LFB space */
53 +    lfbYOffset = (tileRow * 32 + tileScanline);
54 +
55 +    /* Compute LFB address of tile start */
56 +    lfbAddress =  driInfo.backOffset + lfbYOffset * lfbBufferStride + tileXOffset * 128;
57 +
58 +    GDBG_INFO(80, "\tlfbAddress: %08lx\n", lfbAddress);
59 +    retVal = lfbAddress;
60 +  } else {
61 +    retVal = physAddress;
62 +  }
63 +  return retVal;
64 +}
65 +
66  FxBool
67  hwcAllocBuffers(hwcBoardInfo *bInfo, FxU32 nColBuffers, FxU32 nAuxBuffers) 
68  {
69 @@ -620,64 +679,7 @@
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.
72   */
73 -static FxU32
74 -hwcBufferLfbAddr(const hwcBoardInfo *bInfo, FxU32 physAddress)
75 -{
76 -  FxU32 retVal = 0x00UL;
77 -
78 -  FxU32 tileAddress;
79 -  FxU32 tileNumber;
80 -  FxU32 tileOffset;
81 -  FxU32 tileXOffset;
82 -  FxU32 tileScanline;
83 -  FxU32 tileRow;
84 -  FxU32 lfbAddress;
85 -  FxU32 lfbYOffset;
86 -  /*
87 -   * This is the tile aperture stride.  It is always 4096 for V3.
88 -   */
89 -  FxU32 lfbBufferStride = 0x1000;
90 -
91 -  if (bInfo->vidInfo.tiled) {    
92 -    GDBG_INFO(80, "\tphysAddress: 0x%08lx\n",physAddress);
93 -
94 -    /* Compute address in tile space */
95 -    tileAddress = physAddress - driInfo.backOffset;
96 -    GDBG_INFO(80, "\ttileAddress: 0x%08lx\n",tileAddress);
97 -
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);
101  
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);
105 -
106 -    /* Compute offset within the tile */
107 -    tileOffset = tileAddress - (tileNumber << 12);
108 -    GDBG_INFO(80, "\ttileOffset: 0x%08lx\n",tileOffset);
109 -
110 -    /* Compute scanline within the tile */
111 -    tileScanline = tileOffset >> 7;
112 -    GDBG_INFO(80, "\ttileScanline: 0x%08lx\n",tileScanline);
113 -
114 -    /* Compute tile X offset within the row */
115 -    tileXOffset = tileNumber - (tileRow * bInfo->buffInfo.bufStrideInTiles);
116 -    GDBG_INFO(80, "\ttileXOffset: %d\n",tileXOffset);
117 -
118 -    /* Compute Y offset in LFB space */
119 -    lfbYOffset = (tileRow * 32 + tileScanline);
120 -
121 -    /* Compute LFB address of tile start */
122 -    lfbAddress =  driInfo.backOffset + lfbYOffset * lfbBufferStride + tileXOffset * 128;
123 -
124 -    GDBG_INFO(80, "\tlfbAddress: %08lx\n", lfbAddress);
125 -    retVal = lfbAddress;
126 -  } else {
127 -    retVal = physAddress;
128 -  }
129 -  return retVal;
130 -}
131  FxU32 
132  hwcInitAGPFifo(hwcBoardInfo *bInfo, FxBool enableHoleCounting) 
133  {
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
136 @@ -614,7 +614,7 @@
137        e = pointers;
138        if (mode)
139          e = *(float **)e;
140 -      (float *)pointers += stride;
141 +      pointers += stride;
142        
143        ptX = FARRAY(e, gc->state.vData.vertexInfo.offset);
144        ptY = FARRAY(e, gc->state.vData.vertexInfo.offset+4);
145 @@ -715,7 +715,7 @@
146        if (mode)
147          e = *(float **)e;
148        oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset);        
149 -      (float *)pointers += stride;
150 +      pointers += stride;
151        
152        ptX = FARRAY(e, gc->state.vData.vertexInfo.offset)
153          *oow*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
154 @@ -837,9 +837,9 @@
155          v1 = *(float **)v1;
156          v2 = *(float **)v2;
157        }
158 -      (float *)pointers += stride;
159 +      pointers += stride;
160        if (ltype == GR_LINES)
161 -        (float *)pointers += stride;
162 +        pointers += stride;
163        
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 @@
167            v1 = *(float **)v1;
168            v2 = *(float **)v2;
169          }
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);
177        }
178 @@ -1032,7 +1032,7 @@
179            v1 = *(float **)v1;
180            v2 = *(float **)v2;
181          }
182 -        (float *)pointers += stride;
183 +        pointers += stride;
184          owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
185        }
186        
187 @@ -1366,7 +1366,7 @@
188        b = *(float **)b;
189        c = *(float **)c;
190      }
191 -    (float *)pointers += stride*3;
192 +    pointers += stride*3;
193  
194      /* move culling test to here */
195      {
196 @@ -1540,7 +1540,7 @@
197        b = *(float **)b;
198        c = *(float **)c;
199      }
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;
208      while (sCount--) {
209 -      (float *)pointers += stride;
210 +      pointers += stride;
211        if (mode) {
212          v[1] = *(float **)pointers;
213          v[2] = *((float **)pointers+1);
214 @@ -1747,7 +1747,7 @@
215          _grAADrawTriangles(1, type, 3, v);
216        else
217          _grAAVpDrawTriangles(1, type, 3, v);    
218 -      (float *)pointers += stride;
219 +      pointers += stride;
220        flip = ~flip;
221      }
222      flip = ~flip;
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
225 @@ -403,7 +403,7 @@
226          vPtr = pointers;
227          if (mode) vPtr = *(float **)vPtr;
228          
229 -        (float *)pointers += stride;
230 +        pointers += stride;
231          
232          GDBG_INFO_MORE(gc->myLevel, "(%f %f)\n",  
233                         FARRAY(vPtr,gc->state.vData.vertexInfo.offset), 
234 @@ -492,7 +492,7 @@
235          if (mode)
236            vPtr = *(float **)vPtr;
237          oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset);        
238 -        (float *)pointers += stride;
239 +        pointers += stride;
240          
241          {
242            FxU32 x, y;
243 @@ -617,9 +617,9 @@
244            a = *(float **)a;
245            b = *(float **)b;
246          }
247 -        (float *)pointers += stride;
248 +        pointers += stride;
249          if (ltype == GR_LINES)
250 -          (float *)pointers += stride;
251 +          pointers += stride;
252          
253          /*
254          ** compute absolute deltas and draw from low Y to high Y
255 @@ -779,7 +779,7 @@
256              a = *(float **)a;
257              b = *(float **)b;
258            }
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);        
263            pointers += stride;
264 @@ -782,7 +782,7 @@
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;
270          }
271          else {
272            owa = oowa = oowb;
273 @@ -792,7 +792,7 @@
274              a = *(float **)a;
275              b = *(float **)b;
276            }
277 -          (float *)pointers += stride;
278 +          pointers += stride;
279            owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
280          }
281          fay = tmp1 = FARRAY(a, gc->state.vData.vertexInfo.offset+4)
282 @@ -944,7 +944,7 @@
283          vPtr = pointers;
284          if (mode)
285            vPtr = *(float **)vPtr;
286 -        (float *)pointers += stride;
287 +        pointers += stride;
288          
289          i = gc->tsuDataList[dataElem];
290          
291 @@ -984,7 +984,7 @@
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;
297          
298          TRI_VP_SETFS(vPtr,oow);
299        }
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
302 @@ -188,7 +188,7 @@
303          vPtr = pointers;
304          if (mode)
305            vPtr = *(float **)vPtr;
306 -        (float *)pointers += stride;
307 +        pointers += stride;
308          
309          TRI_SETF(FARRAY(vPtr, 0));
310          dataElem = 0;
311 @@ -228,7 +228,7 @@
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;
317  
318          TRI_VP_SETFS(vPtr, oow);
319        }
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
322 @@ -450,7 +450,7 @@
323      else {
324        while ((int)Count >= 3) {
325          grDrawTriangle(*(float **)pointers, *((float **)pointers+1), *((float **)pointers+2));
326 -        (float *)pointers += 3;
327 +        pointers += 3;
328          Count -= 3;
329        }
330      }
This page took 0.079469 seconds and 3 git commands to generate.