1 --- Glide3/cvg/glide3/src/makefile.linux.ia64-foo Thu Dec 21 14:30:58 2000
2 +++ Glide3/cvg/glide3/src/makefile.linux Thu Dec 21 14:31:48 2000
5 TAG_REGEXP = $(BUILD_ROOT)/$(FX_GLIDE_HW)/$(FX_HW_PROJECTS)/src/glide.rx
7 +ARCH := $(patsubst sparc64,sparc,$(patsubst i%86,i386,$(shell uname -m)))
9 # Compile for specific hardware
10 ifeq ($(FX_GLIDE_HW),cvg)
13 FX_GLIDE_CTRISETUP = 0
15 +FX_GLIDE_CTRISETUP = 1
20 --- Glide3/h3/glide3/src/cpudtect.S.ia64-foo Wed Nov 24 16:44:53 1999
21 +++ Glide3/h3/glide3/src/cpudtect.S Thu Dec 21 16:38:48 2000
23 /* 2 3/04/97 9:10p Dow */
24 /* Neutered mutiplatform multiheaded monster. */
29 + .global _cpu_detect_asm
30 + .proc _cpu_detect_asm
36 + .end _cpu_detect_asm
38 +#elif defined(__alpha__) /* !__ia64__ */
41 + .globl _cpu_detect_asm
42 + .ent _cpu_detect_asm
47 + .end _cpu_detect_asm
49 +#else /* !__ia64__ */
54 .size double_precision_asm,.L_END_double_precision_asm-double_precision_asm
58 +#endif /* !__ia64__ */
59 --- Glide3/h3/glide3/src/diget.c.ia64-foo Wed Nov 24 16:44:54 1999
60 +++ Glide3/h3/glide3/src/diget.c Thu Dec 21 14:27:40 2000
64 case GR_SURFACE_TEXTURE:
66 + if (plength == sizeof(long)) {
69 - *params = (FxU32) &gc->tBuffer;
70 + *(long *)params = (long) &gc->tBuffer;
74 --- Glide3/h3/glide3/src/disst.c.ia64-foo Wed Nov 24 16:44:54 1999
75 +++ Glide3/h3/glide3/src/disst.c Thu Dec 21 14:27:40 2000
77 GrErrorCallback( "grSstSelect: non-existent SST", FXTRUE );
79 _GlideRoot.current_sst = which;
80 - setThreadValue( (FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst] );
81 + setThreadValue( (long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
83 #ifdef GLIDE_MULTIPLATFORM
84 _GlideRoot.curGCFuncs = _GlideRoot.curGC->gcFuncs;
85 --- Glide3/h3/glide3/src/distrip.c.ia64-foo Wed Nov 24 16:44:54 1999
86 +++ Glide3/h3/glide3/src/distrip.c Thu Dec 21 14:27:40 2000
90 while ((int)Count >= 3) {
91 - b_ptr = (void *)((FxU32)pointers + stride);
92 - c_ptr = (void *)((FxU32)pointers + stride*2);
93 + b_ptr = (void *)((long)pointers + stride);
94 + c_ptr = (void *)((long)pointers + stride*2);
95 TRISETUP(pointers, b_ptr, c_ptr);
96 - pointers = (void *)((FxU32)c_ptr + stride);
97 + pointers = (void *)((long)c_ptr + stride);
101 --- Glide3/h3/glide3/src/fifo.c.ia64-foo Wed Nov 24 16:44:55 1999
102 +++ Glide3/h3/glide3/src/fifo.c Thu Dec 21 14:27:40 2000
107 -#define GEN_INDEX(a) ((((FxU32) a) - ((FxU32) gc->reg_ptr)) >> 2)
108 +#define GEN_INDEX(a) ((((long) a) - ((long) gc->reg_ptr)) >> 2)
111 _grFifoWriteDebug(FxU32 addr, FxU32 val, FxU32 fifoPtr)
117 FxU32 wrapAddr = 0x00UL;
121 GR_ASSERT(blockSize > 0);
127 wrapAddr = (FxU32)gc->cmdTransportInfo.fifoPtr;
130 /* Update roomXXX fields for the actual wrap */
131 gc->cmdTransportInfo.roomToReadPtr -= gc->cmdTransportInfo.roomToEnd;
132 @@ -1047,10 +1051,10 @@
138 _grHwFifoPtr(FxBool ignored)
143 FxU32 status, readPtrL1, readPtrL2;
145 @@ -1069,7 +1073,7 @@
147 readPtrL2 = GET(gc->cRegs->cmdFifo0.readPtrL);
148 } while (readPtrL1 != readPtrL2);
149 - rVal = (((FxU32)gc->cmdTransportInfo.fifoStart) +
150 + rVal = (((long)gc->cmdTransportInfo.fifoStart) +
152 (FxU32)gc->cmdTransportInfo.fifoOffset);
154 @@ -1191,13 +1195,13 @@
155 gcFifo=&gc->cmdTransportInfo;
156 readPos=readPos-gcFifo->fifoOffset;
157 gcFifo->fifoPtr = gcFifo->fifoStart + (readPos>>2);
158 - gcFifo->fifoRead = (FxU32)gcFifo->fifoPtr;
159 + gcFifo->fifoRead = (long)gcFifo->fifoPtr;
161 gcFifo=&gc->cmdTransportInfo;
162 gcFifo->fifoPtr = gc->rawLfb+(fifoPtr>>2);
163 gcFifo->fifoRead = ((int)gc->rawLfb)+fifoRead;
165 - gcFifo->roomToReadPtr = gcFifo->fifoRead-((int)gcFifo->fifoPtr)-FIFO_END_ADJUST-sizeof(FxU32);
166 + gcFifo->roomToReadPtr = gcFifo->fifoRead-((long)gcFifo->fifoPtr)-FIFO_END_ADJUST-sizeof(FxU32);
167 if (gcFifo->roomToReadPtr<0) gcFifo->roomToReadPtr+=gcFifo->fifoSize;
168 gcFifo->roomToEnd = gcFifo->fifoSize -
169 ((gcFifo->fifoPtr-gcFifo->fifoStart)<<2) -
170 @@ -1215,7 +1219,7 @@
172 gcFifo=&gc->cmdTransportInfo;
173 *fifoPtr=(gcFifo->fifoPtr-gc->rawLfb)<<2;
174 - *fifoRead=(gcFifo->fifoRead-(int)gc->rawLfb);
175 + *fifoRead=(gcFifo->fifoRead-(long)gc->rawLfb);
179 --- Glide3/h3/glide3/src/fxcmd.h.ia64-foo Wed Nov 24 16:44:55 1999
180 +++ Glide3/h3/glide3/src/fxcmd.h Thu Dec 21 14:27:40 2000
182 /* NB: This should be used sparingly because it does a 'real' hw read
185 -FxU32 _grHwFifoPtr(FxBool);
186 +long _grHwFifoPtr(FxBool);
187 #define HW_FIFO_PTR(a) _grHwFifoPtr(a)
192 #define REG_GROUP_END() \
194 - ASSERT((((FxU32)_regGroupFifoPtr - (FxU32)gc->cmdTransportInfo.fifoPtr) >> 2) == _groupNum + 1); \
195 - gc->cmdTransportInfo.fifoRoom -= ((FxU32)_regGroupFifoPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
196 + ASSERT((((long)_regGroupFifoPtr - (long)gc->cmdTransportInfo.fifoPtr) >> 2) == _groupNum + 1); \
197 + gc->cmdTransportInfo.fifoRoom -= ((long)_regGroupFifoPtr - (long)gc->cmdTransportInfo.fifoPtr); \
198 gc->cmdTransportInfo.fifoPtr = (FxU32*)_regGroupFifoPtr; \
199 GDBG_INFO(gc->myLevel + 200, "\tGroupEnd: (0x%X : 0x%X)\n", \
200 gc->cmdTransportInfo.fifoPtr, gc->cmdTransportInfo.fifoRoom); \
201 @@ -1028,7 +1028,7 @@
205 - gc->cmdTransportInfo.fifoRoom -= ((FxU32)tPackPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
206 + gc->cmdTransportInfo.fifoRoom -= ((long)tPackPtr - (long)gc->cmdTransportInfo.fifoPtr); \
207 gc->cmdTransportInfo.fifoPtr = tPackPtr; \
208 GDBG_INFO(gc->myLevel + 200, "\tTriEnd: (0x%X : 0x%X)\n", tPackPtr, gc->cmdTransportInfo.fifoRoom); \
210 @@ -1047,12 +1047,12 @@
211 GR_CHECK_COMPATABILITY(FN_NAME, \
213 "Called before grSstWinOpen()"); \
214 - GR_ASSERT(((FxU32)(packetPtr) & FIFO_ALIGN_MASK) == 0); /* alignment */ \
215 + GR_ASSERT(((long)(packetPtr) & FIFO_ALIGN_MASK) == 0); /* alignment */ \
216 GR_ASSERT((__numWords) > 0); /* packet size */ \
217 GR_ASSERT((__numWords) < ((0x01 << 19) - 2)); \
218 GR_ASSERT((((FxU32)(__numWords) + 2) << 2) <= (FxU32)gc->cmdTransportInfo.fifoRoom); \
219 - GR_ASSERT(((FxU32)packetPtr + (((__numWords) + 2) << 2)) < \
220 - (FxU32)gc->cmdTransportInfo.fifoEnd); \
221 + GR_ASSERT(((unsigned long)packetPtr + (((__numWords) + 2) << 2)) < \
222 + (unsigned long)gc->cmdTransportInfo.fifoEnd); \
223 GR_ASSERT((hdr2 & 0xE0000000UL) == 0x00UL); \
224 GR_ASSERT(((__addr) & 0x03UL) == 0x00UL); \
226 @@ -1097,8 +1097,8 @@
228 #define FIFO_LINEAR_WRITE_END \
229 DEBUGFIFODUMP_LINEAR(gc->cmdTransportInfo.fifoPtr); \
230 - GR_ASSERT((((FxU32)packetPtr - (FxU32)gc->cmdTransportInfo.fifoPtr) >> 2) == __writeSize + 2); \
231 - gc->cmdTransportInfo.fifoRoom -= ((FxU32)packetPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
232 + GR_ASSERT((((long)packetPtr - (long)gc->cmdTransportInfo.fifoPtr) >> 2) == __writeSize + 2); \
233 + gc->cmdTransportInfo.fifoRoom -= ((long)packetPtr - (long)gc->cmdTransportInfo.fifoPtr); \
234 gc->cmdTransportInfo.fifoPtr = packetPtr; \
235 GDBG_INFO(gc->myLevel + 200, "\tLinearEnd: (0x%X : 0x%X)\n", \
236 packetPtr, gc->cmdTransportInfo.fifoRoom); \
237 @@ -1312,7 +1312,7 @@
238 #define REG_GROUP_SETF_CLAMP(__regBase, __regAddr, __val) \
240 const FxU32 fpClampVal = FP_FLOAT_CLAMP(__val); \
241 - REG_GROUP_ASSERT(__regAddr, fpClampVal, FXTRUE); \
242 + REG_GROUP_ASSERT(__regAddr, fpClampVal, FXTRUE); \
243 SET(((FxU32*)(__regBase))[offsetof(SstRegs, __regAddr) >> 2], fpClampVal); \
244 GR_INC_SIZE(sizeof(FxU32)); \
246 @@ -1512,7 +1512,7 @@
250 - argb = *((FxU32 *)((int)_s + i)) & 0x00ffffff; \
251 + argb = *((FxU32 *)((long)_s + i)) & 0x00ffffff; \
252 TRI_SETF(*((float *)&argb)); \
254 i = gc->tsuDataList[dataElem]; \
255 --- Glide3/h3/glide3/src/fxglide.h.ia64-foo Fri Nov 24 13:36:48 2000
256 +++ Glide3/h3/glide3/src/fxglide.h Thu Dec 21 14:27:40 2000
257 @@ -1053,7 +1053,7 @@
258 SET(*curFifoPtr++, *curPktData++); \
260 GR_INC_SIZE((__writeCount) * sizeof(FxU32)); \
261 - gc->cmdTransportInfo.fifoRoom -= ((FxU32)curFifoPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
262 + gc->cmdTransportInfo.fifoRoom -= ((long)curFifoPtr - (long)gc->cmdTransportInfo.fifoPtr); \
263 gc->cmdTransportInfo.fifoPtr = curFifoPtr; \
266 @@ -1172,7 +1172,7 @@
269 FxU32* fifoPtr; /* Current write pointer into fifo */
270 - FxU32 fifoRead; /* Last known hw read ptr.
271 + long fifoRead; /* Last known hw read ptr.
272 * If on an sli enabled system this will be
273 * the 'closest' hw read ptr of the sli
275 @@ -1258,11 +1258,12 @@
282 lfbBuffers[4]; /* Tile relative addresses of the color/aux
283 * buffers for lfbReads.
285 - FxU32 lockPtrs[2]; /* pointers to locked buffers */
286 + long lockPtrs[2]; /* pointers to locked buffers */
290 @@ -1489,6 +1490,10 @@
291 # define P6FENCE __eieio()
292 #elif defined(__GNUC__) && defined(__i386__)
293 #define P6FENCE asm("xchg %%eax, %0" : : "m" (_GlideRoot.p6Fencer) : "eax");
294 +#elif defined(__GNUC__) && defined(__ia64__)
295 +# define P6FENCE asm volatile ("mf.a" ::: "memory");
296 +#elif defined(__alpha__)
297 +# define P6FENCE asm volatile("mb" ::: "memory");
298 #else /* !defined ( P6FENCE ) */
299 # error "P6 Fencing code needs to be added for this compiler"
300 #endif /* !defined ( P6FENCE ) */
301 @@ -1824,7 +1829,7 @@
305 -extern FxU32 threadValueLinux;
306 +extern long threadValueLinux;
307 #define getThreadValueFast() threadValueLinux
310 @@ -1839,9 +1844,9 @@
311 initThreadStorage( void );
314 -setThreadValue( FxU32 value );
315 +setThreadValue( long value );
319 getThreadValueSLOW( void );
322 @@ -2119,7 +2124,11 @@
323 #if defined(GLIDE_SANITY_ASSERT)
324 #define GR_ASSERT(exp) ((void)((!(exp)) ? (_grAssert(#exp, __FILE__, __LINE__),0) : 0xFFFFFFFF))
326 -#define GR_ASSERT(exp) ((void)(0 && ((FxU32)(exp))))
328 +# define GR_ASSERT(exp) ((void) 0)
330 +# define GR_ASSERT(exp) ((void)(0 && ((FxU32)(exp))))
334 #define INTERNAL_CHECK(__name, __cond, __msg, __fatalP) \
335 @@ -2189,7 +2198,7 @@
336 #define HW_TEX_PTR(__b) ((FxU32*)(((FxU32)(__b)) + HW_TEXTURE_OFFSET))
338 /* access a floating point array with a byte index */
339 -#define FARRAY(p,i) (*(float *)((i)+(int)(p)))
340 +#define FARRAY(p,i) (*(float *)((i)+(long)(p)))
341 #define ArraySize(__a) (sizeof(__a) / sizeof((__a)[0]))
344 --- Glide3/h3/glide3/src/g3df.c.ia64-foo Wed Nov 24 16:44:56 1999
345 +++ Glide3/h3/glide3/src/g3df.c Thu Dec 21 14:27:40 2000
347 * Added GR_DIENTRY for di glide functions
354 --- Glide3/h3/glide3/src/gaa.c.ia64-foo Wed Nov 24 16:44:56 1999
355 +++ Glide3/h3/glide3/src/gaa.c Thu Dec 21 14:27:40 2000
359 ia = gc->state.vData.pargbInfo.offset;
360 - *((FxU32 *)&v1a)=*((FxU32 *)((int)a + ia))&0x00ffffff;
361 - *((FxU32 *)&v2a)=*((FxU32 *)((int)b + ia))&0x00ffffff;
362 + *((FxU32 *)&v1a)=*((FxU32 *)((long)a + ia))&0x00ffffff;
363 + *((FxU32 *)&v2a)=*((FxU32 *)((long)b + ia))&0x00ffffff;
371 - argb = *((FxU32 *)((int)e + i)) & 0x00ffffff;
372 + argb = *((FxU32 *)((long)e + i)) & 0x00ffffff;
373 TRI_SETF(*((float *)&argb));
379 if (gc->state.vData.colorType != GR_FLOAT) {
380 - *((FxU32 *)&v1a)=*((FxU32 *)((int)v1 + ia))&0x00ffffff;
381 - *((FxU32 *)&v2a)=*((FxU32 *)((int)v2 + ia))&0x00ffffff;
382 + *((FxU32 *)&v1a)=*((FxU32 *)((long)v1 + ia))&0x00ffffff;
383 + *((FxU32 *)&v2a)=*((FxU32 *)((long)v2 + ia))&0x00ffffff;
386 if (adx >= ady) { /* X major line */
387 @@ -1255,8 +1255,8 @@
390 ia = gc->state.vData.pargbInfo.offset;
391 - *((FxU32 *)&v1a)=*((FxU32 *)((int)a + ia))&0x00ffffff;
392 - *((FxU32 *)&v2a)=*((FxU32 *)((int)b + ia))&0x00ffffff;
393 + *((FxU32 *)&v1a)=*((FxU32 *)((long)a + ia))&0x00ffffff;
394 + *((FxU32 *)&v2a)=*((FxU32 *)((long)b + ia))&0x00ffffff;
398 --- Glide3/h3/glide3/src/gdraw.c.ia64-foo Tue Feb 15 17:35:58 2000
399 +++ Glide3/h3/glide3/src/gdraw.c Thu Dec 21 14:27:40 2000
400 @@ -233,13 +233,15 @@
401 GR_ENTRY(grDrawLine, void, (const void *a, const void *b))
403 #define FN_NAME "grDrawLine"
404 + const void *vertices[2] = {a, b};
406 GR_BEGIN_NOFIFOCHECK(FN_NAME, 91);
407 GDBG_INFO_MORE(gc->myLevel, "(a = 0x%x, b = 0x%x)\n", a, b);
409 if (gc->state.grEnableArgs.primitive_smooth_mode & GR_AA_ORDERED_LINES_MASK)
410 - _grAADrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINES, 2, (void *)&a);
411 + _grAADrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINES, 2, vertices);
413 - _grDrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINES, 2, (void *)&a);
414 + _grDrawLineStrip(GR_VTX_PTR_ARRAY, GR_LINES, 2, vertices);
419 GR_INC_SIZE(sizeof(FxU32))
422 - gc->cmdTransportInfo.fifoRoom -= ((FxU32)packetPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
423 + gc->cmdTransportInfo.fifoRoom -= ((long)packetPtr - (long)gc->cmdTransportInfo.fifoPtr); \
424 gc->cmdTransportInfo.fifoPtr = packetPtr; \
428 * except the data set up is from the pointer array and
431 - FxI32 stride = mode;
434 /* we snap to an integer by adding a large enough number that it
435 * shoves all fraction bits off the right side of the mantissa.
438 #define POINTS_BUFFER 100
442 stride = gc->state.vData.vStride;
444 + stride = sizeof(float *) / sizeof (float);
446 if (gc->state.grCoordinateSpaceArgs.coordinate_space_mode == GR_WINDOW_COORDS) {
451 FxU32 vertexParamOffset;
452 - FxI32 stride = mode;
455 #define DX gc->pool.ftemp1
456 #define ADY gc->pool.ftemp2
459 #define LINES_BUFFER 100
463 stride = gc->state.vData.vStride;
465 + stride = sizeof(float *) / sizeof (float);
467 if (ltype == GR_LINES)
468 sCount = count >> 1; /* line list */
470 @@ -618,16 +625,16 @@
471 ** compute absolute deltas and draw from low Y to high Y
473 ADY = FARRAY(b, gc->state.vData.vertexInfo.offset+4) - FARRAY(a, gc->state.vData.vertexInfo.offset+4);
478 tv = a; a = b; b = tv;
479 i ^= 0x80000000; /* ady = -ady; */
480 - (*(long *)&ADY) = i;
481 + (*(int *)&ADY) = i;
484 DX = FARRAY(b, gc->state.vData.vertexInfo.offset) - FARRAY(a, gc->state.vData.vertexInfo.offset);
488 j ^= 0x80000000; /* adx = -adx; */
491 ** compute absolute deltas and draw from low Y to high Y
498 owa = oowb; owb = oowa;
501 tv = a; a = b; b = tv;
502 i ^= 0x80000000; /* ady = -ady; */
503 - (*(long *)&ADY) = i;
504 + (*(int *)&ADY) = i;
506 fax = FARRAY(a, gc->state.vData.vertexInfo.offset)
507 *owa*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
509 *owb*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
515 j ^= 0x80000000; /* adx = -adx; */
521 - FxI32 stride = mode;
525 GR_BEGIN_NOFIFOCHECK(FN_NAME, 90);
527 GDBG_INFO(110, "%s: paramMask = 0x%x\n", FN_NAME, gc->cmdTransportInfo.paramMask);
532 stride = gc->state.vData.vStride;
535 + stride = sizeof(float *) / sizeof (float);
537 gc->stats.trisProcessed+=(count/3);
539 --- Glide3/h3/glide3/src/gerror.c.ia64-foo Tue Feb 15 17:35:58 2000
540 +++ Glide3/h3/glide3/src/gerror.c Thu Dec 21 14:27:40 2000
543 gdbg_printf("Command Fifo:\n");
544 gdbg_printf("\tSoftware:\n");
545 - gdbg_printf("\t\tfifoPtr: 0x%X\n", (FxU32)gc->cmdTransportInfo.fifoPtr - (FxU32) gc->rawLfb);
546 + gdbg_printf("\t\tfifoPtr: 0x%X\n", (long)gc->cmdTransportInfo.fifoPtr - (long) gc->rawLfb);
547 gdbg_printf("\t\tfifoOffset: 0x%X\n", gc->cmdTransportInfo.fifoOffset);
548 gdbg_printf("\t\tfifoEnd: 0x%X\n", gc->cmdTransportInfo.fifoEnd - gc->rawLfb);
549 gdbg_printf("\t\tfifoSize: 0x%X\n", gc->cmdTransportInfo.fifoSize);
552 if ( !gc->windowed ) {
553 gdbg_printf("\tHardware:\n");
554 - gdbg_printf("\t\treadPtrL: 0x%X\n", HW_FIFO_PTR(FXTRUE) - (FxU32)gc->rawLfb);
555 + gdbg_printf("\t\treadPtrL: 0x%X\n", HW_FIFO_PTR(FXTRUE) - (long)gc->rawLfb);
556 gdbg_printf("\t\tdepth: 0x%X\n", GR_CAGP_GET(depth));
557 gdbg_printf("\t\tholeCount: 0x%X\n", GR_CAGP_GET(holeCount));
558 gdbg_printf("\t\tbaseAddrL: 0x%X\n", GR_CAGP_GET(baseAddrL));
559 --- Glide3/h3/glide3/src/gglide.c.dri.ia64-foo Fri Nov 24 13:36:48 2000
560 +++ Glide3/h3/glide3/src/gglide.c.dri Thu Dec 21 14:27:40 2000
561 @@ -1193,8 +1193,8 @@
562 for ( i = 0; i < MAX_BUFF_PENDING && j == -1; i++) {
563 if (gc->bufferSwaps[i] == 0xffffffff) {
565 - (FxU32) gc->cmdTransportInfo.fifoPtr -
566 - (FxU32) gc->cmdTransportInfo.fifoStart;
567 + (long) gc->cmdTransportInfo.fifoPtr -
568 + (long) gc->cmdTransportInfo.fifoStart;
572 @@ -1236,7 +1236,7 @@
573 REG_GROUP_SET_WAX(hw, srcXY, x | ((driInfo.y+(y-driInfo.y))<<16));
574 REG_GROUP_SET_WAX(hw, dstSize, (w&0x1FFF)|((h&0x1FFF)<<16));
575 REG_GROUP_SET_WAX(hw, dstXY, (x&0x1FFF) | ((y&0x1FFF)<<16));
576 - REG_GROUP_SET_WAX(hw, command, (0xCC<<24) | 0x1 | BIT(8));
577 + REG_GROUP_SET_WAX(hw, command, (0xCCu<<24) | 0x1 | BIT(8));
581 @@ -2168,7 +2168,7 @@
582 * continuing so that any internal glide calls have a valid
583 * gc from tls via GR_DCL_GC. F*ck this up at your own peril.
585 - setThreadValue((FxU32)gc);
586 + setThreadValue((long)gc);
587 #if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
588 /* Flush any remaining commands and cleanup any per gc state */
589 grSurfaceReleaseContext((GrContext_t)gc);
590 --- Glide3/h3/glide3/src/gglide.c.save.ia64-foo Wed Nov 24 16:45:02 1999
591 +++ Glide3/h3/glide3/src/gglide.c.save Thu Dec 21 14:27:40 2000
592 @@ -1163,7 +1163,7 @@
594 depth0 = GET(gc->cRegs->cmdFifo0.depth);
595 depth1 = GET(gc->cRegs->cmdFifo0.depth);
596 - } while (readPtr0 != readPtr1);
597 + } while (depth0 != depth1);
600 for (i = 0; i < MAX_BUFF_PENDING; i++)
601 @@ -1962,7 +1962,7 @@
602 * continuing so that any internal glide calls have a valid
603 * gc from tls via GR_DCL_GC. F*ck this up at your own peril.
605 - setThreadValue((FxU32)gc);
606 + setThreadValue(gc);
607 #if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
608 /* Flush any remaining commands and cleanup any per gc state */
609 grSurfaceReleaseContext((GrContext_t)gc);
610 --- Glide3/h3/glide3/src/glfb.c.dri.ia64-foo Wed Nov 24 16:45:02 1999
611 +++ Glide3/h3/glide3/src/glfb.c.dri Thu Dec 21 14:27:40 2000
613 case GR_LFB_SRC_FMT_ZA16:
614 dstData = (FxU32*)(((FxU16*)dstData) + dst_x);
615 length = src_width * 2;
616 - aligned = !((int)dstData&0x2);
617 + aligned = !((long)dstData&0x2);
618 srcJump = src_stride - length;
619 dstJump = info.strideInBytes - length;
622 length = src_width * 2;
623 dstJump = dst_stride - length;
624 srcJump = info.strideInBytes - length;
625 - aligned = !((int)srcData&0x2);
626 + aligned = !((long)srcData&0x2);
627 odd = (src_y+src_height) & 0x1;
630 --- Glide3/h3/glide3/src/glide.h.ia64-foo Fri Nov 24 13:36:48 2000
631 +++ Glide3/h3/glide3/src/glide.h Thu Dec 21 14:27:40 2000
633 typedef FxU32 GrStipplePattern_t;
634 #endif /* __linux__ */
635 typedef FxU8 GrFog_t;
636 -typedef FxU32 GrContext_t;
637 +typedef unsigned long GrContext_t;
638 typedef int (FX_CALL *GrProc)();
641 --- Glide3/h3/glide3/src/gpci.c.ia64-foo Wed Nov 24 16:44:57 1999
642 +++ Glide3/h3/glide3/src/gpci.c Thu Dec 21 14:27:40 2000
643 @@ -418,14 +418,14 @@
647 - { _trisetup_null, _trisetup_null },
648 - { _trisetup_null, _trisetup_null },
649 + { (GrTriSetupProc) _trisetup_null, (GrTriSetupProc) _trisetup_null },
650 + { (GrTriSetupProc) _trisetup_null, (GrTriSetupProc) _trisetup_null },
653 /* Clip coordinates */
655 - { _trisetup_null, _trisetup_null },
656 - { _trisetup_null, _trisetup_null },
657 + { (GrTriSetupProc) _trisetup_null, (GrTriSetupProc) _trisetup_null },
658 + { (GrTriSetupProc) _trisetup_null, (GrTriSetupProc) _trisetup_null },
662 @@ -1024,7 +1024,7 @@
665 /* If there is no current gc in tls then set the current context. */
666 - if (gc == NULL) setThreadValue((FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst]);
667 + if (gc == NULL) setThreadValue((long)&_GlideRoot.GCs[_GlideRoot.current_sst]);
670 case DLL_THREAD_DETACH:
671 --- Glide3/h3/glide3/src/gsst.c.dri.ia64-foo Wed Nov 24 16:45:01 1999
672 +++ Glide3/h3/glide3/src/gsst.c.dri Thu Dec 21 14:27:40 2000
673 @@ -542,30 +542,30 @@
677 - GR_RESOLUTION_320x200, 320, 200, /* 0x0 */
678 - GR_RESOLUTION_320x240, 320, 240, /* 0x1 */
679 - GR_RESOLUTION_400x256, 400, 256, /* 0x2 */
680 - GR_RESOLUTION_512x384, 512, 384, /* 0x3 */
681 - GR_RESOLUTION_640x200, 640, 200, /* 0x4 */
682 - GR_RESOLUTION_640x350, 640, 350, /* 0x5 */
683 - GR_RESOLUTION_640x400, 640, 400, /* 0x6 */
684 - GR_RESOLUTION_640x480, 640, 480, /* 0x7 */
685 - GR_RESOLUTION_800x600, 800, 600, /* 0x8 */
686 - GR_RESOLUTION_960x720, 960, 720, /* 0x9 */
687 - GR_RESOLUTION_856x480, 856, 480, /* 0xa */
688 - GR_RESOLUTION_512x256, 512, 256, /* 0xb */
689 - GR_RESOLUTION_1024x768, 1024, 768, /* 0xC */
690 - GR_RESOLUTION_1280x1024, 1280, 1024, /* 0xD */
691 - GR_RESOLUTION_1600x1200, 1600, 1200, /* 0xE */
692 - GR_RESOLUTION_400x300, 400, 300, /* 0xF */
693 - GR_RESOLUTION_1152x864, 1152, 864, /* 0x10 */
694 - GR_RESOLUTION_1280x960, 1280, 960, /* 0x11 */
695 - GR_RESOLUTION_1600x1024, 1600, 1024, /* 0x12 */
696 - GR_RESOLUTION_1792x1344, 1792, 1344, /* 0x13 */
697 - GR_RESOLUTION_1856x1392, 1856, 1392, /* 0x14 */
698 - GR_RESOLUTION_1920x1440, 1920, 1440, /* 0x15 */
699 - GR_RESOLUTION_2048x1536, 2048, 1536, /* 0x16 */
700 - GR_RESOLUTION_2048x2048, 2048, 2048 /* 0x17 */
701 + { GR_RESOLUTION_320x200, 320, 200 }, /* 0x0 */
702 + { GR_RESOLUTION_320x240, 320, 240 }, /* 0x1 */
703 + { GR_RESOLUTION_400x256, 400, 256 }, /* 0x2 */
704 + { GR_RESOLUTION_512x384, 512, 384 }, /* 0x3 */
705 + { GR_RESOLUTION_640x200, 640, 200 }, /* 0x4 */
706 + { GR_RESOLUTION_640x350, 640, 350 }, /* 0x5 */
707 + { GR_RESOLUTION_640x400, 640, 400 }, /* 0x6 */
708 + { GR_RESOLUTION_640x480, 640, 480 }, /* 0x7 */
709 + { GR_RESOLUTION_800x600, 800, 600 }, /* 0x8 */
710 + { GR_RESOLUTION_960x720, 960, 720 }, /* 0x9 */
711 + { GR_RESOLUTION_856x480, 856, 480 }, /* 0xa */
712 + { GR_RESOLUTION_512x256, 512, 256 }, /* 0xb */
713 + { GR_RESOLUTION_1024x768, 1024, 768 }, /* 0xC */
714 + { GR_RESOLUTION_1280x1024, 1280, 1024 }, /* 0xD */
715 + { GR_RESOLUTION_1600x1200, 1600, 1200 }, /* 0xE */
716 + { GR_RESOLUTION_400x300, 400, 300 }, /* 0xF */
717 + { GR_RESOLUTION_1152x864, 1152, 864 }, /* 0x10 */
718 + { GR_RESOLUTION_1280x960, 1280, 960 }, /* 0x11 */
719 + { GR_RESOLUTION_1600x1024, 1600, 1024 }, /* 0x12 */
720 + { GR_RESOLUTION_1792x1344, 1792, 1344 }, /* 0x13 */
721 + { GR_RESOLUTION_1856x1392, 1856, 1392 }, /* 0x14 */
722 + { GR_RESOLUTION_1920x1440, 1920, 1440 }, /* 0x15 */
723 + { GR_RESOLUTION_2048x1536, 2048, 1536 }, /* 0x16 */
724 + { GR_RESOLUTION_2048x2048, 2048, 2048 } /* 0x17 */
727 /* ---------------------------------------------
729 gc->bufferSwaps[t] = 0xffffffff;
732 - gc->bufferSwaps[0] = ((FxU32) gc->cmdTransportInfo.fifoPtr -
733 - (FxU32) gc->cmdTransportInfo.fifoStart);
734 + gc->bufferSwaps[0] = ((long) gc->cmdTransportInfo.fifoPtr -
735 + (long) gc->cmdTransportInfo.fifoStart);
737 gc->swapsPending = 1;
740 * current gc. This gc is valid for all threads in the fullscreen
743 - setThreadValue( (FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst] );
744 + setThreadValue( (long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
747 /* Partial Argument Validation */
748 @@ -1076,12 +1076,12 @@
749 for (buffer = 0; buffer < nColBuffers; buffer++) {
750 gc->buffers[buffer] = bufInfo->colBuffStart[buffer];
751 GDBG_INFO(80, "Buffer %d: Start: 0x%x\n", buffer, gc->buffers[buffer]);
752 - gc->lfbBuffers[buffer] = (FxU32)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
753 + gc->lfbBuffers[buffer] = (long)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
755 if (nAuxBuffers != 0) {
756 gc->buffers[buffer] = bufInfo->auxBuffStart;
757 GDBG_INFO(80, "Aux Buffer: Start: 0x%x\n", gc->buffers[buffer]);
758 - gc->lfbBuffers[buffer] = (FxU32)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
759 + gc->lfbBuffers[buffer] = (long)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
762 vInfo->hWnd = gc->grHwnd;
763 @@ -1190,7 +1190,7 @@
764 gc->tBuffer.bufBPP = 0xffffffff; /* Don't matter to me */
766 GDBG_INFO(1, "autoBump: 0x%x\n", _GlideRoot.environment.autoBump);
767 - if (gc->cmdTransportInfo.autoBump = _GlideRoot.environment.autoBump) {
768 + if ((gc->cmdTransportInfo.autoBump = _GlideRoot.environment.autoBump) != 0) {
769 if (!hwcInitFifo( bInfo, gc->cmdTransportInfo.autoBump)) {
770 hwcRestoreVideo(bInfo);
771 GrErrorCallback(hwcGetErrorString(), FXFALSE);
772 @@ -1226,7 +1226,7 @@
773 gc->tmu_state[0].total_mem = gc->tramSize;
775 /* gc->fbOffset = (FxU32)fxHalFbiGetMemory((SstRegs*)gc->reg_ptr); */
776 - gc->fbOffset = (FxU32)gc->rawLfb;
777 + gc->fbOffset = (long)gc->rawLfb;
778 gc->tmuMemInfo[0].tramOffset = 0x200000;
779 gc->tmuMemInfo[0].tramSize = 0x200000;
780 gc->tmuMemInfo[1].tramOffset = gc->tmuMemInfo[0].tramSize + gc->tmuMemInfo[0].tramOffset;
781 @@ -1440,7 +1440,10 @@
785 - _grImportFifo(*driInfo.fifoPtr, *driInfo.fifoRead);
787 + extern void _grImportFifo (int, int);
788 + _grImportFifo(*driInfo.fifoPtr, *driInfo.fifoRead);
792 /* The hw is now in a usable state from the fifo macros.
793 @@ -1591,7 +1594,7 @@
794 * the tls gc explicitly otherwise other whacky-ness (read 'random
795 * crashes' will ensue).
797 - setThreadValue((FxU32)gc);
798 + setThreadValue((long) gc);
799 if ((gc != NULL) && gc->open) grFlush();
801 /* Make sure that the user specified gc is not whacked */
802 --- Glide3/h3/glide3/src/gsst.c.save.ia64-foo Wed Nov 24 16:45:00 1999
803 +++ Glide3/h3/glide3/src/gsst.c.save Thu Dec 21 14:27:40 2000
805 * current gc. This gc is valid for all threads in the fullscreen
808 - setThreadValue( (FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst] );
809 + setThreadValue( (long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
812 /* Partial Argument Validation */
813 @@ -1056,12 +1056,12 @@
814 for (buffer = 0; buffer < nColBuffers; buffer++) {
815 gc->buffers[buffer] = bufInfo->colBuffStart[buffer];
816 GDBG_INFO(80, "Buffer %d: Start: 0x%x\n", buffer, gc->buffers[buffer]);
817 - gc->lfbBuffers[buffer] = (FxU32)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
818 + gc->lfbBuffers[buffer] = (long)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
820 if (nAuxBuffers != 0) {
821 gc->buffers[buffer] = bufInfo->auxBuffStart;
822 GDBG_INFO(80, "Aux Buffer: Start: 0x%x\n", gc->buffers[buffer]);
823 - gc->lfbBuffers[buffer] = (FxU32)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
824 + gc->lfbBuffers[buffer] = (long)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
827 vInfo->hWnd = gc->grHwnd;
828 @@ -1552,7 +1552,7 @@
829 * the tls gc explicitly otherwise other whacky-ness (read 'random
830 * crashes' will ensue).
832 - setThreadValue((FxU32)gc);
833 + setThreadValue((long)gc);
834 if ((gc != NULL) && gc->open) grFlush();
836 /* Make sure that the user specified gc is not whacked */
837 --- Glide3/h3/glide3/src/gtexdl.c.ia64-foo Wed Nov 24 16:44:57 1999
838 +++ Glide3/h3/glide3/src/gtexdl.c Thu Dec 21 14:27:40 2000
840 while(i < start + slopCount) {
843 - entry = (0x80000000 | ((i & 0xFE) << 23) | pal->data[i] & 0xFFFFFF);
844 + entry = (0x80000000 | ((i & 0xFE) << 23) | (pal->data[i] & 0xFFFFFF));
846 gc->state.shadow.paletteRow[i>>3].data[i&7] = entry;
847 REG_GROUP_SET(hw, nccTable0[4 + (i & 0x07)], entry );
849 while(i < endIndex) {
852 - entry = (0x80000000 | ((i & 0xFE) << 23) | pal->data[i] & 0xFFFFFF);
853 + entry = (0x80000000 | ((i & 0xFE) << 23) | (pal->data[i] & 0xFFFFFF));
855 gc->state.shadow.paletteRow[i>>3].data[i&7] = entry;
856 REG_GROUP_SET(hw, nccTable0[4 + (i & 0x07)], entry );
861 - entry = (0x80000000 | ((i & 0xFE) << 23) | pal->data[i] & 0xFFFFFF);
862 + entry = (0x80000000 | ((i & 0xFE) << 23) | (pal->data[i] & 0xFFFFFF));
864 gc->state.shadow.paletteRow[i>>3].data[i&7] = entry;
865 REG_GROUP_SET(hw, nccTable0[4 + (i & 0x07)], entry );
866 --- Glide3/h3/glide3/src/gthread.c.ia64-foo Tue Feb 15 17:35:59 2000
867 +++ Glide3/h3/glide3/src/gthread.c Thu Dec 21 14:27:40 2000
870 } /* initThreadStorage */
872 -void setThreadValue( FxU32 value ) {
873 +void setThreadValue( long value ) {
874 GR_CHECK_F( "setThreadValue", !threadInit, "Thread storage not initialized\n" );
875 TlsSetValue( _GlideRoot.tlsIndex, (void*)value );
878 #pragma warning (4:4035) /* No return value */
879 -FxU32 getThreadValueSLOW( void ) {
880 +long getThreadValueSLOW( void ) {
881 GR_CHECK_F( "getThreadValue", !threadInit, "Thread storage not initialized\n" );
888 -void setThreadValue( FxU32 value )
889 +void setThreadValue( long value )
891 _threadValueMacOS = value;
893 @@ -157,18 +157,18 @@
897 -FxU32 threadValueLinux;
898 +long threadValueLinux;
900 void initThreadStorage(void)
904 -void setThreadValue( FxU32 value )
905 +void setThreadValue( long value )
907 threadValueLinux = value;
910 -FxU32 getThreadValueSLOW( void )
911 +long getThreadValueSLOW( void )
913 return threadValueLinux;
915 --- Glide3/h3/glide3/src/makefile.linux.ia64-foo Wed Jul 12 17:33:32 2000
916 +++ Glide3/h3/glide3/src/makefile.linux Thu Dec 21 14:27:40 2000
921 -FX_GLIDE_CTRISETUP = 0
922 +FX_GLIDE_CTRISETUP = 1
925 LCDEFS += -DH3 $(CMDXPORTDEFS)
926 --- Glide3/h3/glide3/tests/.gdbinit.ia64-foo Thu Dec 21 14:27:40 2000
927 +++ Glide3/h3/glide3/tests/.gdbinit Thu Dec 21 14:27:40 2000
929 +dir /r/erikson/usr/src/redhat/BUILD/Glide_V3-DRI-3.10/h3/glide3/src:/r/erikson/usr/src/redhat/BUILD/Glide_V3-DRI-3.10/h3/minihwc:/r/erikson/usr/src/redhat/BUILD/XFree86-4.0/xc/lib/Xxf86vm
930 +set gdbg_debuglevel[80]=255
931 +set gdbg_debuglevel[280]=255
932 --- Glide3/h3/incsrc/gdebug.h.ia64-foo Wed Nov 24 16:45:02 1999
933 +++ Glide3/h3/incsrc/gdebug.h Thu Dec 21 14:27:40 2000
935 #pragma disable_message (111, 201, 302)
936 #endif /* defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) */
938 -#define GDBG_INFO 0 && (unsigned long)
939 -#define GDBG_INFO_MORE 0 && (unsigned long)
940 -#define GDBG_PRINTF 0 && (unsigned long)
942 +# define GDBG_INFO(x...)
943 +# define GDBG_INFO_MORE(x...)
944 +# define GDBG_PRINTF(x...)
946 -#define GDBG_ERROR_SET_CALLBACK 0 && (unsigned long)
947 -#define GDBG_ERROR_CLEAR_CALLBACK 0 && (unsigned long)
948 +# define GDBG_ERROR_SET_CALLBACK(x...)
949 +# define GDBG_ERROR_CLEAR_CALLBACK(x...)
951 +# define GDBG_INFO 0 && (unsigned long)
952 +# define GDBG_INFO_MORE 0 && (unsigned long)
953 +# define GDBG_PRINTF 0 && (unsigned long)
955 +# define GDBG_ERROR_SET_CALLBACK 0 && (unsigned long)
956 +# define GDBG_ERROR_CLEAR_CALLBACK 0 && (unsigned long)
959 #define GDBG_GET_DEBUGLEVEL(x) 0
960 #define GDBG_SET_DEBUGLEVEL(a,b)
961 --- Glide3/h3/incsrc/h3defs.h.ia64-foo Wed Nov 24 16:45:03 1999
962 +++ Glide3/h3/incsrc/h3defs.h Thu Dec 21 14:27:40 2000
965 // this crazy macro tests the sign bit of a float by loading it into
966 // an integer register and then testing the sign bit of the integer
967 -#define FLOAT_ISNEG(f) ((*(int *)(&(f))) < 0)
969 + /* On IA-64, it's faster to do this the obvious way... --davidm 00/08/09 */
970 +# define FLOAT_ISNEG(f) ((f) < 0.0)
972 +# define FLOAT_ISNEG(f) ((*(int *)(&(f))) < 0)
975 // these crazy macros returns the sign of a number (1 if >= 0; -1 if < 0)
976 -#define ISIGN(x) (((x) | 0x40000000L) >> 30)
977 -#define FSIGN(f) ISIGN(*(long *)&f)
979 +# define ISIGN(x) ((x) >= 0 ? 1 : -1)
980 +# define FSIGN(f) ((f) >= 0.0 ? 1 : -1)
982 +# define ISIGN(x) (((x) | 0x40000000L) >> 30)
983 +# define FSIGN(f) ISIGN(*(long *)&f)
986 #define BIT(n) (1UL<<(n))
987 #define SST_MASK(n) (0xFFFFFFFFL >> (32-(n)))
988 @@ -1257,9 +1267,9 @@
990 //----------------- useful addressing macros -----------------------
991 // return pointer to SST at specified WRAP, CHIP, or TREX
992 -#define SST_WRAP(sst,n) ((SstRegs *)((n)*0x4000+(FxI32)(sst)))
993 -#define SST_CHIP(sst,n) ((SstRegs *)((n)*0x400+(FxI32)(sst)))
994 -#define SST_TMU(sst,n) ((SstRegs *)((0x800<<(n))+(FxI32)(sst)))
995 +#define SST_WRAP(sst,n) ((SstRegs *)((n)*0x4000+(long)(sst)))
996 +#define SST_CHIP(sst,n) ((SstRegs *)((n)*0x400+(long)(sst)))
997 +#define SST_TMU(sst,n) ((SstRegs *)((0x800<<(n))+(long)(sst)))
998 #define SST_TREX(sst,n) SST_TMU(sst,n)
1000 // offsets from the base of memBaseAddr0
1001 @@ -1304,7 +1314,7 @@
1003 #define SST_IS_REGISTER_ADDR(a) ( (a) >= SST_IO_OFFSET && (a) < SST_TEX_OFFSET )
1005 -#define SST_BASE_ADDRESS(sst) ((FxI32)(sst)-SST_3D_OFFSET)
1006 +#define SST_BASE_ADDRESS(sst) ((long)(sst)-SST_3D_OFFSET)
1007 #define SST_IO_ADDRESS(sst) (SST_IO_OFFSET+SST_BASE_ADDRESS(sst))
1008 #define SST_CMDAGP_ADDRESS(sst) (SST_CMDAGP_OFFSET+SST_BASE_ADDRESS(sst))
1009 #define SST_GUI_ADDRESS(sst) (SST_2D_OFFSET+SST_BASE_ADDRESS(sst))
1010 --- Glide3/h3/incsrc/h3info.h.ia64-foo Wed Nov 24 16:45:03 1999
1011 +++ Glide3/h3/incsrc/h3info.h Thu Dec 21 14:27:40 2000
1014 #define FxU8 unsigned char
1015 #define FxU16 unsigned short
1016 -#define FxU32 unsigned long
1018 +# define FxU32 unsigned int
1020 +# define FxU32 unsigned long
1023 // defn of registers not reqd, treat (SstRegs *) as (void *)
1024 typedef void SstRegs;
1025 --- Glide3/h3/incsrc/h3regs.h.ia64-foo Wed Nov 24 16:45:03 1999
1026 +++ Glide3/h3/incsrc/h3regs.h Thu Dec 21 14:27:40 2000
1028 // STB Begin Changes
1029 // STB-SR 1/13/98 Adding code for bj
1032 +typedef unsigned int FxU32;
1034 typedef unsigned long FxU32;
1040 //----------------- SST chip 3D layout -------------------------
1041 // registers are in groups of 8 for easy decode
1042 typedef struct vertex_Rec {
1043 - unsigned long x; // 12.4 format
1044 - unsigned long y; // 12.4
1045 + FxU32 x; // 12.4 format
1049 typedef volatile struct sstregs { // THE 3D CHIP
1050 @@ -223,118 +227,118 @@
1054 - long r; // 12.12 Parameters
1063 - long drdx; // X Gradients
1072 - long drdy; // Y Gradients
1080 + FxI32 r; // 12.12 Parameters
1089 + FxI32 drdx; // X Gradients
1098 + FxI32 drdy; // Y Gradients
1107 - unsigned long triangleCMD; // execute a triangle command (float)
1108 - unsigned long reservedA;
1109 + FxU32 triangleCMD; // execute a triangle command (float)
1111 vtxRec FvA; // floating point version
1115 - long Fr; // floating point version
1142 - unsigned long FtriangleCMD; // execute a triangle command
1143 - unsigned long fbzColorPath; // color select and combine
1144 - unsigned long fogMode; // fog Mode
1145 - unsigned long alphaMode; // alpha Mode
1146 - unsigned long fbzMode; // framebuffer and Z mode
1147 - unsigned long lfbMode; // linear framebuffer Mode
1148 - unsigned long clipLeftRight; // (6)10(6)10
1149 - unsigned long clipBottomTop; // (6)10(6)10
1151 - unsigned long nopCMD; // execute a nop command
1152 - unsigned long fastfillCMD; // execute a fast fill command
1153 - unsigned long swapbufferCMD;// execute a swapbuffer command
1154 - unsigned long fogColor; // (8)888
1155 - unsigned long zaColor; // 8(8)16
1156 - unsigned long chromaKey; // (8)888
1157 - unsigned long chromaRange;
1158 - unsigned long userIntrCmd;
1160 - unsigned long stipple; // 32 bits, MSB masks pixels
1161 - unsigned long c0; // 8.8.8.8 (ARGB)
1162 - unsigned long c1; // 8.8.8.8 (ARGB)
1163 + FxI32 Fr; // floating point version
1190 + FxU32 FtriangleCMD; // execute a triangle command
1191 + FxU32 fbzColorPath; // color select and combine
1192 + FxU32 fogMode; // fog Mode
1193 + FxU32 alphaMode; // alpha Mode
1194 + FxU32 fbzMode; // framebuffer and Z mode
1195 + FxU32 lfbMode; // linear framebuffer Mode
1196 + FxU32 clipLeftRight; // (6)10(6)10
1197 + FxU32 clipBottomTop; // (6)10(6)10
1199 + FxU32 nopCMD; // execute a nop command
1200 + FxU32 fastfillCMD; // execute a fast fill command
1201 + FxU32 swapbufferCMD;// execute a swapbuffer command
1202 + FxU32 fogColor; // (8)888
1203 + FxU32 zaColor; // 8(8)16
1204 + FxU32 chromaKey; // (8)888
1205 + FxU32 chromaRange;
1206 + FxU32 userIntrCmd;
1208 + FxU32 stipple; // 32 bits, MSB masks pixels
1209 + FxU32 c0; // 8.8.8.8 (ARGB)
1210 + FxU32 c1; // 8.8.8.8 (ARGB)
1211 struct { // statistic gathering variables
1212 - unsigned long fbiPixelsIn;
1213 - unsigned long fbiChromaFail;
1214 - unsigned long fbiZfuncFail;
1215 - unsigned long fbiAfuncFail;
1216 - unsigned long fbiPixelsOut;
1217 + FxU32 fbiPixelsIn;
1218 + FxU32 fbiChromaFail;
1219 + FxU32 fbiZfuncFail;
1220 + FxU32 fbiAfuncFail;
1221 + FxU32 fbiPixelsOut;
1224 - unsigned long fogTable[32]; // 64 entries, 2 per word, 2 bytes each
1225 + FxU32 fogTable[32]; // 64 entries, 2 per word, 2 bytes each
1227 - unsigned long reservedB[3];
1228 + FxU32 reservedB[3];
1230 - unsigned long colBufferAddr;
1231 - unsigned long colBufferStride;
1232 - unsigned long auxBufferAddr;
1233 - unsigned long auxBufferStride;
1234 - unsigned long reservedC;
1236 - unsigned long clipLeftRight1;
1237 - unsigned long clipBottomTop1;
1238 - unsigned long reservedD[6]; // NOTE: used to store TMUprivate ptr
1239 + FxU32 colBufferAddr;
1240 + FxU32 colBufferStride;
1241 + FxU32 auxBufferAddr;
1242 + FxU32 auxBufferStride;
1245 + FxU32 clipLeftRight1;
1246 + FxU32 clipBottomTop1;
1247 + FxU32 reservedD[6]; // NOTE: used to store TMUprivate ptr
1250 - unsigned long reservedE[8];
1251 + FxU32 reservedE[8];
1253 - unsigned long reservedF[3];
1254 - unsigned long swapBufferPend;
1255 - unsigned long leftOverlayBuf;
1256 - unsigned long rightOverlayBuf;
1257 - unsigned long fbiSwapHistory;
1258 - unsigned long fbiTrianglesOut; // triangles out counter
1259 + FxU32 reservedF[3];
1260 + FxU32 swapBufferPend;
1261 + FxU32 leftOverlayBuf;
1262 + FxU32 rightOverlayBuf;
1263 + FxU32 fbiSwapHistory;
1264 + FxU32 fbiTrianglesOut; // triangles out counter
1268 @@ -356,27 +360,27 @@
1272 - unsigned long reservedG[6];
1273 + FxU32 reservedG[6];
1275 - unsigned long reservedH[8];
1276 + FxU32 reservedH[8];
1278 - unsigned long reservedI[8];
1279 + FxU32 reservedI[8];
1281 - unsigned long textureMode; // texture Mode
1282 - unsigned long tLOD; // texture LOD settings
1283 - unsigned long tDetail; // texture detail settings
1284 - unsigned long texBaseAddr; // current texture base address
1285 - unsigned long texBaseAddr1;
1286 - unsigned long texBaseAddr2;
1287 - unsigned long texBaseAddr38;
1288 - unsigned long trexInit0; // hardware init bits
1289 - unsigned long trexInit1; // hardware init bits
1290 + FxU32 textureMode; // texture Mode
1291 + FxU32 tLOD; // texture LOD settings
1292 + FxU32 tDetail; // texture detail settings
1293 + FxU32 texBaseAddr; // current texture base address
1294 + FxU32 texBaseAddr1;
1295 + FxU32 texBaseAddr2;
1296 + FxU32 texBaseAddr38;
1297 + FxU32 trexInit0; // hardware init bits
1298 + FxU32 trexInit1; // hardware init bits
1300 - unsigned long nccTable0[12]; // NCC decode tables, bits are packed
1301 - unsigned long nccTable1[12]; // 4 words Y, 4 words I, 4 words Q
1302 + FxU32 nccTable0[12]; // NCC decode tables, bits are packed
1303 + FxU32 nccTable1[12]; // 4 words Y, 4 words I, 4 words Q
1305 - unsigned long tChromaKeyMin;
1306 - unsigned long tChromaKeyMax;
1307 + FxU32 tChromaKeyMin;
1308 + FxU32 tChromaKeyMax;
1311 // STB Begin changes
1312 --- Glide3/h3/minihwc/hwcext.h.ia64-foo Wed Nov 24 16:45:04 1999
1313 +++ Glide3/h3/minihwc/hwcext.h Thu Dec 21 14:27:40 2000
1316 /* Returned from HWCEXT_GETLINEARADDR */
1317 typedef struct hwcExtLinearAddrRes_s {
1319 - numBaseAddrs, /* # base addresses */
1320 - baseAddresses[HWCEXT_MAX_BASEADDR]; /* linear Addresses */
1321 + FxU32 numBaseAddrs; /* # base addresses */
1322 + long baseAddresses[HWCEXT_MAX_BASEADDR]; /* linear Addresses */
1323 } hwcExtLinearAddrRes_t;
1326 --- Glide3/h3/minihwc/linhwc.c.dri.ia64-foo Fri Oct 27 06:27:27 2000
1327 +++ Glide3/h3/minihwc/linhwc.c.dri Thu Dec 21 14:27:40 2000
1331 static FxU32 fenceVar;
1332 -#define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
1334 +# define P6FENCE asm volatile("mf.a" ::: "memory");
1335 +#elif defined(__alpha__)
1336 +# define P6FENCE asm volatile("mb" ::: "memory");
1338 +# define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
1341 #define MAXFIFOSIZE 0x40000
1342 #define FIFOPAD 0x0000
1350 if (envinit) return;
1353 if (*data=='\n') continue;
1354 val=strchr(data, '=');
1358 fprintf(stderr, "In config file /etc/conf.3dfx/voodoo3:\n");
1362 fprintf(stderr, "Malformed line: %s\n", data);
1367 bInfo->linearInfo.initialized = FXTRUE;
1368 - bInfo->linearInfo.linearAddress[0]=(FxU32)driInfo.pRegs;
1369 - bInfo->linearInfo.linearAddress[1]=(FxU32)driInfo.pFB;
1370 + bInfo->linearInfo.linearAddress[0]=(long)driInfo.pRegs;
1371 + bInfo->linearInfo.linearAddress[1]=(long)driInfo.pFB;
1375 @@ -829,6 +835,10 @@
1377 } /* hwcResolutionSupported */
1379 +extern void _grImportFifo (int, int);
1380 +extern void _grInvalidateAll (void);
1381 +extern void _grExportFifo (int *, int *);
1383 void grDRIImportFifo(int fifoPtr, int fifoRead)
1385 _grImportFifo(fifoPtr, fifoRead);
1388 void grDRIResetSAREA()
1390 - _grExportFifo(driInfo.fifoPtr, driInfo.fifoRead);
1391 + _grExportFifo((int *) driInfo.fifoPtr, (int *) driInfo.fifoRead);
1393 --- Glide3/h3/minihwc/linhwc.c.save.ia64-foo Mon Mar 20 16:42:57 2000
1394 +++ Glide3/h3/minihwc/linhwc.c.save Thu Dec 21 14:27:40 2000
1396 #include <X11/extensions/xf86vmode.h>
1398 static FxU32 fenceVar;
1399 -#define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
1401 +# define P6FENCE asm volatile ("mf.a" ::: "memory");
1402 +#elif defined(__alpha__)
1403 +# define P6FENCE asm volatile("mb" ::: "memory");
1405 +# define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
1408 #define MAXFIFOSIZE 0x40000
1409 #define MAXFIFOSIZE_16MB 0xff000
1417 if (envinit) return;
1420 if (*data=='\n') continue;
1421 val=strchr(data, '=');
1425 fprintf(stderr, "In config file /etc/conf.3dfx/voodoo3:\n");
1429 fprintf(stderr, "Malformed line: %s\n", data);
1433 for (bAddr = 0; bAddr < HWC_NUM_BASE_ADDR; bAddr++) {
1434 if ((bAddrMask >> bAddr) & 0x1) {
1435 - bInfo->linearInfo.linearAddress[bAddr] = (FxU32)
1436 + bInfo->linearInfo.linearAddress[bAddr] = (long)
1437 pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
1438 0x2000000, &bInfo->deviceNum, bInfo->boardNum, bAddr);
1440 --- Glide3/h3/minihwc/minihwc.c.ia64-foo Wed Nov 24 16:45:07 1999
1441 +++ Glide3/h3/minihwc/minihwc.c Thu Dec 21 14:27:40 2000
1442 @@ -1078,7 +1078,7 @@
1443 for (bAddr = 0; bAddr < 2; bAddr++) {
1444 if ((bAddrMask & (0x01UL << bAddr)) != 0x00UL) {
1445 bInfo->linearInfo.linearAddress[bAddr] =
1446 - (FxU32)pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
1447 + pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
1448 0x1000000, &bInfo->deviceNum, bInfo->boardNum, bAddr);
1451 @@ -1087,13 +1087,13 @@
1454 bInfo->linearInfo.linearAddress[2] =
1455 - (FxU32)pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
1456 + pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
1457 0x1000000, &bInfo->deviceNum, bInfo->boardNum, 2);
1459 /* Does the caller want the rom bios? */
1460 if ((bAddrMask & 0x08UL) != 0x00UL) {
1461 bInfo->linearInfo.linearAddress[3] =
1462 - (FxU32)pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
1463 + pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
1464 0x1000000, &bInfo->deviceNum, bInfo->boardNum, 3);
1467 --- Glide3/h3/minihwc/minihwc.h.ia64-foo Wed Nov 24 16:45:07 1999
1468 +++ Glide3/h3/minihwc/minihwc.h Thu Dec 21 14:27:40 2000
1469 @@ -238,22 +238,21 @@
1470 typedef struct hwcLinearInfo_s {
1474 - linearAddress[HWC_NUM_BASE_ADDR];
1475 + long linearAddress[HWC_NUM_BASE_ADDR];
1478 typedef struct hwcRegInfo_s {
1482 - ioMemBase, /* mem base for I/O aliases */
1483 - cmdAGPBase, /* CMD/AGP register base */
1484 - waxBase, /* 2D register base */
1485 - sstBase, /* 3D register base */
1486 - lfbBase, /* 3D lfb base */
1487 - rawLfbBase; /* Raw LFB base (base address 1) */
1489 + ioMemBase, /* mem base for I/O aliases */
1490 + cmdAGPBase, /* CMD/AGP register base */
1491 + waxBase, /* 2D register base */
1492 + sstBase, /* 3D register base */
1493 + lfbBase, /* 3D lfb base */
1494 + rawLfbBase; /* Raw LFB base (base address 1) */
1496 - ioPortBase; /* PPC does I/O via a 32-bit address */
1497 + FxU32 ioPortBase; /* PPC does I/O via a 32-bit address */
1500 ioPortBase, /* I/O base address */
1501 --- Glide3/h5/glide3/src/cpudtect.s.ia64-foo Fri Nov 17 16:31:05 2000
1502 +++ Glide3/h5/glide3/src/cpudtect.s Thu Dec 21 16:37:53 2000
1504 /* 2 3/04/97 9:10p Dow */
1510 + .global _cpu_detect_asm
1511 + .proc _cpu_detect_asm
1515 + br.ret.sptk.few b0
1517 + .end _cpu_detect_asm
1519 +#elif defined(__alpha__) /* !__ia64__ */
1522 + .globl _cpu_detect_asm
1523 + .ent _cpu_detect_asm
1528 + .end _cpu_detect_asm
1530 +#else /* !__ia64__ */
1533 .file "cpudtect.asm"
1536 .size double_precision_asm,.L_END_double_precision_asm-double_precision_asm
1540 +#endif /* !__ia64___ */
1541 --- Glide3/h5/glide3/src/diget.c.ia64-foo Thu Nov 16 14:26:03 2000
1542 +++ Glide3/h5/glide3/src/diget.c Thu Dec 21 14:27:40 2000
1543 @@ -807,11 +807,11 @@
1546 case GR_SURFACE_TEXTURE:
1547 - if (plength == 4) {
1548 + if (plength == sizeof(long)) {
1551 #ifdef GLIDE_INIT_HWC
1552 - *params = (FxU32) &gc->tBuffer;
1553 + *(long *)params = (long) &gc->tBuffer;
1557 --- Glide3/h5/glide3/src/disst.c.ia64-foo Wed Nov 15 18:32:52 2000
1558 +++ Glide3/h5/glide3/src/disst.c Thu Dec 21 14:27:40 2000
1560 GrErrorCallback( "grSstSelect: non-existent SST", FXTRUE );
1562 _GlideRoot.current_sst = which;
1563 - setThreadValue( (FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst] );
1564 + setThreadValue( (long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
1566 #ifdef GLIDE_MULTIPLATFORM
1567 _GlideRoot.curGCFuncs = _GlideRoot.curGC->gcFuncs;
1568 --- Glide3/h5/glide3/src/distrip.c.ia64-foo Wed Nov 15 18:32:52 2000
1569 +++ Glide3/h5/glide3/src/distrip.c Thu Dec 21 14:27:40 2000
1570 @@ -552,10 +552,10 @@
1572 void *b_ptr, *c_ptr;
1573 while ((int)Count >= 3) {
1574 - b_ptr = (void *)((FxU32)pointers + stride);
1575 - c_ptr = (void *)((FxU32)pointers + stride*2);
1576 + b_ptr = (void *)((long)pointers + stride);
1577 + c_ptr = (void *)((long)pointers + stride*2);
1578 TRISETUP(pointers, b_ptr, c_ptr);
1579 - pointers = (void *)((FxU32)c_ptr + stride);
1580 + pointers = (void *)((long)c_ptr + stride);
1584 --- Glide3/h5/glide3/src/fifo.c.ia64-foo Thu Nov 16 14:26:03 2000
1585 +++ Glide3/h5/glide3/src/fifo.c Thu Dec 21 14:27:40 2000
1590 -#define GEN_INDEX(a) ((((FxU32) a) - ((FxU32) gc->reg_ptr)) >> 2)
1591 +#define GEN_INDEX(a) ((((long) a) - ((long) gc->reg_ptr)) >> 2)
1594 _grFifoWriteDebug(FxU32 addr, FxU32 val, FxU32 fifoPtr)
1596 gc->contextP = 1; /* always has context in CSIM */
1597 #endif /* defined(GLIDE_INIT_HWC) && !defined(__linux__) */
1600 FxU32 wrapAddr = 0x00UL;
1604 GR_ASSERT(blockSize > 0);
1605 @@ -1097,8 +1099,10 @@
1612 wrapAddr = (FxU32)gc->cmdTransportInfo.fifoPtr;
1615 /* Update roomXXX fields for the actual wrap */
1616 gc->cmdTransportInfo.roomToReadPtr -= gc->cmdTransportInfo.roomToEnd;
1617 @@ -1176,10 +1180,10 @@
1622 -_grHwFifoPtr(FxBool ignored)
1624 +_grHwFifoPtr(FxBool ignored)
1629 FxU32 status, readPtrL1, readPtrL2;
1630 FxU32 chip ; /* AJB SLI MAYHEM */
1631 @@ -1238,7 +1242,7 @@
1632 readPtrL2 = GET(gc->cRegs->cmdFifo0.readPtrL);
1633 } while (readPtrL1 != readPtrL2);
1635 - rVal = (((FxU32)gc->cmdTransportInfo.fifoStart) +
1636 + rVal = (((long)gc->cmdTransportInfo.fifoStart) +
1638 (FxU32)gc->cmdTransportInfo.fifoOffset);
1640 @@ -1388,13 +1392,13 @@
1641 gcFifo=&gc->cmdTransportInfo;
1642 readPos=readPos-gcFifo->fifoOffset;
1643 gcFifo->fifoPtr = gcFifo->fifoStart + (readPos>>2);
1644 - gcFifo->fifoRead = (FxU32)gcFifo->fifoPtr;
1645 + gcFifo->fifoRead = (long)gcFifo->fifoPtr;
1647 gcFifo=&gc->cmdTransportInfo;
1648 gcFifo->fifoPtr = gc->rawLfb+(fifoPtr>>2);
1649 gcFifo->fifoRead = ((int)gc->rawLfb)+fifoRead;
1651 - gcFifo->roomToReadPtr = gcFifo->fifoRead-((int)gcFifo->fifoPtr)-FIFO_END_ADJUST-sizeof(FxU32);
1652 + gcFifo->roomToReadPtr = gcFifo->fifoRead-((long)gcFifo->fifoPtr)-FIFO_END_ADJUST-sizeof(FxU32);
1653 if (gcFifo->roomToReadPtr<0) gcFifo->roomToReadPtr+=gcFifo->fifoSize;
1654 gcFifo->roomToEnd = gcFifo->fifoSize -
1655 ((gcFifo->fifoPtr-gcFifo->fifoStart)<<2) -
1656 @@ -1412,7 +1416,7 @@
1658 gcFifo=&gc->cmdTransportInfo;
1659 *fifoPtr=(gcFifo->fifoPtr-gc->rawLfb)<<2;
1660 - *fifoRead=(gcFifo->fifoRead-(int)gc->rawLfb);
1661 + *fifoRead=(gcFifo->fifoRead-(long)gc->rawLfb);
1665 --- Glide3/h5/glide3/src/fxcmd.h.ia64-foo Wed Nov 15 18:32:52 2000
1666 +++ Glide3/h5/glide3/src/fxcmd.h Thu Dec 21 14:27:40 2000
1668 /* NB: This should be used sparingly because it does a 'real' hw read
1671 -FxU32 _grHwFifoPtr(FxBool);
1672 +long _grHwFifoPtr(FxBool);
1673 #define HW_FIFO_PTR(a) _grHwFifoPtr(a)
1675 #if FIFO_ASSERT_FULL
1678 #define REG_GROUP_END() \
1680 - ASSERT((((FxU32)_regGroupFifoPtr - (FxU32)gc->cmdTransportInfo.fifoPtr) >> 2) == _groupNum + 1); \
1681 - gc->cmdTransportInfo.fifoRoom -= ((FxU32)_regGroupFifoPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
1682 + ASSERT((((long)_regGroupFifoPtr - (long)gc->cmdTransportInfo.fifoPtr) >> 2) == _groupNum + 1); \
1683 + gc->cmdTransportInfo.fifoRoom -= ((long)_regGroupFifoPtr - (long)gc->cmdTransportInfo.fifoPtr); \
1684 gc->cmdTransportInfo.fifoPtr = (FxU32*)_regGroupFifoPtr; \
1685 GDBG_INFO(gc->myLevel + 200, "\tGroupEnd: (0x%X : 0x%X)\n", \
1686 gc->cmdTransportInfo.fifoPtr, gc->cmdTransportInfo.fifoRoom); \
1687 @@ -1137,7 +1137,7 @@
1691 - gc->cmdTransportInfo.fifoRoom -= ((FxU32)tPackPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
1692 + gc->cmdTransportInfo.fifoRoom -= ((long)tPackPtr - (long)gc->cmdTransportInfo.fifoPtr); \
1693 gc->cmdTransportInfo.fifoPtr = tPackPtr; \
1694 GDBG_INFO(gc->myLevel + 200, "\tTriEnd: (0x%X : 0x%X)\n", tPackPtr, gc->cmdTransportInfo.fifoRoom); \
1696 @@ -1156,12 +1156,12 @@
1697 GR_CHECK_COMPATABILITY(FN_NAME, \
1699 "Called before grSstWinOpen()"); \
1700 - GR_ASSERT(((FxU32)(packetPtr) & FIFO_ALIGN_MASK) == 0); /* alignment */ \
1701 + GR_ASSERT(((long)(packetPtr) & FIFO_ALIGN_MASK) == 0); /* alignment */ \
1702 GR_ASSERT((__numWords) > 0); /* packet size */ \
1703 GR_ASSERT((__numWords) < ((0x01 << 19) - 2)); \
1704 GR_ASSERT((((FxU32)(__numWords) + 2) << 2) <= (FxU32)gc->cmdTransportInfo.fifoRoom); \
1705 - GR_ASSERT(((FxU32)packetPtr + (((__numWords) + 2) << 2)) < \
1706 - (FxU32)gc->cmdTransportInfo.fifoEnd); \
1707 + GR_ASSERT(((unsigned long)packetPtr + (((__numWords) + 2) << 2)) < \
1708 + (unsigned long)gc->cmdTransportInfo.fifoEnd); \
1709 GR_ASSERT((hdr2 & 0xE0000000UL) == 0x00UL); \
1710 GR_ASSERT(((__addr) & 0x03UL) == 0x00UL); \
1712 @@ -1206,8 +1206,8 @@
1714 #define FIFO_LINEAR_WRITE_END \
1715 DEBUGFIFODUMP_LINEAR(gc->cmdTransportInfo.fifoPtr); \
1716 - GR_ASSERT((((FxU32)packetPtr - (FxU32)gc->cmdTransportInfo.fifoPtr) >> 2) == __writeSize + 2); \
1717 - gc->cmdTransportInfo.fifoRoom -= ((FxU32)packetPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
1718 + GR_ASSERT((((long)packetPtr - (long)gc->cmdTransportInfo.fifoPtr) >> 2) == __writeSize + 2); \
1719 + gc->cmdTransportInfo.fifoRoom -= ((long)packetPtr - (long)gc->cmdTransportInfo.fifoPtr); \
1720 gc->cmdTransportInfo.fifoPtr = packetPtr; \
1721 GDBG_INFO(gc->myLevel + 200, "\tLinearEnd: (0x%X : 0x%X)\n", \
1722 packetPtr, gc->cmdTransportInfo.fifoRoom); \
1723 @@ -1625,7 +1625,7 @@
1727 - argb = *((FxU32 *)((int)_s + i)) & 0x00ffffff; \
1728 + argb = *((FxU32 *)((long)_s + i)) & 0x00ffffff; \
1729 TRI_SETF(*((float *)&argb)); \
1731 i = gc->tsuDataList[dataElem]; \
1732 --- Glide3/h5/glide3/src/fxglide.h.ia64-foo Fri Nov 24 13:36:47 2000
1733 +++ Glide3/h5/glide3/src/fxglide.h Thu Dec 21 14:27:40 2000
1734 @@ -1564,7 +1564,7 @@
1735 SET_FIFO(*curFifoPtr++, *curPktData++); \
1737 GR_INC_SIZE((__writeCount) * sizeof(FxU32)); \
1738 - gc->cmdTransportInfo.fifoRoom -= ((FxU32)curFifoPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
1739 + gc->cmdTransportInfo.fifoRoom -= ((long)curFifoPtr - (long)gc->cmdTransportInfo.fifoPtr); \
1740 gc->cmdTransportInfo.fifoPtr = curFifoPtr; \
1743 @@ -1684,7 +1684,7 @@
1746 FxU32* fifoPtr; /* Current write pointer into fifo */
1747 - FxU32 fifoRead; /* Last known hw read ptr.
1748 + long fifoRead; /* Last known hw read ptr.
1749 * If on an sli enabled system this will be
1750 * the 'closest' hw read ptr of the sli
1752 @@ -1781,11 +1781,11 @@
1757 - lfbBuffers[4]; /* Tile relative addresses of the color/aux
1759 + long lfbBuffers[4]; /* Tile relative addresses of the color/aux
1760 * buffers for lfbReads.
1762 - FxU32 lockPtrs[2]; /* pointers to locked buffers */
1763 + long lockPtrs[2]; /* pointers to locked buffers */
1766 FxBool colTiled, // AJB - grBufferClear needs to know when target surfaces
1767 @@ -2096,6 +2096,10 @@
1768 * This is the __linux__ code.
1770 #define P6FENCE asm("xchg %%eax, %0" : : "m" (_GlideRoot.p6Fencer) : "eax");
1771 +#elif defined(__GNUC__) && defined(__ia64__)
1772 +# define P6FENCE asm volatile ("mf.a" ::: "memory");
1773 +#elif defined(__alpha__)
1774 +# define P6FENCE asm volatile("mb" ::: "memory");
1775 #else /* !defined ( P6FENCE ) */
1776 # error "P6 Fencing code needs to be added for this compiler"
1777 #endif /* !defined ( P6FENCE ) */
1778 @@ -2619,7 +2623,7 @@
1782 -extern FxU32 threadValueLinux;
1783 +extern long threadValueLinux;
1784 #define getThreadValueFast() threadValueLinux
1785 #endif /* defined(__linux__) */
1787 @@ -2642,9 +2646,9 @@
1788 freeThreadStorage( void );
1791 -setThreadValue( FxU32 value );
1792 +setThreadValue( long value );
1796 getThreadValueSLOW( void );
1799 @@ -2982,7 +2986,11 @@
1800 #if defined(GLIDE_SANITY_ASSERT)
1801 #define GR_ASSERT(exp) ((void)((!(exp)) ? (_grAssert(#exp, __FILE__, __LINE__),0) : 0xFFFFFFFF))
1803 -#define GR_ASSERT(exp) ((void)(0 && ((FxU32)(exp))))
1805 +# define GR_ASSERT(exp) ((void) 0)
1807 +# define GR_ASSERT(exp) ((void)(0 && ((FxU32)(exp))))
1811 #define INTERNAL_CHECK(__name, __cond, __msg, __fatalP) \
1812 @@ -3056,7 +3064,7 @@
1813 #define HW_TEX_PTR(__b) ((FxU32*)(((FxU32)(__b)) + HW_TEXTURE_OFFSET))
1815 /* access a floating point array with a byte index */
1816 -#define FARRAY(p,i) (*(float *)((i)+(int)(p)))
1817 +#define FARRAY(p,i) (*(float *)((i)+(long)(p)))
1818 #define ArraySize(__a) (sizeof(__a) / sizeof((__a)[0]))
1821 --- Glide3/h5/glide3/src/g3df.c.ia64-foo Wed Nov 15 18:32:53 2000
1822 +++ Glide3/h5/glide3/src/g3df.c Thu Dec 21 14:27:40 2000
1824 * Added GR_DIENTRY for di glide functions
1831 --- Glide3/h5/glide3/src/gaa.c.ia64-foo Wed Nov 15 18:32:53 2000
1832 +++ Glide3/h5/glide3/src/gaa.c Thu Dec 21 14:27:40 2000
1836 ia = gc->state.vData.pargbInfo.offset;
1837 - *((FxU32 *)&v1a)=*((FxU32 *)((int)a + ia))&0x00ffffff;
1838 - *((FxU32 *)&v2a)=*((FxU32 *)((int)b + ia))&0x00ffffff;
1839 + *((FxU32 *)&v1a)=*((FxU32 *)((long)a + ia))&0x00ffffff;
1840 + *((FxU32 *)&v2a)=*((FxU32 *)((long)b + ia))&0x00ffffff;
1848 - argb = *((FxU32 *)((int)e + i)) & 0x00ffffff;
1849 + argb = *((FxU32 *)((long)e + i)) & 0x00ffffff;
1850 TRI_SETF(*((float *)&argb));
1856 if (gc->state.vData.colorType != GR_FLOAT) {
1857 - *((FxU32 *)&v1a)=*((FxU32 *)((int)v1 + ia))&0x00ffffff;
1858 - *((FxU32 *)&v2a)=*((FxU32 *)((int)v2 + ia))&0x00ffffff;
1859 + *((FxU32 *)&v1a)=*((FxU32 *)((long)v1 + ia))&0x00ffffff;
1860 + *((FxU32 *)&v2a)=*((FxU32 *)((long)v2 + ia))&0x00ffffff;
1863 if (adx >= ady) { /* X major line */
1864 @@ -1270,8 +1270,8 @@
1867 ia = gc->state.vData.pargbInfo.offset;
1868 - *((FxU32 *)&v1a)=*((FxU32 *)((int)a + ia))&0x00ffffff;
1869 - *((FxU32 *)&v2a)=*((FxU32 *)((int)b + ia))&0x00ffffff;
1870 + *((FxU32 *)&v1a)=*((FxU32 *)((long)a + ia))&0x00ffffff;
1871 + *((FxU32 *)&v2a)=*((FxU32 *)((long)b + ia))&0x00ffffff;
1875 --- Glide3/h5/glide3/src/gdraw.c.ia64-foo Wed Nov 15 18:32:53 2000
1876 +++ Glide3/h5/glide3/src/gdraw.c Thu Dec 21 14:27:40 2000
1878 GR_BEGIN_NOFIFOCHECK(FN_NAME, 91);
1879 GDBG_INFO_MORE(gc->myLevel, "(a = 0x%x, b = 0x%x)\n", a, b);
1882 +#if defined (__POWERPC__) || defined(__ia64__)
1884 const void *verts[2];
1885 verts[0] = a; verts[1] = b;
1887 GR_INC_SIZE(sizeof(FxU32))
1890 - gc->cmdTransportInfo.fifoRoom -= ((FxU32)packetPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
1891 + gc->cmdTransportInfo.fifoRoom -= ((long)packetPtr - (long)gc->cmdTransportInfo.fifoPtr); \
1892 gc->cmdTransportInfo.fifoPtr = packetPtr; \
1896 * except the data set up is from the pointer array and
1899 - FxI32 stride = mode;
1902 /* we snap to an integer by adding a large enough number that it
1903 * shoves all fraction bits off the right side of the mantissa.
1904 @@ -449,8 +449,10 @@
1906 #define POINTS_BUFFER 100
1910 stride = gc->state.vData.vStride;
1912 + stride = sizeof(float *) / sizeof (float);
1914 if (gc->state.grCoordinateSpaceArgs.coordinate_space_mode == GR_WINDOW_COORDS) {
1915 #ifndef FX_GLIDE_H5_CSIM
1919 FxU32 vertexParamOffset;
1920 - FxI32 stride = mode;
1923 #define DX gc->pool.ftemp1
1924 #define ADY gc->pool.ftemp2
1925 @@ -773,8 +775,11 @@
1927 #define LINES_BUFFER 100
1931 stride = gc->state.vData.vStride;
1933 + stride = sizeof(float *) / sizeof (float);
1935 if (ltype == GR_LINES)
1936 sCount = count >> 1; /* line list */
1938 @@ -802,16 +807,16 @@
1939 ** compute absolute deltas and draw from low Y to high Y
1941 ADY = FARRAY(b, gc->state.vData.vertexInfo.offset+4) - FARRAY(a, gc->state.vData.vertexInfo.offset+4);
1942 - i = *(long *)&ADY;
1946 tv = a; a = b; b = tv;
1947 i ^= 0x80000000; /* ady = -ady; */
1948 - (*(long *)&ADY) = i;
1949 + (*(int *)&ADY) = i;
1952 DX = FARRAY(b, gc->state.vData.vertexInfo.offset) - FARRAY(a, gc->state.vData.vertexInfo.offset);
1956 j ^= 0x80000000; /* adx = -adx; */
1959 ** compute absolute deltas and draw from low Y to high Y
1962 - i = *(long *)&ADY;
1966 owa = oowb; owb = oowa;
1969 tv = a; a = b; b = tv;
1970 i ^= 0x80000000; /* ady = -ady; */
1971 - (*(long *)&ADY) = i;
1972 + (*(int *)&ADY) = i;
1974 fax = FARRAY(a, gc->state.vData.vertexInfo.offset)
1975 *owa*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
1976 @@ -997,7 +1002,7 @@
1977 *owb*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
1983 j ^= 0x80000000; /* adx = -adx; */
1985 @@ -1083,7 +1088,7 @@
1986 #if GLIDE_HW_TRI_SETUP && GLIDE_PACKET3_TRI_SETUP
1989 - FxI32 stride = mode;
1993 GR_BEGIN_NOFIFOCHECK(FN_NAME, 90);
1994 @@ -1097,9 +1102,10 @@
1995 GDBG_INFO(110, "%s: paramMask = 0x%x\n", FN_NAME, gc->cmdTransportInfo.paramMask);
2000 stride = gc->state.vData.vStride;
2003 + stride = sizeof(float *) / sizeof (float);
2005 gc->stats.trisProcessed+=(count/3);
2007 --- Glide3/h5/glide3/src/gerror.c.ia64-foo Wed Nov 15 18:32:53 2000
2008 +++ Glide3/h5/glide3/src/gerror.c Thu Dec 21 14:27:40 2000
2011 gdbg_printf("Command Fifo:\n");
2012 gdbg_printf("\tSoftware:\n");
2013 - gdbg_printf("\t\tfifoPtr: 0x%X\n", (FxU32)gc->cmdTransportInfo.fifoPtr - (FxU32) gc->rawLfb);
2014 + gdbg_printf("\t\tfifoPtr: 0x%X\n", (long)gc->cmdTransportInfo.fifoPtr - (long) gc->rawLfb);
2015 gdbg_printf("\t\tfifoOffset: 0x%X\n", gc->cmdTransportInfo.fifoOffset);
2016 gdbg_printf("\t\tfifoEnd: 0x%X\n", gc->cmdTransportInfo.fifoEnd - gc->rawLfb);
2017 gdbg_printf("\t\tfifoSize: 0x%X\n", gc->cmdTransportInfo.fifoSize);
2020 if ( !gc->windowed ) {
2021 gdbg_printf("\tHardware:\n");
2022 - gdbg_printf("\t\treadPtrL: 0x%X\n", HW_FIFO_PTR(FXTRUE) - (FxU32)gc->rawLfb);
2023 + gdbg_printf("\t\treadPtrL: 0x%X\n", HW_FIFO_PTR(FXTRUE) - (long)gc->rawLfb);
2024 gdbg_printf("\t\tdepth: 0x%X\n", GR_CAGP_GET(depth));
2025 gdbg_printf("\t\tholeCount: 0x%X\n", GR_CAGP_GET(holeCount));
2026 gdbg_printf("\t\tbaseAddrL: 0x%X\n", GR_CAGP_GET(baseAddrL));
2027 --- Glide3/h5/glide3/src/glide.h.ia64-foo Fri Nov 24 13:36:47 2000
2028 +++ Glide3/h5/glide3/src/glide.h Thu Dec 21 14:27:40 2000
2030 typedef FxU32 GrStipplePattern_t;
2031 #endif /* __linux__ */
2032 typedef FxU8 GrFog_t;
2033 -typedef FxU32 GrContext_t;
2034 +typedef unsigned long GrContext_t;
2035 typedef int (FX_CALL *GrProc)();
2038 --- Glide3/h5/glide3/src/gpci.c.ia64-foo Wed Nov 15 18:32:53 2000
2039 +++ Glide3/h5/glide3/src/gpci.c Thu Dec 21 14:27:40 2000
2040 @@ -588,14 +588,14 @@
2044 - { _trisetup_null, _trisetup_null },
2045 - { _trisetup_null, _trisetup_null },
2046 + { (GrTriSetupProc) _trisetup_null, (GrTriSetupProc) _trisetup_null },
2047 + { (GrTriSetupProc) _trisetup_null, (GrTriSetupProc) _trisetup_null },
2050 /* Clip coordinates */
2052 - { _trisetup_null, _trisetup_null },
2053 - { _trisetup_null, _trisetup_null },
2054 + { (GrTriSetupProc) _trisetup_null, (GrTriSetupProc) _trisetup_null },
2055 + { (GrTriSetupProc) _trisetup_null, (GrTriSetupProc) _trisetup_null },
2059 @@ -1710,7 +1710,7 @@
2062 /* If there is no current gc in tls then set the current context. */
2063 - if (gc == NULL) setThreadValue((FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst]);
2064 + if (gc == NULL) setThreadValue((long)&_GlideRoot.GCs[_GlideRoot.current_sst]);
2067 case DLL_THREAD_DETACH:
2068 --- Glide3/h5/glide3/src/gtexdl.c.ia64-foo Wed Nov 15 18:32:53 2000
2069 +++ Glide3/h5/glide3/src/gtexdl.c Thu Dec 21 14:27:40 2000
2071 while(i < start + slopCount) {
2074 - entry = (0x80000000 | ((i & 0xFE) << 23) | pal->data[i] & 0xFFFFFF);
2075 + entry = (0x80000000 | ((i & 0xFE) << 23) | (pal->data[i] & 0xFFFFFF));
2077 gc->state.shadow.paletteRow[i>>3].data[i&7] = entry;
2078 REG_GROUP_SET(hw, nccTable0[4 + (i & 0x07)], entry );
2080 while(i < endIndex) {
2083 - entry = (0x80000000 | ((i & 0xFE) << 23) | pal->data[i] & 0xFFFFFF);
2084 + entry = (0x80000000 | ((i & 0xFE) << 23) | (pal->data[i] & 0xFFFFFF));
2086 gc->state.shadow.paletteRow[i>>3].data[i&7] = entry;
2087 REG_GROUP_SET(hw, nccTable0[4 + (i & 0x07)], entry );
2092 - entry = (0x80000000 | ((i & 0xFE) << 23) | pal->data[i] & 0xFFFFFF);
2093 + entry = (0x80000000 | ((i & 0xFE) << 23) | (pal->data[i] & 0xFFFFFF));
2095 gc->state.shadow.paletteRow[i>>3].data[i&7] = entry;
2096 REG_GROUP_SET(hw, nccTable0[4 + (i & 0x07)], entry );
2097 --- Glide3/h5/glide3/src/gthread.c.ia64-foo Wed Nov 15 18:32:53 2000
2098 +++ Glide3/h5/glide3/src/gthread.c Thu Dec 21 14:27:40 2000
2101 } /* initThreadStorage */
2103 -void setThreadValue( FxU32 value ) {
2104 +void setThreadValue( long value ) {
2105 GR_CHECK_F( "setThreadValue", !threadInit, "Thread storage not initialized\n" );
2106 TlsSetValue( _GlideRoot.tlsIndex, (void*)value );
2109 #pragma warning (4:4035) /* No return value */
2110 -FxU32 getThreadValueSLOW( void ) {
2111 +long getThreadValueSLOW( void ) {
2112 GR_CHECK_F( "getThreadValue", !threadInit, "Thread storage not initialized\n" );
2119 -void setThreadValue( FxU32 value )
2120 +void setThreadValue( long value )
2122 _threadValueMacOS = value;
2125 #include "fxglide.h"
2128 -FxU32 threadValueLinux;
2129 +long threadValueLinux;
2131 void initThreadStorage(void)
2133 @@ -177,12 +177,12 @@
2137 -void setThreadValue( FxU32 value )
2138 +void setThreadValue( long value )
2140 threadValueLinux = value;
2143 -FxU32 getThreadValueSLOW( void )
2144 +long getThreadValueSLOW( void )
2146 return threadValueLinux;
2148 --- Glide3/h5/glide3/src/gsst.c.ia64-foo Fri Nov 17 16:31:05 2000
2149 +++ Glide3/h5/glide3/src/gsst.c Thu Dec 21 14:27:40 2000
2150 @@ -849,30 +849,30 @@
2154 - GR_RESOLUTION_320x200, 320, 200, /* 0x0 */
2155 - GR_RESOLUTION_320x240, 320, 240, /* 0x1 */
2156 - GR_RESOLUTION_400x256, 400, 256, /* 0x2 */
2157 - GR_RESOLUTION_512x384, 512, 384, /* 0x3 */
2158 - GR_RESOLUTION_640x200, 640, 200, /* 0x4 */
2159 - GR_RESOLUTION_640x350, 640, 350, /* 0x5 */
2160 - GR_RESOLUTION_640x400, 640, 400, /* 0x6 */
2161 - GR_RESOLUTION_640x480, 640, 480, /* 0x7 */
2162 - GR_RESOLUTION_800x600, 800, 600, /* 0x8 */
2163 - GR_RESOLUTION_960x720, 960, 720, /* 0x9 */
2164 - GR_RESOLUTION_856x480, 856, 480, /* 0xa */
2165 - GR_RESOLUTION_512x256, 512, 256, /* 0xb */
2166 - GR_RESOLUTION_1024x768, 1024, 768, /* 0xC */
2167 - GR_RESOLUTION_1280x1024, 1280, 1024, /* 0xD */
2168 - GR_RESOLUTION_1600x1200, 1600, 1200, /* 0xE */
2169 - GR_RESOLUTION_400x300, 400, 300, /* 0xF */
2170 - GR_RESOLUTION_1152x864, 1152, 864, /* 0x10 */
2171 - GR_RESOLUTION_1280x960, 1280, 960, /* 0x11 */
2172 - GR_RESOLUTION_1600x1024, 1600, 1024, /* 0x12 */
2173 - GR_RESOLUTION_1792x1344, 1792, 1344, /* 0x13 */
2174 - GR_RESOLUTION_1856x1392, 1856, 1392, /* 0x14 */
2175 - GR_RESOLUTION_1920x1440, 1920, 1440, /* 0x15 */
2176 - GR_RESOLUTION_2048x1536, 2048, 1536, /* 0x16 */
2177 - GR_RESOLUTION_2048x2048, 2048, 2048 /* 0x17 */
2178 + { GR_RESOLUTION_320x200, 320, 200 }, /* 0x0 */
2179 + { GR_RESOLUTION_320x240, 320, 240 }, /* 0x1 */
2180 + { GR_RESOLUTION_400x256, 400, 256 }, /* 0x2 */
2181 + { GR_RESOLUTION_512x384, 512, 384 }, /* 0x3 */
2182 + { GR_RESOLUTION_640x200, 640, 200 }, /* 0x4 */
2183 + { GR_RESOLUTION_640x350, 640, 350 }, /* 0x5 */
2184 + { GR_RESOLUTION_640x400, 640, 400 }, /* 0x6 */
2185 + { GR_RESOLUTION_640x480, 640, 480 }, /* 0x7 */
2186 + { GR_RESOLUTION_800x600, 800, 600 }, /* 0x8 */
2187 + { GR_RESOLUTION_960x720, 960, 720 }, /* 0x9 */
2188 + { GR_RESOLUTION_856x480, 856, 480 }, /* 0xa */
2189 + { GR_RESOLUTION_512x256, 512, 256 }, /* 0xb */
2190 + { GR_RESOLUTION_1024x768, 1024, 768 }, /* 0xC */
2191 + { GR_RESOLUTION_1280x1024, 1280, 1024 }, /* 0xD */
2192 + { GR_RESOLUTION_1600x1200, 1600, 1200 }, /* 0xE */
2193 + { GR_RESOLUTION_400x300, 400, 300 }, /* 0xF */
2194 + { GR_RESOLUTION_1152x864, 1152, 864 }, /* 0x10 */
2195 + { GR_RESOLUTION_1280x960, 1280, 960 }, /* 0x11 */
2196 + { GR_RESOLUTION_1600x1024, 1600, 1024 }, /* 0x12 */
2197 + { GR_RESOLUTION_1792x1344, 1792, 1344 }, /* 0x13 */
2198 + { GR_RESOLUTION_1856x1392, 1856, 1392 }, /* 0x14 */
2199 + { GR_RESOLUTION_1920x1440, 1920, 1440 }, /* 0x15 */
2200 + { GR_RESOLUTION_2048x1536, 2048, 1536 }, /* 0x16 */
2201 + { GR_RESOLUTION_2048x2048, 2048, 2048 } /* 0x17 */
2204 /* ---------------------------------------------
2205 @@ -1172,8 +1172,8 @@
2206 gc->bufferSwaps[t] = 0xffffffff;
2209 - gc->bufferSwaps[0] = ((FxU32) gc->cmdTransportInfo.fifoPtr -
2210 - (FxU32) gc->cmdTransportInfo.fifoStart);
2211 + gc->bufferSwaps[0] = ((long) gc->cmdTransportInfo.fifoPtr -
2212 + (long) gc->cmdTransportInfo.fifoStart);
2214 gc->swapsPending = 1;
2216 @@ -1383,7 +1383,7 @@
2217 * current gc. This gc is valid for all threads in the fullscreen
2220 - setThreadValue( (FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst] );
2221 + setThreadValue( (long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
2224 /* Partial Argument Validation */
2225 @@ -2208,7 +2208,7 @@
2226 for (buffer = 0; buffer < nColBuffers; buffer++) {
2227 gc->buffers0[buffer] = bufInfo->colBuffStart0[buffer];
2228 GDBG_INFO(80, "Buffer %d: Start: 0x%x\n", buffer, gc->buffers0[buffer]);
2229 - gc->lfbBuffers[buffer] = (FxU32)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer];
2230 + gc->lfbBuffers[buffer] = (long)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer];
2231 if (bInfo->buffInfo.enable2ndbuffer) {
2232 gc->buffers1[buffer] = bufInfo->colBuffStart1[buffer];
2233 GDBG_INFO(80, "Buffer %d: Start: 0x%x\n", buffer, gc->buffers1[buffer]);
2234 @@ -2217,7 +2217,7 @@
2235 if (nAuxBuffers != 0) {
2236 gc->buffers0[buffer] = bufInfo->auxBuffStart0;
2237 GDBG_INFO(80, "Aux Buffer: Start: 0x%x\n", gc->buffers0[buffer]);
2238 - gc->lfbBuffers[buffer] = (FxU32)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer];
2239 + gc->lfbBuffers[buffer] = (long)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer];
2240 if (bInfo->buffInfo.enable2ndbuffer) {
2241 gc->buffers1[buffer] = bufInfo->auxBuffStart1;
2242 GDBG_INFO(80, "Aux Buffer: Start: 0x%x\n", gc->buffers1[buffer]);
2243 @@ -2336,7 +2336,7 @@
2244 GDBG_INFO(1, "autoBump: 0x%x\n", _GlideRoot.environment.autoBump);
2245 /* The logic for this is hosed for PowerPC, where we disable auto-bump even
2247 - if (gc->cmdTransportInfo.autoBump = _GlideRoot.environment.autoBump) {
2248 + if ((gc->cmdTransportInfo.autoBump = _GlideRoot.environment.autoBump) != 0) {
2249 if (!hwcInitFifo( bInfo, gc->cmdTransportInfo.autoBump)) {
2250 hwcRestoreVideo(bInfo);
2251 GrErrorCallback(hwcGetErrorString(), FXFALSE);
2252 @@ -2376,7 +2376,7 @@
2253 gc->tmu_state[0].total_mem = gc->tramSize;
2255 /* gc->fbOffset = (FxU32)fxHalFbiGetMemory((SstRegs*)gc->reg_ptr); */
2256 - gc->fbOffset = (FxU32)gc->rawLfb;
2257 + gc->fbOffset = (long)gc->rawLfb;
2259 gc->tmuMemInfo[0].tramOffset =
2260 (pixelformat == GR_PIXFMT_ARGB_8888) ? 0x400000 : 0x200000;
2261 @@ -2743,7 +2743,10 @@
2265 - _grImportFifo(*driInfo.fifoPtr, *driInfo.fifoRead);
2267 + extern void _grImportFifo(int, int);
2268 + _grImportFifo(*driInfo.fifoPtr, *driInfo.fifoRead);
2272 /* The hw is now in a usable state from the fifo macros.
2273 @@ -3033,7 +3036,7 @@
2274 * the tls gc explicitly otherwise other whacky-ness (read 'random
2275 * crashes' will ensue).
2277 - setThreadValue((FxU32)gc);
2278 + setThreadValue((long)gc);
2279 if ((gc != NULL) && gc->open) grFlush();
2281 /* Make sure that the user specified gc is not whacked */
2282 --- Glide3/h5/glide3/src/glfb.c.ia64-foo Fri Nov 17 16:31:05 2000
2283 +++ Glide3/h5/glide3/src/glfb.c Thu Dec 21 14:27:40 2000
2284 @@ -1114,7 +1114,7 @@
2285 case GR_LFB_SRC_FMT_ZA16:
2286 dstData = (FxU32*)(((FxU16*)dstData) + dst_x);
2287 length = src_width * 2;
2288 - aligned = !((int)dstData&0x2);
2289 + aligned = !((long)dstData&0x2);
2290 srcJump = src_stride - length;
2291 dstJump = info.strideInBytes - length;
2293 @@ -1404,7 +1404,7 @@
2294 length = src_width * 2;
2295 dstJump = dst_stride - length;
2296 srcJump = info.strideInBytes - length;
2297 - aligned = !((int)srcData&0x2);
2298 + aligned = !((long)srcData&0x2);
2299 odd = (src_y+src_height) & 0x1;
2302 --- Glide3/h5/glide3/src/gglide.c.ia64-foo Fri Nov 24 13:36:47 2000
2303 +++ Glide3/h5/glide3/src/gglide.c Thu Dec 21 14:27:40 2000
2304 @@ -2647,8 +2647,8 @@
2305 for ( i = 0; i < MAX_BUFF_PENDING && j == -1; i++) {
2306 if (gc->bufferSwaps[i] == 0xffffffff) {
2307 gc->bufferSwaps[i] =
2308 - (FxU32) gc->cmdTransportInfo.fifoPtr -
2309 - (FxU32) gc->cmdTransportInfo.fifoStart;
2310 + (long) gc->cmdTransportInfo.fifoPtr -
2311 + (long) gc->cmdTransportInfo.fifoStart;
2315 @@ -2850,7 +2850,7 @@
2316 REG_GROUP_SET_WAX(hw, srcXY, x | ((driInfo.y+(y-driInfo.y))<<16));
2317 REG_GROUP_SET_WAX(hw, dstSize, (w&0x1FFF)|((h&0x1FFF)<<16));
2318 REG_GROUP_SET_WAX(hw, dstXY, (x&0x1FFF) | ((y&0x1FFF)<<16));
2319 - REG_GROUP_SET_WAX(hw, command, (0xCC<<24) | 0x1 | BIT(8));
2320 + REG_GROUP_SET_WAX(hw, command, (0xCCu<<24) | 0x1 | BIT(8));
2324 @@ -3903,7 +3903,7 @@
2325 * continuing so that any internal glide calls have a valid
2326 * gc from tls via GR_DCL_GC. F*ck this up at your own peril.
2328 - setThreadValue((FxU32)gc);
2329 + setThreadValue((long)gc);
2330 #if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
2331 /* Flush any remaining commands and cleanup any per gc state */
2332 grSurfaceReleaseContext((GrContext_t)gc);
2333 --- Glide3/h5/glide3/src/makefile.ia64-foo Thu Dec 21 14:39:07 2000
2334 +++ Glide3/h5/glide3/src/makefile Thu Dec 21 14:38:51 2000
2336 FX_GLIDE_PACKET_FIFO = 1
2339 +ARCH := $(patsubst sparc64,sparc,$(patsubst i%86,i386,$(shell uname -m)))
2341 +ifeq (i386,$(ARCH))
2342 FX_GLIDE_CTRISETUP = 0
2344 +FX_GLIDE_CTRISETUP = 1
2347 # Compile for specific hardware
2348 !if "$(HAL_CSIM)" == "1"
2349 --- Glide3/h5/glide3/tests/.gdbinit.ia64-foo Thu Dec 21 14:27:40 2000
2350 +++ Glide3/h5/glide3/tests/.gdbinit Thu Dec 21 14:27:40 2000
2352 +dir /r/erikson/usr/src/redhat/BUILD/Glide_V3-DRI-3.10/h3/glide3/src:/r/erikson/usr/src/redhat/BUILD/Glide_V3-DRI-3.10/h3/minihwc:/r/erikson/usr/src/redhat/BUILD/XFree86-4.0/xc/lib/Xxf86vm
2353 +set gdbg_debuglevel[80]=255
2354 +set gdbg_debuglevel[280]=255
2355 --- Glide3/h5/incsrc/gdebug.h.ia64-foo Wed Nov 15 18:32:58 2000
2356 +++ Glide3/h5/incsrc/gdebug.h Thu Dec 21 14:27:40 2000
2358 #pragma disable_message (111, 201, 302)
2359 #endif /* defined(__WATCOMC__) || defined(__WATCOM_CPLUSPLUS__) */
2361 -#define GDBG_INFO 0 && (unsigned long)
2362 -#define GDBG_INFO_MORE 0 && (unsigned long)
2363 -#define GDBG_PRINTF 0 && (unsigned long)
2365 +# define GDBG_INFO(x...)
2366 +# define GDBG_INFO_MORE(x...)
2367 +# define GDBG_PRINTF(x...)
2369 -#define GDBG_ERROR_SET_CALLBACK 0 && (unsigned long)
2370 -#define GDBG_ERROR_CLEAR_CALLBACK 0 && (unsigned long)
2371 +# define GDBG_ERROR_SET_CALLBACK(x...)
2372 +# define GDBG_ERROR_CLEAR_CALLBACK(x...)
2374 +# define GDBG_INFO 0 && (unsigned long)
2375 +# define GDBG_INFO_MORE 0 && (unsigned long)
2376 +# define GDBG_PRINTF 0 && (unsigned long)
2378 +# define GDBG_ERROR_SET_CALLBACK 0 && (unsigned long)
2379 +# define GDBG_ERROR_CLEAR_CALLBACK 0 && (unsigned long)
2382 #define GDBG_GET_DEBUGLEVEL(x) 0
2383 #define GDBG_SET_DEBUGLEVEL(a,b)
2384 --- Glide3/h5/incsrc/h3defs.h.ia64-foo Thu Nov 16 14:21:27 2000
2385 +++ Glide3/h5/incsrc/h3defs.h Thu Dec 21 14:27:40 2000
2388 // this crazy macro tests the sign bit of a float by loading it into
2389 // an integer register and then testing the sign bit of the integer
2390 -#define FLOAT_ISNEG(f) ((*(int *)(&(f))) < 0)
2392 + /* On IA-64, it's faster to do this the obvious way... --davidm 00/08/09 */
2393 +# define FLOAT_ISNEG(f) ((f) < 0.0)
2395 +# define FLOAT_ISNEG(f) ((*(int *)(&(f))) < 0)
2398 // these crazy macros returns the sign of a number (1 if >= 0; -1 if < 0)
2399 -#define ISIGN(x) (((x) | 0x40000000L) >> 30)
2400 -#define FSIGN(f) ISIGN(*(long *)&f)
2402 +# define ISIGN(x) ((x) >= 0 ? 1 : -1)
2403 +# define FSIGN(f) ((f) >= 0.0 ? 1 : -1)
2405 +# define ISIGN(x) (((x) | 0x40000000L) >> 30)
2406 +# define FSIGN(f) ISIGN(*(long *)&f)
2409 #define BIT(n) (1UL<<(n))
2410 #define SST_MASK(n) (0xFFFFFFFFL >> (32-(n)))
2411 @@ -2032,9 +2042,9 @@
2413 //----------------- useful addressing macros -----------------------
2414 // return pointer to SST at specified WRAP, CHIP, or TREX
2415 -#define SST_WRAP(sst,n) ((SstRegs *)((n)*0x4000+(FxI32)(sst)))
2416 -#define SST_CHIP(sst,n) ((SstRegs *)((n)*0x400+(FxI32)(sst)))
2417 -#define SST_TMU(sst,n) ((SstRegs *)((0x800<<(n))+(FxI32)(sst)))
2418 +#define SST_WRAP(sst,n) ((SstRegs *)((n)*0x4000+(long)(sst)))
2419 +#define SST_CHIP(sst,n) ((SstRegs *)((n)*0x400+(long)(sst)))
2420 +#define SST_TMU(sst,n) ((SstRegs *)((0x800<<(n))+(long)(sst)))
2421 #define SST_TREX(sst,n) SST_TMU(sst,n)
2423 // offsets from the base of memBaseAddr0
2424 @@ -2081,7 +2091,7 @@
2426 #define SST_IS_REGISTER_ADDR(a) ( (a) >= SST_IO_OFFSET && (a) < SST_TEX_OFFSET )
2428 -#define SST_BASE_ADDRESS(sst) ((FxI32)(sst)-SST_3D_OFFSET)
2429 +#define SST_BASE_ADDRESS(sst) ((long)(sst)-SST_3D_OFFSET)
2430 #define SST_IO_ADDRESS(sst) (SST_IO_OFFSET+SST_BASE_ADDRESS(sst))
2431 #define SST_CMDAGP_ADDRESS(sst) (SST_CMDAGP_OFFSET+SST_BASE_ADDRESS(sst))
2432 #define SST_GUI_ADDRESS(sst) (SST_2D_OFFSET+SST_BASE_ADDRESS(sst))
2433 --- Glide3/h5/incsrc/h3info.h.ia64-foo Wed Nov 15 18:32:58 2000
2434 +++ Glide3/h5/incsrc/h3info.h Thu Dec 21 14:27:40 2000
2437 #define FxU8 unsigned char
2438 #define FxU16 unsigned short
2439 -#define FxU32 unsigned long
2441 +# define FxU32 unsigned int
2443 +# define FxU32 unsigned long
2446 // defn of registers not reqd, treat (SstRegs *) as (void *)
2447 typedef void SstRegs;
2448 --- Glide3/h5/incsrc/h3regs.h.ia64-foo Wed Nov 15 18:32:58 2000
2449 +++ Glide3/h5/incsrc/h3regs.h Thu Dec 21 14:27:40 2000
2450 @@ -112,9 +112,12 @@
2455 +typedef unsigned int FxU32;
2457 typedef unsigned long FxU32;
2461 //----------------- SST chip I/O layout -------------------------
2462 // I/O registers remapped into memory space
2463 // Includes init, dac/pll, video, and VGA registers
2465 //----------------- SST chip 3D layout -------------------------
2466 // registers are in groups of 8 for easy decode
2467 typedef struct vertex_Rec {
2468 - unsigned long x; // 12.4 format
2469 - unsigned long y; // 12.4
2470 + FxU32 x; // 12.4 format
2474 typedef volatile struct sstregs { // THE 3D CHIP
2475 @@ -294,127 +297,127 @@
2479 - long r; // 12.12 Parameters
2482 - long z; // 20.12 in 16bpp, 28.4 in 32bpp (there is an ugly hack in csimio.c, search "//EVIL:")
2488 - long drdx; // X Gradients
2491 - long dzdx; //20.12 in 16bpp, 28.4 in 32bpp (there is an ugly hack in csimio.c, search "//EVIL:")
2497 - long drdy; // Y Gradients
2500 - long dzdy; //20.12 in 16bpp, 28.4 in 32bpp (there is an ugly hack in csimio.c, search "//EVIL:")
2505 + FxI32 r; // 12.12 Parameters
2508 + FxI32 z; // 20.12 in 16bpp, 28.4 in 32bpp (there is an ugly hack in csimio.c, search "//EVIL:")
2514 + FxI32 drdx; // X Gradients
2517 + FxI32 dzdx; //20.12 in 16bpp, 28.4 in 32bpp (there is an ugly hack in csimio.c, search "//EVIL:")
2523 + FxI32 drdy; // Y Gradients
2526 + FxI32 dzdy; //20.12 in 16bpp, 28.4 in 32bpp (there is an ugly hack in csimio.c, search "//EVIL:")
2532 - unsigned long triangleCMD; // execute a triangle command (float)
2533 - unsigned long reservedA;
2534 + FxU32 triangleCMD; // execute a triangle command (float)
2536 vtxRec FvA; // floating point version
2540 - long Fr; // floating point version
2567 - unsigned long FtriangleCMD; // execute a triangle command
2568 - unsigned long fbzColorPath; // color select and combine
2569 - unsigned long fogMode; // fog Mode
2570 - unsigned long alphaMode; // alpha Mode
2571 - unsigned long fbzMode; // framebuffer and Z mode
2572 - unsigned long lfbMode; // linear framebuffer Mode
2573 - unsigned long clipLeftRight; // (6)10(6)10
2574 - unsigned long clipBottomTop; // (6)10(6)10
2576 - unsigned long nopCMD; // execute a nop command
2577 - unsigned long fastfillCMD; // execute a fast fill command
2578 - unsigned long swapbufferCMD;// execute a swapbuffer command
2579 - unsigned long fogColor; // (8)888
2580 - unsigned long zaColor; // 8.24
2581 - unsigned long chromaKey; // (8)888
2582 - unsigned long chromaRange;
2583 - unsigned long userIntrCmd;
2585 - unsigned long stipple; // 32 bits, MSB masks pixels
2586 - unsigned long c0; // 8.8.8.8 (ARGB)
2587 - unsigned long c1; // 8.8.8.8 (ARGB)
2588 + FxI32 Fr; // floating point version
2615 + FxU32 FtriangleCMD; // execute a triangle command
2616 + FxU32 fbzColorPath; // color select and combine
2617 + FxU32 fogMode; // fog Mode
2618 + FxU32 alphaMode; // alpha Mode
2619 + FxU32 fbzMode; // framebuffer and Z mode
2620 + FxU32 lfbMode; // linear framebuffer Mode
2621 + FxU32 clipLeftRight; // (6)10(6)10
2622 + FxU32 clipBottomTop; // (6)10(6)10
2624 + FxU32 nopCMD; // execute a nop command
2625 + FxU32 fastfillCMD; // execute a fast fill command
2626 + FxU32 swapbufferCMD;// execute a swapbuffer command
2627 + FxU32 fogColor; // (8)888
2628 + FxU32 zaColor; // 8.24
2629 + FxU32 chromaKey; // (8)888
2630 + FxU32 chromaRange;
2631 + FxU32 userIntrCmd;
2633 + FxU32 stipple; // 32 bits, MSB masks pixels
2634 + FxU32 c0; // 8.8.8.8 (ARGB)
2635 + FxU32 c1; // 8.8.8.8 (ARGB)
2636 struct { // statistic gathering variables
2637 - unsigned long fbiPixelsIn;
2638 - unsigned long fbiChromaFail;
2639 - unsigned long fbiZfuncFail;
2640 - unsigned long fbiAfuncFail;
2641 - unsigned long fbiPixelsOut;
2642 + FxU32 fbiPixelsIn;
2643 + FxU32 fbiChromaFail;
2644 + FxU32 fbiZfuncFail;
2645 + FxU32 fbiAfuncFail;
2646 + FxU32 fbiPixelsOut;
2649 - unsigned long fogTable[32]; // 64 entries, 2 per word, 2 bytes each
2650 + FxU32 fogTable[32]; // 64 entries, 2 per word, 2 bytes each
2652 - unsigned long renderMode; // new 32bpp and 1555 modes
2653 - unsigned long stencilMode;
2654 - unsigned long stencilOp;
2655 - unsigned long colBufferAddr; //This is the primary colBufferAddr
2656 - unsigned long colBufferStride;
2657 - unsigned long auxBufferAddr; //This is the primary auxBufferAddr
2658 - unsigned long auxBufferStride;
2659 - unsigned long fbiStencilFail;
2661 - unsigned long clipLeftRight1;
2662 - unsigned long clipBottomTop1;
2663 - unsigned long combineMode;
2664 - unsigned long sliCtrl;
2665 - unsigned long aaCtrl;
2666 - unsigned long chipMask;
2667 - unsigned long leftDesktopBuf;
2668 - unsigned long reservedD[2]; // NOTE: used to store TMUprivate ptr (reservedD[0])
2669 + FxU32 renderMode; // new 32bpp and 1555 modes
2670 + FxU32 stencilMode;
2672 + FxU32 colBufferAddr; //This is the primary colBufferAddr
2673 + FxU32 colBufferStride;
2674 + FxU32 auxBufferAddr; //This is the primary auxBufferAddr
2675 + FxU32 auxBufferStride;
2676 + FxU32 fbiStencilFail;
2678 + FxU32 clipLeftRight1;
2679 + FxU32 clipBottomTop1;
2680 + FxU32 combineMode;
2684 + FxU32 leftDesktopBuf;
2685 + FxU32 reservedD[2]; // NOTE: used to store TMUprivate ptr (reservedD[0])
2686 // NOTE: used to store CSIMprivate ptr (reservedD[1])
2688 - unsigned long reservedE[7]; // NOTE: reservedE[0] stores the secondary colBufferAddr
2689 + FxU32 reservedE[7]; // NOTE: reservedE[0] stores the secondary colBufferAddr
2690 // NOTE: reservedE[1] stores the secondary auxBufferAddr
2691 // NOTE: reservedE[2] stores the primary colBufferAddr
2692 // NOTE: reservedE[3] stores the primary auxBufferAddr
2694 - unsigned long reservedF[3];
2695 - unsigned long swapBufferPend;
2696 - unsigned long leftOverlayBuf;
2697 - unsigned long rightOverlayBuf;
2698 - unsigned long fbiSwapHistory;
2699 - unsigned long fbiTrianglesOut; // triangles out counter
2700 + FxU32 reservedF[3];
2701 + FxU32 swapBufferPend;
2702 + FxU32 leftOverlayBuf;
2703 + FxU32 rightOverlayBuf;
2704 + FxU32 fbiSwapHistory;
2705 + FxU32 fbiTrianglesOut; // triangles out counter
2709 @@ -436,24 +439,24 @@
2713 - unsigned long reservedG[6];
2714 + FxU32 reservedG[6];
2716 - unsigned long reservedH[8];
2717 + FxU32 reservedH[8];
2719 - unsigned long reservedI[8];
2720 + FxU32 reservedI[8];
2722 - unsigned long textureMode; // texture Mode
2723 - unsigned long tLOD; // texture LOD settings
2724 - unsigned long tDetail; // texture detail settings
2725 - unsigned long texBaseAddr; // current texture base address
2726 - unsigned long texBaseAddr1;
2727 - unsigned long texBaseAddr2;
2728 - unsigned long texBaseAddr38;
2729 - unsigned long trexInit0; // hardware init bits
2730 - unsigned long trexInit1; // hardware init bits
2731 + FxU32 textureMode; // texture Mode
2732 + FxU32 tLOD; // texture LOD settings
2733 + FxU32 tDetail; // texture detail settings
2734 + FxU32 texBaseAddr; // current texture base address
2735 + FxU32 texBaseAddr1;
2736 + FxU32 texBaseAddr2;
2737 + FxU32 texBaseAddr38;
2738 + FxU32 trexInit0; // hardware init bits
2739 + FxU32 trexInit1; // hardware init bits
2741 - unsigned long nccTable0[12]; // NCC decode tables, bits are packed
2742 - unsigned long nccTable1[12]; // 4 words Y, 4 words I, 4 words Q
2743 + FxU32 nccTable0[12]; // NCC decode tables, bits are packed
2744 + FxU32 nccTable1[12]; // 4 words Y, 4 words I, 4 words Q
2748 --- Glide3/h5/minihwc/hwcext.h.ia64-foo Wed Nov 15 18:32:58 2000
2749 +++ Glide3/h5/minihwc/hwcext.h Thu Dec 21 14:27:40 2000
2752 /* Returned from HWCEXT_GETLINEARADDR */
2753 typedef struct hwcExtLinearAddrRes_s {
2755 - numBaseAddrs, /* # base addresses */
2756 - baseAddresses[HWCEXT_MAX_BASEADDR]; /* linear Addresses */
2757 + FxU32 numBaseAddrs; /* # base addresses */
2758 + long baseAddresses[HWCEXT_MAX_BASEADDR]; /* linear Addresses */
2759 } hwcExtLinearAddrRes_t;
2762 --- Glide3/h5/minihwc/minihwc.c.ia64-foo Thu Nov 16 14:26:03 2000
2763 +++ Glide3/h5/minihwc/minihwc.c Thu Dec 21 14:27:40 2000
2764 @@ -1660,7 +1660,7 @@
2765 for (bAddr = 0; bAddr < 2; bAddr++) {
2766 if ((bAddrMask & (0x01UL << bAddr)) != 0x00UL) {
2767 bInfo->linearInfo.linearAddress[bAddr] =
2768 - (FxU32)pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
2769 + pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
2770 length, &bInfo->deviceNum, bInfo->boardNum, bAddr);
2773 @@ -1669,13 +1669,13 @@
2776 bInfo->linearInfo.linearAddress[2] =
2777 - (FxU32)pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
2778 + pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
2779 length, &bInfo->deviceNum, bInfo->boardNum, 2);
2781 /* Does the caller want the rom bios? */
2782 if ((bAddrMask & 0x08UL) != 0x00UL) {
2783 bInfo->linearInfo.linearAddress[3] =
2784 - (FxU32)pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
2785 + pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
2786 0x1000000, &bInfo->deviceNum, bInfo->boardNum, 3);
2789 --- Glide3/h5/minihwc/minihwc.h.ia64-foo Wed Nov 15 18:32:58 2000
2790 +++ Glide3/h5/minihwc/minihwc.h Thu Dec 21 14:27:40 2000
2791 @@ -315,14 +315,14 @@
2792 typedef struct hwcLinearInfo_s {
2797 linearAddress[HWC_NUM_BASE_ADDR];
2800 typedef struct hwcRegInfo_s {
2805 ioMemBase, /* mem base for I/O aliases */
2806 cmdAGPBase, /* CMD/AGP register base */
2807 waxBase, /* 2D register base */
2808 --- Glide3/h5/minihwc/linhwc.c.ia64-foo Fri Nov 17 16:31:08 2000
2809 +++ Glide3/h5/minihwc/linhwc.c Thu Dec 21 14:27:40 2000
2813 static FxU32 fenceVar;
2814 -#define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
2816 +# define P6FENCE asm volatile("mf.a" ::: "memory");
2817 +#elif defined (__alpha__)
2818 +# define P6FENCE asm volatile("mb" ::: "memory");
2820 +# define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
2823 #define MAXFIFOSIZE 0x40000
2824 #define FIFOPAD 0x0000
2826 bInfo->linearInfo.initialized = FXTRUE;
2827 bInfo->osNT = FXFALSE;
2828 bInfo->procHandle = getpid();
2829 - bInfo->linearInfo.linearAddress[0]=(FxU32)driInfo.pRegs;
2830 - bInfo->linearInfo.linearAddress[1]=(FxU32)driInfo.pFB;
2831 + bInfo->linearInfo.linearAddress[0]=(long)driInfo.pRegs;
2832 + bInfo->linearInfo.linearAddress[1]=(long)driInfo.pFB;
2836 @@ -897,6 +903,10 @@
2838 } /* hwcResolutionSupported */
2840 +extern void _grImportFifo (int, int);
2841 +extern void _grInvalidateAll (void);
2842 +extern void _grExportFifo (int *, int *);
2844 /* This two routines hwcSLIRead{Enable,Disable} are currently NOPs XXX */
2846 void hwcSLIReadEnable(hwcBoardInfo *bInfo)
2849 void grDRIResetSAREA()
2851 - _grExportFifo(driInfo.fifoPtr, driInfo.fifoRead);
2852 + _grExportFifo((int *)driInfo.fifoPtr, driInfo.fifoRead);
2855 --- Glide3/swlibs/fxmisc/fximg.c.ia64-foo Tue Oct 3 14:31:53 2000
2856 +++ Glide3/swlibs/fxmisc/fximg.c Thu Dec 21 14:27:40 2000
2857 @@ -1948,7 +1948,7 @@
2858 if (prefix) { // if there's a path prefix
2860 strcpy(buf,prefix); // copy and replace semicolon
2861 - if ((p = strchr(buf,';'))) *p = '\0';
2862 + if ((p = strchr(buf,';')) != NULL) *p = '\0';
2863 fprintf(stderr,buf);
2864 fprintf(stderr,"/");
2866 --- Glide3/swlibs/fxmisc/fxos.c.ia64-foo Tue Oct 3 14:31:53 2000
2867 +++ Glide3/swlibs/fxmisc/fxos.c Thu Dec 21 14:27:40 2000
2870 // first try and open up the file in the current directory
2871 if (pprefix) *pprefix = NULL;
2872 - if ((file = fopen(filename,mode)))
2873 + if ((file = fopen(filename,mode)) != NULL)
2878 strcat(nameWithPath,"/"); // add directory separator
2879 strcat(nameWithPath,filename); // add filename
2880 if (pprefix) *pprefix = path; // save the prefix
2881 - if ((file = fopen(nameWithPath,mode)))
2882 + if ((file = fopen(nameWithPath,mode)) != NULL)
2884 path = psemi; // advance to next path element
2886 --- Glide3/swlibs/include/make/3dfx.mak.ia64-foo Tue Oct 3 14:25:35 2000
2887 +++ Glide3/swlibs/include/make/3dfx.mak Thu Dec 21 14:27:40 2000
2889 # assembly language in grDrawTriangle. Larger optimization removes
2890 # an extra push in the calling sequence.
2892 -CNODEBUG = -O6 -m486 -fomit-frame-pointer -funroll-loops \
2893 +CNODEBUG = -O3 -fomit-frame-pointer -funroll-loops \
2894 -fexpensive-optimizations -ffast-math -DBIG_OPT
2897 --- Glide3/swlibs/include/make/3dfx.linux.mak.ia64-foo Wed Jul 12 17:35:28 2000
2898 +++ Glide3/swlibs/include/make/3dfx.linux.mak Thu Dec 21 14:27:40 2000
2900 # assembly language in grDrawTriangle. Larger optimization removes
2901 # an extra push in the calling sequence.
2903 -CNODEBUG = -O6 -m486 -fomit-frame-pointer -funroll-loops \
2904 +CNODEBUG = -O3 -fomit-frame-pointer -funroll-loops \
2905 -fexpensive-optimizations -ffast-math -DBIG_OPT
2908 --- Glide3/swlibs/include/make/makefile.autoconf.bottom.ia64-foo Mon Aug 7 11:24:44 2000
2909 +++ Glide3/swlibs/include/make/makefile.autoconf.bottom Thu Dec 21 14:27:40 2000
2911 GLIDE_DEBUG_GCFLAGS = -g -O
2912 GLIDE_DEBUG_GDEFS = -DGDBG_INFO_ON -DGLIDE_DEBUG
2914 -GLIDE_DEBUG_GCFLAGS = -O6 -m486
2915 +GLIDE_DEBUG_GCFLAGS = -O3
2916 GLIDE_DEBUG_GDEFS = -fomit-frame-pointer -funroll-loops \
2917 -fexpensive-optimizations -ffast-math -DBIG_OPT
2919 --- Glide3/swlibs/newpci/pcilib/fxlinux.c.ia64-foo Wed Jun 14 20:11:40 2000
2920 +++ Glide3/swlibs/newpci/pcilib/fxlinux.c Thu Dec 21 14:27:40 2000
2922 static FxBool pciOutputStringLinux(const char *msg);
2923 static FxBool pciInitializeLinux(void);
2924 static FxBool pciShutdownLinux(void);
2925 -static FxBool pciMapLinearLinux(FxU32, FxU32 physical_addr, FxU32 *linear_addr,
2926 +static FxBool pciMapLinearLinux(FxU32, FxU32 physical_addr, long *linear_addr,
2928 -static FxBool pciUnmapLinearLinux(FxU32 linear_addr, FxU32 length);
2929 -static FxBool pciSetPermissionLinux(const FxU32, const FxU32, const FxBool);
2930 +static FxBool pciUnmapLinearLinux(long linear_addr, FxU32 length);
2931 +static FxBool pciSetPermissionLinux(const long, const FxU32, const FxBool);
2932 static FxU8 pciPortInByteLinux(unsigned short port);
2933 static FxU16 pciPortInWordLinux(unsigned short port);
2934 static FxU32 pciPortInLongLinux(unsigned short port);
2938 pciMapLinearLinux(FxU32 bus, FxU32 physical_addr,
2939 - FxU32 *linear_addr, FxU32 *length)
2940 + long *linear_addr, FxU32 *length)
2943 if (linuxDevFd!=-1) {
2948 - if (((*linear_addr)=(FxU32)mmap(0, *length, PROT_READ|PROT_WRITE,
2949 + if (((*linear_addr)=(long)mmap(0, *length, PROT_READ|PROT_WRITE,
2950 MAP_SHARED, fd, physical_addr))<0) {
2951 if (fd!=linuxDevFd) close(fd);
2953 @@ -225,14 +225,14 @@
2957 -pciUnmapLinearLinux(FxU32 linear_addr, FxU32 length)
2958 +pciUnmapLinearLinux(long linear_addr, FxU32 length)
2960 - munmap((void*)linear_addr, length);
2961 + munmap((void *) linear_addr, length);
2966 -pciSetPermissionLinux(const FxU32 addrBase, const FxU32 addrLen,
2967 +pciSetPermissionLinux(const long addrBase, const FxU32 addrLen,
2968 const FxBool writePermP)
2971 --- Glide3/swlibs/newpci/pcilib/fxpci.c.ia64-foo Mon Nov 27 04:49:33 2000
2972 +++ Glide3/swlibs/newpci/pcilib/fxpci.c Thu Dec 21 14:27:40 2000
2975 FxU32 cardNum, FxU32 addressNum)
2980 + FxU32 physAddress;
2983 /* 1) open the PCI device and scan it for devices
2984 * 2) scan the existing devices for a match
2987 /* 3) find the current physcial address of the card */
2988 pciGetConfigData( baseAddresses[addressNum], *devNum, &physAddress );
2989 - if (length <= 0) return (FxU32*)length;
2990 + if (length <= 0) return (FxU32*)(long)length;
2992 /* Mask the memory type information bits off.
2993 * [0]: Memory type indicator (0 memory/1 i/o)
2997 FX_EXPORT FxBool FX_CSTYLE
2998 -pciMapPhysicalToLinear( FxU32 *linear_addr, FxU32 physical_addr,
2999 +pciMapPhysicalToLinear( long *linear_addr, FxU32 physical_addr,
3002 return pciMapPhysicalDeviceToLinear(linear_addr,
3004 } /* pciMapPhysicalToLinear */
3006 FX_ENTRY FxBool FX_CALL
3007 -pciMapPhysicalDeviceToLinear(FxU32 *linear_addr,
3008 +pciMapPhysicalDeviceToLinear(long *linear_addr,
3009 FxU32 busNumber, FxU32 physical_addr,
3015 FX_EXPORT void FX_CSTYLE
3016 -pciUnmapPhysical( FxU32 linear_addr, FxU32 length )
3017 +pciUnmapPhysical( long linear_addr, FxU32 length )
3024 FX_EXPORT FxBool FX_CSTYLE
3025 -pciLinearRangeSetPermission(const FxU32 addrBase, const FxU32 addrLen, const FxBool writeableP)
3026 +pciLinearRangeSetPermission(const long addrBase, const FxU32 addrLen, const FxBool writeableP)
3028 return pciLinearRangeSetPermissionDD(addrBase, addrLen, writeableP);
3030 --- Glide3/swlibs/newpci/pcilib/fxpci.h.ia64-foo Wed Jun 14 20:11:40 2000
3031 +++ Glide3/swlibs/newpci/pcilib/fxpci.h Thu Dec 21 14:27:40 2000
3032 @@ -180,15 +180,15 @@
3033 * on bus0 which would not work across pci bridges or on agp devices.
3035 FX_ENTRY FxBool FX_CALL
3036 -pciMapPhysicalToLinear(FxU32 *linear_addr, FxU32 physical_addr,FxU32 *length);
3037 +pciMapPhysicalToLinear(long *linear_addr, FxU32 physical_addr,FxU32 *length);
3039 FX_ENTRY FxBool FX_CALL
3040 -pciMapPhysicalDeviceToLinear(FxU32 *linear_addr,
3041 +pciMapPhysicalDeviceToLinear(long *linear_addr,
3042 FxU32 busNumber, FxU32 physical_addr,
3045 FX_ENTRY void FX_CALL
3046 -pciUnmapPhysical( FxU32 linear_addr, FxU32 length );
3047 +pciUnmapPhysical( long linear_addr, FxU32 length );
3050 pciGetVendorName( FxU16 vendor_id );
3052 pciOutputDebugString(const char* debugMsg);
3054 FX_ENTRY FxBool FX_CALL
3055 -pciLinearRangeSetPermission(const FxU32 addrBase, const FxU32 addrLen, const FxBool writeableP);
3056 +pciLinearRangeSetPermission(const long addrBase, const FxU32 addrLen, const FxBool writeableP);
3058 #define PCI_ERR_NOERR 0
3059 #define PCI_ERR_WINRTINIT 1
3060 --- Glide3/swlibs/newpci/pcilib/pcilib.h.ia64-foo Wed Jun 14 20:11:40 2000
3061 +++ Glide3/swlibs/newpci/pcilib/pcilib.h Thu Dec 21 14:27:40 2000
3064 /* Platform device address management */
3065 FxBool (*addrMap)(FxU32 busNumber, FxU32 physAddr,
3066 - FxU32* linearAddr, FxU32* length);
3067 - FxBool (*addrUnmap)(FxU32 linearAddr, FxU32 length);
3068 + long* linearAddr, FxU32* length);
3069 + FxBool (*addrUnmap)(long linearAddr, FxU32 length);
3071 /* Optional things that a platform may or maynot support and clients
3072 * should not rely on the call to suceed.
3074 - FxBool (*addrSetPermission)(const FxU32 addrBase, const FxU32 addrLen,
3075 + FxBool (*addrSetPermission)(const long addrBase, const FxU32 addrLen,
3076 const FxBool writePermP);
3078 FxBool (*msrGet)(MSRInfo* in, MSRInfo* out);
3079 --- Glide3/swlibs/texus/lib/dequant.c.ia64-foo Wed Jun 14 20:11:40 2000
3080 +++ Glide3/swlibs/texus/lib/dequant.c Thu Dec 21 14:27:40 2000
3081 @@ -160,12 +160,12 @@
3085 -_txImgDequantizeYIQ422(FxU32 *out, FxU8 *in, int w, int h, const long *yabTable)
3086 +_txImgDequantizeYIQ422(FxU32 *out, FxU8 *in, int w, int h, const FxU32 *yabTable)
3091 - txYABtoPal256((long *)pal, (long *)yabTable);
3092 + txYABtoPal256(pal, yabTable);
3095 while (n--) *--out = pal[*--in] | 0xff000000;
3096 @@ -223,10 +223,10 @@
3100 -_txImgDequantizeAYIQ8422(FxU32 *out, FxU16 *in, int w, int h, const long *yab)
3101 +_txImgDequantizeAYIQ8422(FxU32 *out, FxU16 *in, int w, int h, const FxU32 *yab)
3107 txYABtoPal256(pal, yab);
3110 case GR_TEXFMT_RGB_332: _txImgDequantizeRGB332(dst, src, w, h);
3112 case GR_TEXFMT_YIQ_422: _txImgDequantizeYIQ422(dst, src, w, h,
3113 - (long *)pxMip->pal); break;
3114 + pxMip->pal); break;
3115 case GR_TEXFMT_A_8: _txImgDequantizeA8(dst, src, w, h);
3117 case GR_TEXFMT_I_8: _txImgDequantizeI8(dst, src, w, h);
3119 case GR_TEXFMT_ARGB_8332: _txImgDequantizeARGB8332(dst, src, w, h);
3121 case GR_TEXFMT_AYIQ_8422: _txImgDequantizeAYIQ8422(dst, src, w, h,
3122 - (long *)pxMip->pal); break;
3123 + pxMip->pal); break;
3124 case GR_TEXFMT_RGB_565: _txImgDequantizeRGB565(dst, src, w, h);
3126 case GR_TEXFMT_ARGB_1555: _txImgDequantizeARGB1555(dst, src, w, h);
3127 --- Glide3/swlibs/texus/lib/mipmap.c.ia64-foo Wed Jun 14 20:11:40 2000
3128 +++ Glide3/swlibs/texus/lib/mipmap.c Thu Dec 21 14:27:40 2000
3130 #define B3(x) ((x>>0)&0xFF)
3133 -_txImgHalve(long *outdata, int width, int height, long *indata)
3134 +_txImgHalve(int *outdata, int width, int height, int *indata)
3137 unsigned int w,h, *p,sum,*q;
3138 --- Glide3/swlibs/texus/lib/ncc.c.ia64-foo Tue Oct 3 14:31:53 2000
3139 +++ Glide3/swlibs/texus/lib/ncc.c Thu Dec 21 14:27:40 2000
3144 -_txImgNcc(char *odata, unsigned long *idata, int w, int h, int format,
3145 +_txImgNcc(char *odata, unsigned int *idata, int w, int h, int format,
3148 int (*quantizer)(unsigned long argb, int x, int y, int w);
3152 if ((dither & TX_DITHER_MASK) == TX_DITHER_ERR) {
3153 - txYABtoPal256((long *)pxMip->pal, (long *) &ncc.y[0]);
3154 + txYABtoPal256(pxMip->pal, &ncc.y[0]);
3155 txDiffuseIndex(pxMip, txMip, pixsize, pxMip->pal, 256);
3158 --- Glide3/swlibs/texus/lib/nccnnet.c.ia64-foo Tue Oct 3 14:31:53 2000
3159 +++ Glide3/swlibs/texus/lib/nccnnet.c Thu Dec 21 14:27:40 2000
3161 #define MAX_NEURONS 256
3163 typedef struct _weight {
3164 - long r, g, b; // fixed point, SUBPIXEL precision bits
3165 + int r, g, b; // fixed point, SUBPIXEL precision bits
3166 int ir, ig, ib; // pure integers, maybe -256 to 255.
3169 typedef struct _vector {
3170 Weight *py, *pa, *pb;
3171 - long r, g, b; // pure integers, 0 to 255.
3172 + int r, g, b; // pure integers, 0 to 255.
3175 static Weight Y[16], A[4], B[4];
3176 static Neuron N[MAX_NEURONS];
3177 -static long errR, errG, errB, errMax;
3178 -static long totR, totG, totB;
3179 +static int errR, errG, errB, errMax;
3180 +static int totR, totG, totB;
3184 @@ -114,12 +114,12 @@
3185 x = ((256 << SUBPIXEL) -1)
3188 -_nn_modifyNeurons(long ir, long ig, long ib)
3189 +_nn_modifyNeurons(int ir, int ig, int ib)
3192 int d0, d1; // closest & next closest distance to input
3193 int p0, p1; // index into the 256 color table.
3194 - long d, dr, dg, db;
3195 + int d, dr, dg, db;
3196 Weight *py, *pa, *pb;
3199 @@ -268,10 +268,10 @@
3200 txMapPal256toYAB(FxU32 *YAB, FxU8 *map, int nsamples, FxU32 *samples)
3203 - long bstR, bstG, bstB, bstMax;
3204 + int bstR, bstG, bstB, bstMax;
3205 int iterations; // track how many inputs have been fed to NN
3206 int drySpells; // how many inputs since last best case.
3207 - long yab2pal[256];
3213 * Replace MSB of samples with index to be used with YAB table.
3216 - txYABtoPal256((long*)yab2pal, (long*)YAB);
3217 + txYABtoPal256(yab2pal, YAB);
3219 for (i=0; i<nsamples; i++) {
3224 int pixsize = (pxMip->format == GR_TEXFMT_YIQ_422) ? 1 : 2;
3225 - long yabTable[16+12+12];
3226 + int yabTable[16+12+12];
3231 * the 256 color palette generated from the YAB table. This will be
3232 * useful for error diffusion dithering.
3234 - txYABtoPal256((long *)pxMip->pal, (long *)yabTable);
3235 + txYABtoPal256(pxMip->pal, yabTable);
3236 txDiffuseIndex(pxMip, txMip, pixsize, pxMip->pal, 256);
3239 --- Glide3/swlibs/texus/lib/pal256.c.ia64-foo Tue Oct 3 14:31:53 2000
3240 +++ Glide3/swlibs/texus/lib/pal256.c Thu Dec 21 14:27:40 2000
3244 float weightedvar; /* weighted variance */
3245 - ulong mean[3]; /* centroid */
3246 - ulong weight; /* # of pixels in box */
3247 - ulong freq[3][MAXCOLORS]; /* Projected frequencies */
3248 + uint mean[3]; /* centroid */
3249 + uint weight; /* # of pixels in box */
3250 + uint freq[3][MAXCOLORS]; /* Projected frequencies */
3251 int low[3], high[3]; /* Box extent */
3254 #define COLORMAXI ( 1 << NBITS )
3256 -static ulong *Histogram; /* image histogram */
3257 +static uint *Histogram; /* image histogram */
3259 -static ulong Histogram[COLORMAXI*COLORMAXI*COLORMAXI * sizeof(long)];
3260 +static uint Histogram[COLORMAXI*COLORMAXI*COLORMAXI * sizeof(long)];
3262 -static ulong SumPixels; /* total # of pixels */
3263 -static ulong ColormaxI; /* # of colors, 2^Bits */
3264 +static uint SumPixels; /* total # of pixels */
3265 +static uint ColormaxI; /* # of colors, 2^Bits */
3266 static Box _Boxes[MAXCOLORS];
3267 static Box *Boxes; /* Array of color boxes. */
3270 static void BoxStats(Box *box);
3271 static int GreatestVariance(Box *boxes, int n);
3272 static int CutBoxes(Box *boxes, int colors);
3273 -static void QuantHistogram(ulong *pixels, int npixels, Box *box);
3274 +static void QuantHistogram(uint *pixels, int npixels, Box *box);
3277 * Perform variance-based color quantization on a 24-bit image.
3278 @@ -135,16 +135,16 @@
3282 - Histogram = (ulong *) txMalloc(ColormaxI*ColormaxI*ColormaxI * sizeof(long));
3283 + Histogram = (uint *) txMalloc(ColormaxI*ColormaxI*ColormaxI * sizeof(long));
3284 rgbmap = txMalloc((1<<NBITS)*(1<<NBITS)*(1<<NBITS));
3288 * Zero-out the projected frequency arrays of the largest box.
3290 - bzero(Boxes->freq[0], ColormaxI * sizeof(ulong));
3291 - bzero(Boxes->freq[1], ColormaxI * sizeof(ulong));
3292 - bzero(Boxes->freq[2], ColormaxI * sizeof(ulong));
3293 + bzero(Boxes->freq[0], ColormaxI * sizeof(uint));
3294 + bzero(Boxes->freq[1], ColormaxI * sizeof(uint));
3295 + bzero(Boxes->freq[2], ColormaxI * sizeof(uint));
3296 bzero(Histogram, ColormaxI * ColormaxI * ColormaxI * sizeof(long));
3298 /* Feed all bitmaps & generate histogram */
3301 for (i=0; i< txMip->depth; i++) {
3303 - QuantHistogram((ulong *)txMip->data[i], w * h, &Boxes[0]);
3304 + QuantHistogram((uint *)txMip->data[i], w * h, &Boxes[0]);
3308 @@ -166,10 +166,10 @@
3309 * from their 'prequantized' range to 0-FULLINTENSITY.
3311 for (i = 0; i < OutColors; i++) {
3313 - r = (ulong)(Boxes[i].mean[REDI] * Cfactor + 0.5);
3314 - g = (ulong)(Boxes[i].mean[GREENI] * Cfactor + 0.5);
3315 - b = (ulong)(Boxes[i].mean[BLUEI] * Cfactor + 0.5);
3317 + r = (uint)(Boxes[i].mean[REDI] * Cfactor + 0.5);
3318 + g = (uint)(Boxes[i].mean[GREENI] * Cfactor + 0.5);
3319 + b = (uint)(Boxes[i].mean[BLUEI] * Cfactor + 0.5);
3323 @@ -198,11 +198,11 @@
3326 for (i=0; i< txMip->depth; i++) {
3332 - src = (ulong *) txMip->data[i];
3333 + src = (uint *) txMip->data[i];
3334 dst = (uchar *) pxMip->data[i];
3338 * arrays for the first world-encompassing box.
3341 -QuantHistogram(ulong *pixels, int npixels, Box *box)
3342 +QuantHistogram(uint *pixels, int npixels, Box *box)
3344 - ulong *rf, *gf, *bf;
3345 + uint *rf, *gf, *bf;
3357 if(box->weight == 0) {
3361 int i, maxindex, minindex, cutpoint;
3362 - ulong optweight, curweight;
3363 + uint optweight, curweight;
3365 if (box->low[color] + 1 == box->high[color])
3366 return FALSE; /* Cannot be cut. */
3367 @@ -457,13 +457,13 @@
3369 UpdateFrequencies(Box *box1, Box *box2)
3376 - bzero(box1->freq[0], ColormaxI * sizeof(ulong));
3377 - bzero(box1->freq[1], ColormaxI * sizeof(ulong));
3378 - bzero(box1->freq[2], ColormaxI * sizeof(ulong));
3379 + bzero(box1->freq[0], ColormaxI * sizeof(uint));
3380 + bzero(box1->freq[1], ColormaxI * sizeof(uint));
3381 + bzero(box1->freq[2], ColormaxI * sizeof(uint));
3383 for (r = box1->low[0]; r < box1->high[0]; r++) {
3385 --- Glide3/swlibs/texus/lib/quantize.c.ia64-foo Tue Oct 3 14:31:53 2000
3386 +++ Glide3/swlibs/texus/lib/quantize.c Thu Dec 21 14:27:40 2000
3388 static int errR[MAX_TEXWIDTH], errG[MAX_TEXWIDTH], errB[MAX_TEXWIDTH];
3391 -_txPixQuantize_RGB332( unsigned long argb, int x, int y, int w)
3392 +_txPixQuantize_RGB332( unsigned int argb, int x, int y, int w)
3395 (((argb>>16) & 0xE0) |
3400 -_txPixQuantize_RGB332_D4x4( unsigned long argb, int x, int y, int w)
3401 +_txPixQuantize_RGB332_D4x4( unsigned int argb, int x, int y, int w)
3403 int d = dithmat[y&3][x&3];
3409 -_txPixQuantize_RGB332_DErr( unsigned long argb, int x, int y, int w)
3410 +_txPixQuantize_RGB332_DErr( unsigned int argb, int x, int y, int w)
3412 static unsigned char a3[] = {0x00,0x24,0x49,0x6d,0x92,0xb6,0xdb,0xff};
3413 static unsigned char a2[] = {0x00,0x55,0xaa,0xff};
3414 @@ -120,13 +120,13 @@
3415 /* YIQ422 done elsewhere */
3418 -_txPixQuantize_A8( unsigned long argb, int x, int y, int w)
3419 +_txPixQuantize_A8( unsigned int argb, int x, int y, int w)
3421 return (argb >> 24);
3425 -_txPixQuantize_I8( unsigned long argb, int x, int y, int w)
3426 +_txPixQuantize_I8( unsigned int argb, int x, int y, int w)
3429 ((int) (((argb >>16) & 0xFF) * .30F +
3434 -_txPixQuantize_AI44( unsigned long argb, int x, int y, int w)
3435 +_txPixQuantize_AI44( unsigned int argb, int x, int y, int w)
3438 (int) (( ((argb>>16) & 0xFF) * .30F +
3443 -_txPixQuantize_AI44_D4x4( unsigned long argb, int x, int y, int w)
3444 +_txPixQuantize_AI44_D4x4( unsigned int argb, int x, int y, int w)
3446 int d = dithmat[y&3][x&3];
3452 -_txPixQuantize_AI44_DErr( unsigned long argb, int x, int y, int w)
3453 +_txPixQuantize_AI44_DErr( unsigned int argb, int x, int y, int w)
3461 -_txPixQuantize_ARGB8332 ( unsigned long argb, int x, int y, int w)
3462 +_txPixQuantize_ARGB8332 ( unsigned int argb, int x, int y, int w)
3465 ((argb>>16) & 0xE0) |
3470 -_txPixQuantize_ARGB8332_D4x4( unsigned long argb, int x, int y, int w)
3471 +_txPixQuantize_ARGB8332_D4x4( unsigned int argb, int x, int y, int w)
3473 int d = dithmat[y&3][x&3];
3479 -_txPixQuantize_ARGB8332_DErr( unsigned long argb, int x, int y, int w)
3480 +_txPixQuantize_ARGB8332_DErr( unsigned int argb, int x, int y, int w)
3485 /* AYIQ8422 done elsewhere */
3488 -_txPixQuantize_RGB565( unsigned long argb, int x, int y, int w)
3489 +_txPixQuantize_RGB565( unsigned int argb, int x, int y, int w)
3492 ((argb >> 8) & 0xF800) |
3497 -_txPixQuantize_RGB565_D4x4 ( unsigned long argb, int x, int y, int w)
3498 +_txPixQuantize_RGB565_D4x4 ( unsigned int argb, int x, int y, int w)
3500 int d = dithmat[y&3][x&3];
3506 -_txPixQuantize_RGB565_DErr ( unsigned long argb, int x, int y, int w)
3507 +_txPixQuantize_RGB565_DErr ( unsigned int argb, int x, int y, int w)
3509 static int qr, qg, qb; // quantized incoming values.
3510 int ir, ig, ib; // incoming values.
3515 -_txPixQuantize_ARGB1555( unsigned long argb, int x, int y, int w)
3516 +_txPixQuantize_ARGB1555( unsigned int argb, int x, int y, int w)
3519 ((argb >> 9) & 0x7C00) |
3524 -_txPixQuantize_ARGB1555_D4x4 ( unsigned long argb, int x, int y, int w)
3525 +_txPixQuantize_ARGB1555_D4x4 ( unsigned int argb, int x, int y, int w)
3527 int d = dithmat[y&3][x&3];
3533 -_txPixQuantize_ARGB1555_DErr ( unsigned long argb, int x, int y, int w)
3534 +_txPixQuantize_ARGB1555_DErr ( unsigned int argb, int x, int y, int w)
3536 static int qr, qg, qb; // quantized incoming values.
3537 int ir, ig, ib; // incoming values.
3542 -_txPixQuantize_ARGB4444 (unsigned long argb, int x, int y, int w)
3543 +_txPixQuantize_ARGB4444 (unsigned int argb, int x, int y, int w)
3546 ((argb >> 12) & 0x0F00) |
3551 -_txPixQuantize_ARGB4444_D4x4 (unsigned long argb, int x, int y, int w)
3552 +_txPixQuantize_ARGB4444_D4x4 (unsigned int argb, int x, int y, int w)
3554 int d = dithmat[y&3][x&3];
3560 -_txPixQuantize_ARGB4444_DErr (unsigned long argb, int x, int y, int w)
3561 +_txPixQuantize_ARGB4444_DErr (unsigned int argb, int x, int y, int w)
3563 static int qr, qg, qb; // quantized incoming values.
3564 int ir, ig, ib; // incoming values.
3569 -_txPixQuantize_AI88( unsigned long argb, int x, int y, int w)
3570 +_txPixQuantize_AI88( unsigned int argb, int x, int y, int w)
3573 (((int) (((argb >>16) & 0xFF) * .30F +
3576 _txImgQuantize(char *dst, char *src, int w, int h, FxU32 format, FxU32 dither)
3578 - int (*quantizer)(unsigned long argb, int x, int y, int w) = NULL;
3579 + int (*quantizer)(unsigned int argb, int x, int y, int w) = NULL;
3582 dither &= TX_DITHER_MASK;
3585 for (y=0; y<h; y++) {
3586 for (x=0; x<w; x++) {
3587 - *dst++ = (*quantizer)(*(unsigned long *)src, x, y, w);
3588 + *dst++ = (*quantizer)(*(unsigned int *)src, x, y, w);
3594 for (y=0; y<h; y++) {
3595 for (x=0; x<w; x++) {
3596 - *dst16++ = (*quantizer)(*(unsigned long *)src, x, y, w);
3597 + *dst16++ = (*quantizer)(*(unsigned int *)src, x, y, w);
3601 --- Glide3/swlibs/texus/lib/rgt.c.ia64-foo Wed Jun 14 20:11:40 2000
3602 +++ Glide3/swlibs/texus/lib/rgt.c Thu Dec 21 14:27:40 2000
3607 -static void swapShorts(unsigned short *array, long length)
3608 +static void swapShorts(unsigned short *array, int length)
3616 -static void swapLongs(unsigned int *array, long length)
3617 +static void swapLongs(unsigned int *array, int length)
3624 // just swap RGB into BGR (leave MSB undefined)
3625 -static void swapRGB(unsigned int *array, long length)
3626 +static void swapRGB(unsigned int *array, int length)
3634 - swapRGB((unsigned int *)data32, (long)info->width);
3635 + swapRGB((unsigned int *)data32, (int)info->width);
3639 --- Glide3/swlibs/texus/lib/texus.h.ia64-foo Wed Jun 14 20:11:40 2000
3640 +++ Glide3/swlibs/texus/lib/texus.h Thu Dec 21 14:27:40 2000
3642 typedef unsigned char FxU8;
3643 typedef unsigned short FxU16;
3644 typedef short FxI16;
3646 +typedef unsigned int FxU32;
3649 typedef unsigned long FxU32;
3655 --- Glide3/swlibs/texus/lib/texusint.h.ia64-foo Wed Jun 14 20:11:40 2000
3656 +++ Glide3/swlibs/texus/lib/texusint.h Thu Dec 21 14:27:40 2000
3658 int txAspectRatio(int w, int h);
3659 void txPanic(char *);
3660 void txError(char *);
3661 -void txYABtoPal256(long *palette, const long* yabTable);
3662 +void txYABtoPal256(int *palette, const int* yabTable);
3663 void txRectCopy(FxU8 *dst, int dstStride, const FxU8 *src, int srcStride,
3664 int width, int height);
3665 FxBool txMipAlloc(TxMip *txMip);
3668 void txDiffuseIndex(TxMip *pxMip, TxMip *txMip, int pixsize,
3669 const FxU32 *palette, int ncolors);
3670 -int txNearestColor(long ir, long ig, long ib, const FxU32 *pal, int npal);
3671 +int txNearestColor(int ir, int ig, int ib, const FxU32 *pal, int npal);
3673 FxBool _txReadTGAHeader( FILE *stream, FxU32 cookie, TxMip *info);
3674 FxBool _txReadTGAData( FILE *stream, TxMip *info);
3675 --- Glide3/swlibs/texus/lib/util.c.ia64-foo Wed Jun 14 20:11:40 2000
3676 +++ Glide3/swlibs/texus/lib/util.c Thu Dec 21 14:27:40 2000
3677 @@ -133,14 +133,14 @@
3681 -txYABtoPal256(long *palette, const long* yabTable)
3682 +txYABtoPal256(int *palette, const int* yabTable)
3684 // Convert YAB table to a 256 color palette
3685 // Assume yabTable[] has first 16Y's, 12 A's, 12 B's
3687 - const long *Y = yabTable;
3688 - const long *A = yabTable + 16;
3689 - const long *B = yabTable + 16 + 12;
3690 + const int *Y = yabTable;
3691 + const int *A = yabTable + 16;
3692 + const int *B = yabTable + 16 + 12;
3695 for (i=0; i<256; i++) {
3697 int *explode3 = &_explode3[255];
3700 -txNearestColor(long ir, long ig, long ib, const FxU32 *pal, int ncolors)
3701 +txNearestColor(int ir, int ig, int ib, const FxU32 *pal, int ncolors)
3704 int mindist, minpos; // closest distance to input
3705 --- Glide3/swlibs/texus2/cmd/makefile.autoconf.am.ia64-foo Mon Aug 7 11:24:44 2000
3706 +++ Glide3/swlibs/texus2/cmd/makefile.autoconf.am Thu Dec 21 14:27:40 2000
3708 noinst_PROGRAMS = texus
3709 texus_SOURCES = cmd.c
3710 texus_LDADD = $(top_builddir)/swlibs/fxmisc/libfxmisc.la \
3711 - $(top_builddir)/swlibs/texus2/lib/libtexus.la
3712 + $(top_builddir)/swlibs/texus2/lib/libtexus.la -lm
3714 --- Glide3/set-for-dri.ia64-foo Thu Dec 21 14:27:40 2000
3715 +++ Glide3/set-for-dri Thu Dec 21 14:27:40 2000
3717 +for n in ./h3/glide3/src/gglide.c ./h3/glide3/src/glfb.c ./h3/glide3/src/gsst.c ./h3/minihwc/linhwc.c
3719 + rn=$(basename $n).dri
3720 + echo ln -sf $rn $n
3724 --- Glide3/set-for-standalone.ia64-foo Thu Dec 21 14:27:40 2000
3725 +++ Glide3/set-for-standalone Thu Dec 21 14:27:40 2000
3727 +for n in ./h3/glide3/src/gglide.c ./h3/glide3/src/glfb.c ./h3/glide3/src/gsst.c ./h3/minihwc/linhwc.c
3729 + rn=$(basename $n).save
3730 + echo ln -sf $rn $n
3734 --- Glide3/configure.in.ia64-foo Thu Dec 21 14:39:25 2000
3735 +++ Glide3/configure.in Thu Dec 21 16:41:57 2000
3736 @@ -171,7 +171,12 @@
3737 GLIDE_SANITY_SIZE=false
3739 FX_GLIDE_HW_CULL=false
3740 -FX_GLIDE_CTRISETUP=false
3741 +ARCH=`uname -m | sed "s|[456]86|386|g"`
3742 +if test "$ARCH" = "i386" ; then
3743 + FX_GLIDE_CTRISETUP=false
3745 + FX_GLIDE_CTRISETUP=true
3747 # Next, we read some configuration options
3748 # statically. This is to avoid creating a bunch of
3749 # not-terribly-useful --enable options.