Author: jwrdegoede
Update of /cvs/extras/rpms/Glide3/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15961
Modified Files:
Glide3-fixes.patch Glide3-gcc4.patch Glide3.spec
glide-ia64.patch
Added Files:
Glide3-64bit.patch
Log Message:
- Removed unnescearry makefile mods from Glide3-gcc4.patch. The option
I added disabled another warning then the one I was trying to get disabled.
- Replaced glide-ia64.patch with Glide-64bit.patch this patch adds support
for x86_64 and has lots of "long" replaced with "unsigned long" so that
the code stays 100% the same on i386.
- Made the use of the new 64bit patch unconditional (iow for all archs).
- Fixed Glide3-fixes.patch so that compilation with the 64bit patch applied
actually works.
- Don't build support for voodoo2 / cvg on 64 bit archs since the 64bit patch
only adds 64bit support for voodoo3 & 5 / h3 & h5.
Glide3-64bit.patch:
--- NEW FILE Glide3-64bit.patch ---
--- /dev/null 2005-04-30 08:31:53.801011088 +0200
+++ Glide3/set-for-dri 2005-04-30 10:15:04.420741976 +0200
@@ -0,0 +1,7 @@
+for n in ./h3/glide3/src/gglide.c ./h3/glide3/src/glfb.c ./h3/glide3/src/gsst.c ./h3/minihwc/linhwc.c
+do
+ rn=$(basename $n).dri
+ echo ln -sf $rn $n
+ ln -sf $rn $n
+done
+
--- Glide3/h3/minihwc/linhwc.c.save.64bit 2000-03-20 22:42:57.000000000 +0100
+++ Glide3/h3/minihwc/linhwc.c.save 2005-04-30 10:15:04.312758392 +0200
@@ -64,7 +64,13 @@
#include <X11/extensions/xf86vmode.h>
static FxU32 fenceVar;
-#define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
+#ifdef __ia64__
+# define P6FENCE asm volatile ("mf.a" ::: "memory");
+#elif defined(__alpha__)
+# define P6FENCE asm volatile("mb" ::: "memory");
+#else
+# define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
+#endif
#define MAXFIFOSIZE 0x40000
#define MAXFIFOSIZE_16MB 0xff000
@@ -114,7 +120,7 @@
char data[128];
char *env, *val;
envitem *item;
- int first=1;
+ int is_first=1;
if (envinit) return;
envinit=1;
@@ -126,9 +132,9 @@
if (*data=='\n') continue;
val=strchr(data, '=');
if (!val) {
- if (first) {
+ if (is_first) {
fprintf(stderr, "In config file /etc/conf.3dfx/voodoo3:\n");
- first=0;
+ is_first=0;
}
fprintf(stderr, "Malformed line: %s\n", data);
continue;
@@ -269,7 +275,7 @@
for (bAddr = 0; bAddr < HWC_NUM_BASE_ADDR; bAddr++) {
if ((bAddrMask >> bAddr) & 0x1) {
- bInfo->linearInfo.linearAddress[bAddr] = (FxU32)
+ bInfo->linearInfo.linearAddress[bAddr] = (unsigned long)
pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
0x2000000, &bInfo->deviceNum, bInfo->boardNum, bAddr);
}
--- Glide3/h3/minihwc/minihwc.h.64bit 1999-11-24 22:45:07.000000000 +0100
+++ Glide3/h3/minihwc/minihwc.h 2005-04-30 10:15:04.318757480 +0200
@@ -238,22 +238,21 @@
typedef struct hwcLinearInfo_s {
FxBool
initialized;
- FxU32
- linearAddress[HWC_NUM_BASE_ADDR];
+ unsigned long linearAddress[HWC_NUM_BASE_ADDR];
} hwcLinearInfo;
typedef struct hwcRegInfo_s {
FxBool
initialized;
- volatile FxU32
- ioMemBase, /* mem base for I/O aliases */
- cmdAGPBase, /* CMD/AGP register base */
- waxBase, /* 2D register base */
- sstBase, /* 3D register base */
- lfbBase, /* 3D lfb base */
- rawLfbBase; /* Raw LFB base (base address 1) */
+ volatile unsigned long
+ ioMemBase, /* mem base for I/O aliases */
+ cmdAGPBase, /* CMD/AGP register base */
+ waxBase, /* 2D register base */
+ sstBase, /* 3D register base */
+ lfbBase, /* 3D lfb base */
+ rawLfbBase; /* Raw LFB base (base address 1) */
#if __POWERPC__
- ioPortBase; /* PPC does I/O via a 32-bit address */
+ FxU32 ioPortBase; /* PPC does I/O via a 32-bit address */
#else
volatile FxU16
ioPortBase, /* I/O base address */
--- Glide3/h3/minihwc/hwcext.h.64bit 1999-11-24 22:45:04.000000000 +0100
+++ Glide3/h3/minihwc/hwcext.h 2005-04-30 10:15:04.308759000 +0200
@@ -192,9 +192,8 @@
/* Returned from HWCEXT_GETLINEARADDR */
typedef struct hwcExtLinearAddrRes_s {
- FxU32
- numBaseAddrs, /* # base addresses */
- baseAddresses[HWCEXT_MAX_BASEADDR]; /* linear Addresses */
+ FxU32 numBaseAddrs; /* # base addresses */
+ unsigned long baseAddresses[HWCEXT_MAX_BASEADDR]; /* linear Addresses */
} hwcExtLinearAddrRes_t;
/*
--- Glide3/h3/minihwc/linhwc.c.dri.64bit 2000-10-27 12:27:27.000000000 +0200
+++ Glide3/h3/minihwc/linhwc.c.dri 2005-04-30 10:15:04.310758696 +0200
@@ -67,7 +67,13 @@
#include "lindri.h"
static FxU32 fenceVar;
-#define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
+#ifdef __ia64__
+# define P6FENCE asm volatile("mf.a" ::: "memory");
+#elif defined(__alpha__)
+# define P6FENCE asm volatile("mb" ::: "memory");
+#else
+# define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
+#endif
#define MAXFIFOSIZE 0x40000
#define FIFOPAD 0x0000
@@ -142,7 +148,7 @@
char data[128];
char *env, *val;
envitem *item;
- int first=1;
+ int is_first=1;
if (envinit) return;
envinit=1;
@@ -154,9 +160,9 @@
if (*data=='\n') continue;
val=strchr(data, '=');
if (!val) {
- if (first) {
+ if (is_first) {
fprintf(stderr, "In config file /etc/conf.3dfx/voodoo3:\n");
- first=0;
+ is_first=0;
}
fprintf(stderr, "Malformed line: %s\n", data);
continue;
@@ -229,8 +235,8 @@
}
bInfo->linearInfo.initialized = FXTRUE;
- bInfo->linearInfo.linearAddress[0]=(FxU32)driInfo.pRegs;
- bInfo->linearInfo.linearAddress[1]=(FxU32)driInfo.pFB;
+ bInfo->linearInfo.linearAddress[0]=(unsigned long)driInfo.pRegs;
+ bInfo->linearInfo.linearAddress[1]=(unsigned long)driInfo.pFB;
return FXTRUE;
}
@@ -829,6 +835,10 @@
#undef FN_NAME
} /* hwcResolutionSupported */
+extern void _grImportFifo (int, int);
+extern void _grInvalidateAll (void);
+extern void _grExportFifo (int *, int *);
+
void grDRIImportFifo(int fifoPtr, int fifoRead)
{
_grImportFifo(fifoPtr, fifoRead);
@@ -840,5 +850,5 @@
void grDRIResetSAREA()
{
- _grExportFifo(driInfo.fifoPtr, driInfo.fifoRead);
+ _grExportFifo((int *) driInfo.fifoPtr, (int *) driInfo.fifoRead);
}
--- Glide3/h3/minihwc/minihwc.c.64bit 1999-11-24 22:45:07.000000000 +0100
+++ Glide3/h3/minihwc/minihwc.c 2005-04-30 10:15:04.316757784 +0200
@@ -1078,7 +1078,7 @@
for (bAddr = 0; bAddr < 2; bAddr++) {
if ((bAddrMask & (0x01UL << bAddr)) != 0x00UL) {
bInfo->linearInfo.linearAddress[bAddr] =
- (FxU32)pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
+ pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
0x1000000, &bInfo->deviceNum, bInfo->boardNum, bAddr);
}
}
@@ -1087,13 +1087,13 @@
* unconditionally
*/
bInfo->linearInfo.linearAddress[2] =
- (FxU32)pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
+ pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
0x1000000, &bInfo->deviceNum, bInfo->boardNum, 2);
/* Does the caller want the rom bios? */
if ((bAddrMask & 0x08UL) != 0x00UL) {
bInfo->linearInfo.linearAddress[3] =
- (FxU32)pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
+ pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
0x1000000, &bInfo->deviceNum, bInfo->boardNum, 3);
}
}
[...3353 lines suppressed...]
}
else {
--- Glide3/swlibs/texus/lib/rgt.c.64bit 2000-06-15 02:11:40.000000000 +0200
+++ Glide3/swlibs/texus/lib/rgt.c 2005-04-30 10:15:04.413743040 +0200
@@ -52,7 +52,7 @@
-static void swapShorts(unsigned short *array, long length)
+static void swapShorts(unsigned short *array, int length)
{
unsigned short s;
while (length--) {
@@ -61,7 +61,7 @@
}
}
-static void swapLongs(unsigned int *array, long length)
+static void swapLongs(unsigned int *array, int length)
{
unsigned int s;
while (length--) {
@@ -72,7 +72,7 @@
}
// just swap RGB into BGR (leave MSB undefined)
-static void swapRGB(unsigned int *array, long length)
+static void swapRGB(unsigned int *array, int length)
{
unsigned int s;
while (length--) {
@@ -164,7 +164,7 @@
#if 1
if (swap) {
- swapRGB((unsigned int *)data32, (long)info->width);
+ swapRGB((unsigned int *)data32, (int)info->width);
}
#endif
--- Glide3/swlibs/texus/lib/ncc.c.64bit 2000-10-03 20:31:53.000000000 +0200
+++ Glide3/swlibs/texus/lib/ncc.c 2005-04-30 10:15:04.404744408 +0200
@@ -124,7 +124,7 @@
}
static void
-_txImgNcc(char *odata, unsigned long *idata, int w, int h, int format,
+_txImgNcc(char *odata, unsigned int *idata, int w, int h, int format,
int dither)
{
int (*quantizer)(unsigned long argb, int x, int y, int w);
@@ -308,7 +308,7 @@
if ((dither & TX_DITHER_MASK) == TX_DITHER_ERR) {
- txYABtoPal256((long *)pxMip->pal, (long *) &ncc.y[0]);
+ txYABtoPal256(pxMip->pal, &ncc.y[0]);
txDiffuseIndex(pxMip, txMip, pixsize, pxMip->pal, 256);
}
else {
--- Glide3/swlibs/texus/lib/dequant.c.64bit 2000-06-15 02:11:40.000000000 +0200
+++ Glide3/swlibs/texus/lib/dequant.c 2005-04-30 10:15:04.401744864 +0200
@@ -160,12 +160,12 @@
}
static void
-_txImgDequantizeYIQ422(FxU32 *out, FxU8 *in, int w, int h, const long *yabTable)
+_txImgDequantizeYIQ422(FxU32 *out, FxU8 *in, int w, int h, const FxU32 *yabTable)
{
int n = w * h;
FxU32 pal[256];
- txYABtoPal256((long *)pal, (long *)yabTable);
+ txYABtoPal256(pal, yabTable);
out += n;
in += n;
while (n--) *--out = pal[*--in] | 0xff000000;
@@ -223,10 +223,10 @@
}
static void
-_txImgDequantizeAYIQ8422(FxU32 *out, FxU16 *in, int w, int h, const long *yab)
+_txImgDequantizeAYIQ8422(FxU32 *out, FxU16 *in, int w, int h, const FxU32 *yab)
{
int n = w * h;
- long pal[256];
+ FxU32 pal[256];
txYABtoPal256(pal, yab);
out += n;
@@ -348,7 +348,7 @@
case GR_TEXFMT_RGB_332: _txImgDequantizeRGB332(dst, src, w, h);
break;
case GR_TEXFMT_YIQ_422: _txImgDequantizeYIQ422(dst, src, w, h,
- (long *)pxMip->pal); break;
+ pxMip->pal); break;
case GR_TEXFMT_A_8: _txImgDequantizeA8(dst, src, w, h);
break;
case GR_TEXFMT_I_8: _txImgDequantizeI8(dst, src, w, h);
@@ -361,7 +361,7 @@
case GR_TEXFMT_ARGB_8332: _txImgDequantizeARGB8332(dst, src, w, h);
break;
case GR_TEXFMT_AYIQ_8422: _txImgDequantizeAYIQ8422(dst, src, w, h,
- (long *)pxMip->pal); break;
+ pxMip->pal); break;
case GR_TEXFMT_RGB_565: _txImgDequantizeRGB565(dst, src, w, h);
break;
case GR_TEXFMT_ARGB_1555: _txImgDequantizeARGB1555(dst, src, w, h);
--- Glide3/swlibs/texus2/cmd/makefile.autoconf.am.64bit 2000-08-07 17:24:44.000000000 +0200
+++ Glide3/swlibs/texus2/cmd/makefile.autoconf.am 2005-04-30 10:15:04.419742128 +0200
@@ -24,5 +24,5 @@
noinst_PROGRAMS = texus
texus_SOURCES = cmd.c
texus_LDADD = $(top_builddir)/swlibs/fxmisc/libfxmisc.la \
- $(top_builddir)/swlibs/texus2/lib/libtexus.la
+ $(top_builddir)/swlibs/texus2/lib/libtexus.la -lm
--- Glide3/swlibs/fxmisc/fximg.c.64bit 2000-10-03 20:31:53.000000000 +0200
+++ Glide3/swlibs/fxmisc/fximg.c 2005-04-30 10:15:04.392746232 +0200
@@ -1948,7 +1948,7 @@
if (prefix) { // if there's a path prefix
char buf[1024], *p;
strcpy(buf,prefix); // copy and replace semicolon
- if ((p = strchr(buf,';'))) *p = '\0';
+ if ((p = strchr(buf,';')) != NULL) *p = '\0';
fprintf(stderr,buf);
fprintf(stderr,"/");
}
--- Glide3/swlibs/fxmisc/fxos.c.64bit 2000-10-03 20:31:53.000000000 +0200
+++ Glide3/swlibs/fxmisc/fxos.c 2005-04-30 10:15:04.393746080 +0200
@@ -98,7 +98,7 @@
// first try and open up the file in the current directory
if (pprefix) *pprefix = NULL;
- if ((file = fopen(filename,mode)))
+ if ((file = fopen(filename,mode)) != NULL)
return file;
if (path == NULL)
return NULL;
@@ -115,7 +115,7 @@
strcat(nameWithPath,"/"); // add directory separator
strcat(nameWithPath,filename); // add filename
if (pprefix) *pprefix = path; // save the prefix
- if ((file = fopen(nameWithPath,mode)))
+ if ((file = fopen(nameWithPath,mode)) != NULL)
return file;
path = psemi; // advance to next path element
if (path)
--- Glide3/cvg/init/sst1init.h.64bit 2005-04-30 10:15:20.011371840 +0200
+++ Glide3/cvg/init/sst1init.h 2005-04-30 10:20:06.491820192 +0200
@@ -146,9 +146,13 @@
# define P6FENCE {_asm xchg eax, p6FenceVar}
#elif defined(macintosh) && __POWERPC__ && defined(__MWERKS__)
# define P6FENCE __eieio()
-#elif defined (__GNUC__) && defined(__i386__)
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
# define P6FENCE asm("xchg %%eax,%0" : /*outputs*/ : "m" (p6FenceVar) : \
"eax");
+#elif defined(__GNUC__) && defined(__ia64__)
+# define P6FENCE asm volatile ("mf.a" ::: "memory");
+#elif defined(__GNUC__) && defined(__alpha__)
+# define P6FENCE asm volatile("mb" ::: "memory");
#else
# error "P6 Fencing in-line assembler code needs to be added for this compiler"
#endif
--- Glide3/cvg/glide3/src/fxglide.h.64bit 2005-04-30 10:15:53.048349456 +0200
+++ Glide3/cvg/glide3/src/fxglide.h 2005-04-30 10:19:34.853629928 +0200
@@ -412,6 +412,13 @@
#define P6FENCE p6Fence()
#elif defined(__MSC__)
#define P6FENCE {_asm xchg eax, p6FenceVar}
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+# define P6FENCE asm("xchg %%eax,%0" : /*outputs*/ : "m" (p6FenceVar) : \
+ "eax");
+#elif defined(__GNUC__) && defined(__ia64__)
+# define P6FENCE asm volatile ("mf.a" ::: "memory");
+#elif defined(__GNUC__) && defined(__alpha__)
+# define P6FENCE asm volatile("mb" ::: "memory");
#else
#error "P6 Fencing in-line assembler code needs to be added for this compiler"
#endif /* Compiler specific fence commands */
--- Glide3/cvg/glide3/src/makefile.linux.64bit 2000-07-12 23:33:31.000000000 +0200
+++ Glide3/cvg/glide3/src/makefile.linux 2005-04-30 10:15:04.247768272 +0200
@@ -19,10 +19,16 @@
TAG_REGEXP = $(BUILD_ROOT)/$(FX_GLIDE_HW)/$(FX_HW_PROJECTS)/src/glide.rx
+ARCH := $(patsubst sparc64,sparc,$(patsubst i%86,i386,$(shell uname -m)))
+
# Compile for specific hardware
ifeq ($(FX_GLIDE_HW),cvg)
FX_GLIDE_REAL_HW= 1
+ifeq (i386,$(ARCH))
FX_GLIDE_CTRISETUP = 0
+else
+FX_GLIDE_CTRISETUP = 1
+endif
HWSPEC = fifo.c
LCDEFS += -DCVG \
Glide3-fixes.patch:
Index: Glide3-fixes.patch
===================================================================
RCS file: /cvs/extras/rpms/Glide3/devel/Glide3-fixes.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Glide3-fixes.patch 28 Apr 2005 18:39:19 -0000 1.1
+++ Glide3-fixes.patch 30 Apr 2005 10:18:56 -0000 1.2
@@ -492,7 +492,7 @@
char *env;
--- Glide3/h5/glide3/src/makefile.autoconf.am.fix 2004-09-04 11:53:34.000000000 +0200
+++ Glide3/h5/glide3/src/makefile.autoconf.am 2004-09-04 11:53:34.000000000 +0200
-@@ -152,42 +152,32 @@
+@@ -152,41 +152,35 @@
#
# Special rules for assembly files.
#
@@ -533,14 +533,14 @@
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ $*.tmp.s
$(RM) -f $*.tmp.s
--cpudtect.o cpudtect.lo: cpudtect.s
-- $(PREPROCESSOR) -DUSE_PACKET_FIFO=1 $< > $*.tmp.s
+ cpudtect.o cpudtect.lo: cpudtect.s
+ $(PREPROCESSOR) -DUSE_PACKET_FIFO=1 $< > $*.tmp.s
- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
- $(CP) $*.o $*.lo
-- $(RM) -f $*.tmp.s
++ libtool --mode=compile $(CC) -I. $(AFLAGS) -c -o $@ $*.tmp.s
+ $(RM) -f $*.tmp.s
#
- # Library definitions.
@@ -196,7 +186,7 @@
FX_GLIDE_CTRISETUP_SRC = gxdraw.c
else
Glide3-gcc4.patch:
Index: Glide3-gcc4.patch
===================================================================
RCS file: /cvs/extras/rpms/Glide3/devel/Glide3-gcc4.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Glide3-gcc4.patch 28 Apr 2005 18:39:19 -0000 1.1
+++ Glide3-gcc4.patch 30 Apr 2005 10:18:56 -0000 1.2
@@ -1,78 +1,6 @@
---- Glide3/cvg/glide3/src/gdraw.c.gcc4 1999-12-07 22:42:32.000000000 +0100
-+++ Glide3/cvg/glide3/src/gdraw.c 2005-04-27 11:32:14.000000000 +0200
-@@ -457,7 +457,7 @@
- vPtr = pointers;
- if (mode) vPtr = *(float **)vPtr;
-
-- (float *)pointers += stride;
-+ pointers = (float *)pointers + stride;
-
- GDBG_INFO_MORE(gc->myLevel, "(%f %f)\n",
- FARRAY(vPtr,gc->state.vData.vertexInfo.offset),
-@@ -546,7 +546,7 @@
- if (mode)
- vPtr = *(float **)vPtr;
- oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset);
-- (float *)pointers += stride;
-+ pointers = (float *)pointers + stride;
-
- {
- FxU32 x, y;
-@@ -666,9 +666,9 @@
- a = *(float **)a;
- b = *(float **)b;
- }
-- (float *)pointers += stride;
-+ pointers = (float *)pointers + stride;
- if (ltype == GR_LINES)
-- (float *)pointers += stride;
-+ pointers = (float *)pointers + stride;
-
- /*
- ** compute absolute deltas and draw from low Y to high Y
-@@ -828,10 +828,10 @@
- a = *(float **)a;
- b = *(float **)b;
- }
-- (float *)pointers += stride;
-+ pointers = (float *)pointers + stride;
- owa = oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
- owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
-- (float *)pointers += stride;
-+ pointers = (float *)pointers + stride;
- }
- else {
- owa = oowa = oowb;
-@@ -841,7 +841,7 @@
- a = *(float **)a;
- b = *(float **)b;
- }
-- (float *)pointers += stride;
-+ pointers = (float *)pointers + stride;
- owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
- }
- fay = tmp1 = FARRAY(a, gc->state.vData.vertexInfo.offset+4)
-@@ -1011,7 +1011,7 @@
- vPtr = pointers;
- if (mode)
- vPtr = *(float **)vPtr;
-- (float *)pointers += stride;
-+ pointers = (float *)pointers + stride;
-
- i = gc->tsuDataList[dataElem];
-
-@@ -1051,7 +1051,7 @@
- *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
- TRI_SETF(FARRAY(vPtr, 4)
- *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
-- (float *)pointers += stride;
-+ pointers = (float *)pointers + stride;
-
- TRI_VP_SETFS(vPtr,oow);
- }
---- Glide3/cvg/glide3/src/gaa.c.gcc4 1999-12-07 22:42:32.000000000 +0100
-+++ Glide3/cvg/glide3/src/gaa.c 2005-04-27 11:32:14.000000000 +0200
-@@ -572,7 +572,7 @@
+--- Glide3/h3/glide3/src/gaa.c.gcc4 2005-04-30 11:50:06.921830040 +0200
++++ Glide3/h3/glide3/src/gaa.c 2005-04-30 11:50:07.041811800 +0200
+@@ -614,7 +614,7 @@
e = pointers;
if (mode)
e = *(float **)e;
@@ -81,7 +9,7 @@
ptX = FARRAY(e, gc->state.vData.vertexInfo.offset);
ptY = FARRAY(e, gc->state.vData.vertexInfo.offset+4);
-@@ -673,7 +673,7 @@
+@@ -715,7 +715,7 @@
if (mode)
e = *(float **)e;
oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset);
@@ -90,7 +18,7 @@
ptX = FARRAY(e, gc->state.vData.vertexInfo.offset)
*oow*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
-@@ -790,9 +790,9 @@
+@@ -837,9 +837,9 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
@@ -102,7 +30,7 @@
/* draw from low Y to high Y */
if (FARRAY(v2, gc->state.vData.vertexInfo.offset+4) < FARRAY(v1, gc->state.vData.vertexInfo.offset+4)) {
-@@ -966,9 +966,9 @@
+@@ -1018,9 +1018,9 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
@@ -114,7 +42,7 @@
owa = oowa = 1.0f / FARRAY(v1, gc->state.vData.wInfo.offset);
owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
}
-@@ -980,7 +980,7 @@
+@@ -1032,7 +1032,7 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
@@ -123,7 +51,7 @@
owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
}
-@@ -1304,7 +1304,7 @@
+@@ -1366,7 +1366,7 @@
b = *(float **)b;
c = *(float **)c;
}
@@ -132,7 +60,7 @@
/* move culling test to here */
{
-@@ -1612,7 +1612,7 @@
+@@ -1540,7 +1540,7 @@
b = *(float **)b;
c = *(float **)c;
}
@@ -141,7 +69,7 @@
oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
oowc = 1.0f / FARRAY(c, gc->state.vData.wInfo.offset);
-@@ -1777,7 +1777,7 @@
+@@ -1705,7 +1705,7 @@
if (type == kSetupFan) {
v[0] = (mode == 0) ? pointers : *(float **)pointers;
while (sCount--) {
@@ -150,7 +78,7 @@
if (mode) {
v[1] = *(float **)pointers;
v[2] = *((float **)pointers+1);
-@@ -1819,7 +1819,7 @@
+@@ -1747,7 +1747,7 @@
_grAADrawTriangles(1, type, 3, v);
else
_grAAVpDrawTriangles(1, type, 3, v);
@@ -159,9 +87,20 @@
flip = ~flip;
}
flip = ~flip;
---- Glide3/h3/glide3/src/gdraw.c.gcc4 2000-02-15 23:35:58.000000000 +0100
-+++ Glide3/h3/glide3/src/gdraw.c 2005-04-27 11:32:14.000000000 +0200
-@@ -399,7 +399,7 @@
+--- Glide3/h3/glide3/src/distrip.c.gcc4 2005-04-30 11:50:06.919830344 +0200
++++ Glide3/h3/glide3/src/distrip.c 2005-04-30 11:50:07.042811648 +0200
+@@ -450,7 +450,7 @@
+ else {
+ while ((int)Count >= 3) {
+ grDrawTriangle(*(float **)pointers, *((float **)pointers+1), *((float **)pointers+2));
+- (float *)pointers += 3;
++ pointers = (float *)pointers + 3;
+ Count -= 3;
+ }
+ }
+--- Glide3/h3/glide3/src/gdraw.c.gcc4 2005-04-30 11:50:06.923829736 +0200
++++ Glide3/h3/glide3/src/gdraw.c 2005-04-30 11:50:07.043811496 +0200
+@@ -403,7 +403,7 @@
vPtr = pointers;
if (mode) vPtr = *(float **)vPtr;
@@ -170,7 +109,7 @@
GDBG_INFO_MORE(gc->myLevel, "(%f %f)\n",
FARRAY(vPtr,gc->state.vData.vertexInfo.offset),
-@@ -488,7 +488,7 @@
+@@ -492,7 +492,7 @@
if (mode)
vPtr = *(float **)vPtr;
oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset);
@@ -179,7 +118,7 @@
{
FxU32 x, y;
-@@ -610,9 +610,9 @@
+@@ -617,9 +617,9 @@
a = *(float **)a;
b = *(float **)b;
}
@@ -191,7 +130,7 @@
/*
** compute absolute deltas and draw from low Y to high Y
-@@ -772,10 +772,10 @@
+@@ -779,10 +779,10 @@
a = *(float **)a;
b = *(float **)b;
}
@@ -204,7 +143,7 @@
}
else {
owa = oowa = oowb;
-@@ -785,7 +785,7 @@
+@@ -792,7 +792,7 @@
a = *(float **)a;
b = *(float **)b;
}
@@ -213,7 +152,7 @@
owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
}
fay = tmp1 = FARRAY(a, gc->state.vData.vertexInfo.offset+4)
-@@ -936,7 +936,7 @@
+@@ -944,7 +944,7 @@
vPtr = pointers;
if (mode)
vPtr = *(float **)vPtr;
@@ -222,7 +161,7 @@
i = gc->tsuDataList[dataElem];
-@@ -976,7 +976,7 @@
+@@ -984,7 +984,7 @@
*oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
TRI_SETF(FARRAY(vPtr, 4)
*oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
@@ -231,20 +170,68 @@
TRI_VP_SETFS(vPtr,oow);
}
---- Glide3/h3/glide3/src/distrip.c.gcc4 1999-11-24 22:44:54.000000000 +0100
-+++ Glide3/h3/glide3/src/distrip.c 2005-04-27 11:32:14.000000000 +0200
-@@ -450,7 +450,7 @@
- else {
- while ((int)Count >= 3) {
- grDrawTriangle(*(float **)pointers, *((float **)pointers+1), *((float **)pointers+2));
-- (float *)pointers += 3;
-+ pointers = (float *)pointers + 3;
- Count -= 3;
+--- Glide3/h3/glide3/src/gstrip.c.gcc4 1999-11-24 22:44:57.000000000 +0100
++++ Glide3/h3/glide3/src/gstrip.c 2005-04-30 11:50:07.044811344 +0200
+@@ -188,7 +188,7 @@
+ vPtr = pointers;
+ if (mode)
+ vPtr = *(float **)vPtr;
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_SETF(FARRAY(vPtr, 0));
+ dataElem = 0;
+@@ -228,7 +228,7 @@
+ *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
+ TRI_SETF(FARRAY(vPtr, 4)
+ *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_VP_SETFS(vPtr, oow);
}
- }
---- Glide3/h3/glide3/src/gaa.c.gcc4 1999-11-24 22:44:56.000000000 +0100
-+++ Glide3/h3/glide3/src/gaa.c 2005-04-27 11:32:14.000000000 +0200
-@@ -614,7 +614,7 @@
+--- Glide3/h5/glide3/src/glfb.c.gcc4 2005-04-30 11:50:06.965823352 +0200
++++ Glide3/h5/glide3/src/glfb.c 2005-04-30 11:50:07.045811192 +0200
+@@ -1334,7 +1334,13 @@
+ {
+ /* adjust starting alignment */
+ if (((FxU32)src)&3)
+- *((FxU16 *)dst)++=*((FxU16 *)src)++;
++ {
++ /* Old code: *((FxU16 *)dst)++ = *((FxU16 *)src)++; */
++ FxU16 *p = (FxU16 *)dst;
++ *p = *((FxU16 *)src);
++ dst = (FxU32 *)((FxU16 *)dst + 1);
++ src = (FxU32 *)((FxU16 *)src + 1);
++ }
+
+ /* read in dwords of pixels */
+ if(length)
+@@ -1353,8 +1359,8 @@
+ *((FxU16 *)(((FxU32)dst) + byte_index))=*((FxU16 *)(((FxU32)src) + byte_index));
+ }
+ /* adjust for next line */
+- ((FxU8 *)src)+=src_adjust;
+- ((FxU8 *)dst)+=dst_adjust;
++ src = (FxU32 *)((FxU8 *)src + src_adjust);
++ dst = (FxU32 *)((FxU8 *)dst + dst_adjust);
+ }
+ rv=FXTRUE;
+ /* unlock buffer */
+--- Glide3/h5/glide3/src/fxcmd.h.gcc4 2005-04-30 11:50:06.956824720 +0200
++++ Glide3/h5/glide3/src/fxcmd.h 2005-04-30 11:50:07.047810888 +0200
+@@ -1425,7 +1425,7 @@
+ #define REG_GROUP_SETF_CLAMP(__regBase, __regAddr, __val) \
+ do { \
+ const FxU32 fpClampVal = FP_FLOAT_CLAMP(__val); \
+- REG_GROUP_ASSERT(__regAddr, fpClampVal, FXTRUE); \
++ REG_GROUP_ASSERT(__regAddr, fpClampVal, FXTRUE); \
+ SET(((FxU32*)(__regBase))[offsetof(SstRegs, __regAddr) >> 2], fpClampVal); \
+ GR_INC_SIZE(sizeof(FxU32)); \
+ } while(0)
+--- Glide3/h5/glide3/src/gaa.c.gcc4 2005-04-30 11:50:06.966823200 +0200
++++ Glide3/h5/glide3/src/gaa.c 2005-04-30 11:50:07.049810584 +0200
+@@ -626,7 +626,7 @@
e = pointers;
if (mode)
e = *(float **)e;
@@ -253,7 +240,7 @@
ptX = FARRAY(e, gc->state.vData.vertexInfo.offset);
ptY = FARRAY(e, gc->state.vData.vertexInfo.offset+4);
-@@ -715,7 +715,7 @@
+@@ -727,7 +727,7 @@
if (mode)
e = *(float **)e;
oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset);
@@ -262,7 +249,7 @@
ptX = FARRAY(e, gc->state.vData.vertexInfo.offset)
*oow*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
-@@ -837,9 +837,9 @@
+@@ -851,9 +851,9 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
@@ -274,7 +261,7 @@
/* draw from low Y to high Y */
if (FARRAY(v2, gc->state.vData.vertexInfo.offset+4) < FARRAY(v1, gc->state.vData.vertexInfo.offset+4)) {
-@@ -1018,9 +1018,9 @@
+@@ -1032,9 +1032,9 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
@@ -286,7 +273,7 @@
owa = oowa = 1.0f / FARRAY(v1, gc->state.vData.wInfo.offset);
owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
}
-@@ -1032,7 +1032,7 @@
+@@ -1046,7 +1046,7 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
@@ -295,7 +282,7 @@
owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
}
-@@ -1366,7 +1366,7 @@
+@@ -1384,7 +1384,7 @@
b = *(float **)b;
c = *(float **)c;
}
@@ -304,7 +291,7 @@
/* move culling test to here */
{
-@@ -1540,7 +1540,7 @@
+@@ -1558,7 +1558,7 @@
b = *(float **)b;
c = *(float **)c;
}
@@ -313,7 +300,7 @@
oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
oowc = 1.0f / FARRAY(c, gc->state.vData.wInfo.offset);
-@@ -1705,7 +1705,7 @@
+@@ -1723,7 +1723,7 @@
if (type == kSetupFan) {
v[0] = (mode == 0) ? pointers : *(float **)pointers;
while (sCount--) {
@@ -322,7 +309,7 @@
if (mode) {
v[1] = *(float **)pointers;
v[2] = *((float **)pointers+1);
-@@ -1747,7 +1747,7 @@
+@@ -1765,7 +1765,7 @@
_grAADrawTriangles(1, type, 3, v);
else
_grAAVpDrawTriangles(1, type, 3, v);
@@ -331,9 +318,20 @@
flip = ~flip;
}
flip = ~flip;
---- Glide3/h5/glide3/src/gdraw.c.gcc4 2000-11-16 00:32:53.000000000 +0100
-+++ Glide3/h5/glide3/src/gdraw.c 2005-04-27 11:32:14.000000000 +0200
-@@ -549,7 +549,7 @@
+--- Glide3/h5/glide3/src/distrip.c.gcc4 2005-04-30 11:50:06.963823656 +0200
++++ Glide3/h5/glide3/src/distrip.c 2005-04-30 11:50:07.050810432 +0200
+@@ -458,7 +458,7 @@
+ else {
+ while ((int)Count >= 3) {
+ grDrawTriangle(*(float **)pointers, *((float **)pointers+1), *((float **)pointers+2));
+- (float *)pointers += 3;
++ pointers = (float *)pointers + 3;
+ Count -= 3;
+ }
+ }
+--- Glide3/h5/glide3/src/gdraw.c.gcc4 2005-04-30 11:50:06.973822136 +0200
++++ Glide3/h5/glide3/src/gdraw.c 2005-04-30 11:50:07.052810128 +0200
+@@ -551,7 +551,7 @@
vPtr = pointers;
if (mode) vPtr = *(float **)vPtr;
@@ -342,7 +340,7 @@
GDBG_INFO_MORE(gc->myLevel, "(%f %f)\n",
FARRAY(vPtr,gc->state.vData.vertexInfo.offset),
-@@ -660,7 +660,7 @@
+@@ -662,7 +662,7 @@
if (mode)
vPtr = *(float **)vPtr;
oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset);
@@ -351,7 +349,7 @@
{
float fx, fy;
-@@ -794,9 +794,9 @@
+@@ -799,9 +799,9 @@
a = *(float **)a;
b = *(float **)b;
}
@@ -363,7 +361,7 @@
/*
** compute absolute deltas and draw from low Y to high Y
-@@ -956,10 +956,10 @@
+@@ -961,10 +961,10 @@
a = *(float **)a;
b = *(float **)b;
}
@@ -376,7 +374,7 @@
}
else {
owa = oowa = oowb;
-@@ -969,7 +969,7 @@
+@@ -974,7 +974,7 @@
a = *(float **)a;
b = *(float **)b;
}
@@ -385,7 +383,7 @@
owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
}
fay = tmp1 = FARRAY(a, gc->state.vData.vertexInfo.offset+4)
-@@ -1116,7 +1116,7 @@
+@@ -1122,7 +1122,7 @@
vPtr = pointers;
if (mode)
vPtr = *(float **)vPtr;
@@ -394,7 +392,7 @@
i = gc->tsuDataList[dataElem];
-@@ -1156,7 +1156,7 @@
+@@ -1162,7 +1162,7 @@
*oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
TRI_SETF(FARRAY(vPtr, 4)
*oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
@@ -403,20 +401,29 @@
TRI_VP_SETFS(vPtr,oow);
}
---- Glide3/h5/glide3/src/distrip.c.gcc4 2000-11-16 00:32:52.000000000 +0100
-+++ Glide3/h5/glide3/src/distrip.c 2005-04-27 11:32:14.000000000 +0200
-@@ -458,7 +458,7 @@
- else {
- while ((int)Count >= 3) {
- grDrawTriangle(*(float **)pointers, *((float **)pointers+1), *((float **)pointers+2));
-- (float *)pointers += 3;
-+ pointers = (float *)pointers + 3;
- Count -= 3;
+--- Glide3/h5/glide3/src/gstrip.c.gcc4 2000-11-16 00:32:53.000000000 +0100
++++ Glide3/h5/glide3/src/gstrip.c 2005-04-30 11:50:07.052810128 +0200
+@@ -212,7 +212,7 @@
+ vPtr = pointers;
+ if (mode)
+ vPtr = *(float **)vPtr;
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_SETF(FARRAY(vPtr, 0));
+ dataElem = 0;
+@@ -252,7 +252,7 @@
+ *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
+ TRI_SETF(FARRAY(vPtr, 4)
+ *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_VP_SETFS(vPtr, oow);
}
- }
---- Glide3/h5/glide3/src/gaa.c.gcc4 2000-11-16 00:32:53.000000000 +0100
-+++ Glide3/h5/glide3/src/gaa.c 2005-04-27 11:32:14.000000000 +0200
-@@ -626,7 +626,7 @@
+--- Glide3/cvg/glide3/src/gaa.c.gcc4 1999-12-07 22:42:32.000000000 +0100
++++ Glide3/cvg/glide3/src/gaa.c 2005-04-30 11:50:07.054809824 +0200
+@@ -572,7 +572,7 @@
e = pointers;
if (mode)
e = *(float **)e;
@@ -425,7 +432,7 @@
ptX = FARRAY(e, gc->state.vData.vertexInfo.offset);
ptY = FARRAY(e, gc->state.vData.vertexInfo.offset+4);
-@@ -727,7 +727,7 @@
+@@ -673,7 +673,7 @@
if (mode)
e = *(float **)e;
oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset);
@@ -434,7 +441,7 @@
ptX = FARRAY(e, gc->state.vData.vertexInfo.offset)
*oow*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
-@@ -851,9 +851,9 @@
+@@ -790,9 +790,9 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
@@ -446,7 +453,7 @@
/* draw from low Y to high Y */
if (FARRAY(v2, gc->state.vData.vertexInfo.offset+4) < FARRAY(v1, gc->state.vData.vertexInfo.offset+4)) {
-@@ -1032,9 +1032,9 @@
+@@ -966,9 +966,9 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
@@ -458,7 +465,7 @@
owa = oowa = 1.0f / FARRAY(v1, gc->state.vData.wInfo.offset);
owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
}
-@@ -1046,7 +1046,7 @@
+@@ -980,7 +980,7 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
@@ -467,7 +474,7 @@
owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
}
-@@ -1384,7 +1384,7 @@
+@@ -1304,7 +1304,7 @@
b = *(float **)b;
c = *(float **)c;
}
@@ -476,7 +483,7 @@
/* move culling test to here */
{
-@@ -1558,7 +1558,7 @@
+@@ -1612,7 +1612,7 @@
b = *(float **)b;
c = *(float **)c;
}
@@ -485,7 +492,7 @@
oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
oowc = 1.0f / FARRAY(c, gc->state.vData.wInfo.offset);
-@@ -1723,7 +1723,7 @@
+@@ -1777,7 +1777,7 @@
if (type == kSetupFan) {
v[0] = (mode == 0) ? pointers : *(float **)pointers;
while (sCount--) {
@@ -494,7 +501,7 @@
if (mode) {
v[1] = *(float **)pointers;
v[2] = *((float **)pointers+1);
-@@ -1765,7 +1765,7 @@
+@@ -1819,7 +1819,7 @@
_grAADrawTriangles(1, type, 3, v);
else
_grAAVpDrawTriangles(1, type, 3, v);
@@ -503,75 +510,122 @@
flip = ~flip;
}
flip = ~flip;
---- Glide3/h5/glide3/src/glfb.c.gcc4 2000-11-17 22:31:05.000000000 +0100
-+++ Glide3/h5/glide3/src/glfb.c 2005-04-27 11:32:14.000000000 +0200
-@@ -1334,7 +1334,13 @@
- {
- /* adjust starting alignment */
- if (((FxU32)src)&3)
-- *((FxU16 *)dst)++=*((FxU16 *)src)++;
-+ {
-+ /* Old code: *((FxU16 *)dst)++ = *((FxU16 *)src)++; */
-+ FxU16 *p = (FxU16 *)dst;
-+ *p = *((FxU16 *)src);
-+ dst = (FxU32 *)((FxU16 *)dst + 1);
-+ src = (FxU32 *)((FxU16 *)src + 1);
-+ }
-
- /* read in dwords of pixels */
- if(length)
-@@ -1353,8 +1359,8 @@
- *((FxU16 *)(((FxU32)dst) + byte_index))=*((FxU16 *)(((FxU32)src) + byte_index));
- }
- /* adjust for next line */
-- ((FxU8 *)src)+=src_adjust;
-- ((FxU8 *)dst)+=dst_adjust;
-+ src = (FxU32 *)((FxU8 *)src + src_adjust);
-+ dst = (FxU32 *)((FxU8 *)dst + dst_adjust);
+--- Glide3/cvg/glide3/src/gdraw.c.gcc4 1999-12-07 22:42:32.000000000 +0100
++++ Glide3/cvg/glide3/src/gdraw.c 2005-04-30 11:50:07.055809672 +0200
+@@ -457,7 +457,7 @@
+ vPtr = pointers;
+ if (mode) vPtr = *(float **)vPtr;
+
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ GDBG_INFO_MORE(gc->myLevel, "(%f %f)\n",
+ FARRAY(vPtr,gc->state.vData.vertexInfo.offset),
+@@ -546,7 +546,7 @@
+ if (mode)
+ vPtr = *(float **)vPtr;
+ oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ {
+ FxU32 x, y;
+@@ -666,9 +666,9 @@
+ a = *(float **)a;
+ b = *(float **)b;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ if (ltype == GR_LINES)
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ /*
+ ** compute absolute deltas and draw from low Y to high Y
+@@ -828,10 +828,10 @@
+ a = *(float **)a;
+ b = *(float **)b;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ owa = oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
+ owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ }
+ else {
+ owa = oowa = oowb;
+@@ -841,7 +841,7 @@
+ a = *(float **)a;
+ b = *(float **)b;
+ }
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
+ }
+ fay = tmp1 = FARRAY(a, gc->state.vData.vertexInfo.offset+4)
+@@ -1011,7 +1011,7 @@
+ vPtr = pointers;
+ if (mode)
+ vPtr = *(float **)vPtr;
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ i = gc->tsuDataList[dataElem];
+
+@@ -1051,7 +1051,7 @@
+ *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
+ TRI_SETF(FARRAY(vPtr, 4)
+ *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_VP_SETFS(vPtr,oow);
}
- rv=FXTRUE;
- /* unlock buffer */
---- Glide3/h5/glide3/src/fxcmd.h.gcc4 2000-11-16 00:32:52.000000000 +0100
-+++ Glide3/h5/glide3/src/fxcmd.h 2005-04-27 11:32:14.000000000 +0200
-@@ -1425,7 +1425,7 @@
- #define REG_GROUP_SETF_CLAMP(__regBase, __regAddr, __val) \
- do { \
- const FxU32 fpClampVal = FP_FLOAT_CLAMP(__val); \
-- REG_GROUP_ASSERT(__regAddr, fpClampVal, FXTRUE); \
-+ REG_GROUP_ASSERT(__regAddr, fpClampVal, FXTRUE); \
- SET(((FxU32*)(__regBase))[offsetof(SstRegs, __regAddr) >> 2], fpClampVal); \
- GR_INC_SIZE(sizeof(FxU32)); \
- } while(0)
---- Glide3/swlibs/include/make/3dfx.mak.gcc4 2005-04-27 11:32:14.000000000 +0200
-+++ Glide3/swlibs/include/make/3dfx.mak 2005-04-27 11:32:14.000000000 +0200
-@@ -110,7 +110,7 @@
- DEBUGDEFS = -DGDBG_INFO_ON -DGLIDE_DEBUG
- GCDEFS = -DENDB -DX11
- GCINCS = -I. -I$(BUILD_ROOT_SWLIBS)/include -I$(BUILD_ROOT_HW)/include
--GCOPTS = -Wall -Wno-unknown-pragmas -Wno-unused-value -Wno-unused
-+GCOPTS = -Wall -Wno-unknown-pragmas -Wno-unused-value -Wno-unused -Wno-missing-noreturn
- ifeq "$(FX_GLIDE_PIC)" "1"
- GCOPTS := $(GCOPTS) -fPIC -DPIC
- endif
---- Glide3/swlibs/include/make/3dfx.linux.mak.gcc4 2005-04-27 11:41:10.000000000 +0200
-+++ Glide3/swlibs/include/make/3dfx.linux.mak 2005-04-27 11:41:50.000000000 +0200
-@@ -77,7 +77,7 @@
- DEBUGDEFS = -DGDBG_INFO_ON -DGLIDE_DEBUG
- GCDEFS = -DENDB -DX11
- GCINCS = -I. -I$(BUILD_ROOT_SWLIBS)/include -I$(BUILD_ROOT_HW)/include
--GCOPTS = -Wall -Wno-unknown-pragmas -Wno-unused-value -Wno-unused
-+GCOPTS = -Wall -Wno-unknown-pragmas -Wno-unused-value -Wno-unused -Wno-missing-noreturn
- ifeq "$(FX_GLIDE_PIC)" "1"
- GCPTS := $(GCOPTS) -fPIC -DPIC
- endif
---- Glide3/swlibs/include/make/makefile.autoconf.bottom.gcc4 2005-04-27 11:44:13.000000000 +0200
-+++ Glide3/swlibs/include/make/makefile.autoconf.bottom 2005-04-27 11:44:45.000000000 +0200
-@@ -55,7 +55,7 @@
- GLIDE_DEBUG_GDEFS = -fomit-frame-pointer -funroll-loops \
- -fexpensive-optimizations -ffast-math -DBIG_OPT
- endif
--GCFLAGS = $(GLIDE_DEBUG_GCFLAGS) -Wno-unknown-pragmas -Wno-unused-value -Wno-unused
-+GCFLAGS = $(GLIDE_DEBUG_GCFLAGS) -Wno-unknown-pragmas -Wno-unused-value -Wno-unused -Wno-missing-noreturn
- #
- # Global DEFS
- #
+--- Glide3/cvg/glide3/src/gstrip.c.gcc4 2005-04-30 11:50:39.026949320 +0200
++++ Glide3/cvg/glide3/src/gstrip.c 2005-04-30 11:51:56.072236656 +0200
+@@ -186,7 +186,7 @@
+ vPtr = pointers;
+ if (mode)
+ vPtr = *(float **)vPtr;
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_SETF(FARRAY(vPtr, 0));
+ dataElem = 0;
+@@ -215,7 +215,7 @@
+ vPtr = pointers;
+ if (mode)
+ vPtr = *(float **)vPtr;
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_SETF(FARRAY(vPtr, 0));
+ dataElem = 0;
+@@ -248,7 +248,7 @@
+ vPtr = pointers;
+ if (mode)
+ vPtr = *(float **)vPtr;
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_SETF(FARRAY(vPtr, 0));
+ dataElem = 0;
+@@ -314,7 +314,7 @@
+ *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
+ TRI_SETF(FARRAY(vPtr, 4)
+ *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+ if (gc->state.vData.colorType == GR_U8) {
+ i = gc->tsuDataList[0];
+ TRI_SETF(FARRAY(vPtr, i));
+@@ -350,7 +350,7 @@
+ *oow*gc->state.Viewport.hwidth + gc->state.Viewport.ox);
+ TRI_SETF(FARRAY(vPtr, 4)
+ *oow*gc->state.Viewport.hheight + gc->state.Viewport.oy);
+- (float *)pointers += stride;
++ pointers = (float *)pointers + stride;
+
+ TRI_VP_SETFS(vPtr, oow);
+ #endif
Index: Glide3.spec
===================================================================
RCS file: /cvs/extras/rpms/Glide3/devel/Glide3.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Glide3.spec 28 Apr 2005 18:39:19 -0000 1.1
+++ Glide3.spec 30 Apr 2005 10:18:56 -0000 1.2
@@ -16,7 +16,7 @@
# tar jcf Glide3-$(date +"%Y%m%d").tar.bz2 Glide3/
Source0: %{name}-%{version}.tar.bz2
Source1: glidelink.c
-Patch0: glide-ia64.patch
+Patch0: Glide3-64bit.patch
Patch1: Glide3-new-autotools-bugfix.patch
Patch2: Glide3-redhat-cleanup-1.patch
Patch3: Glide3-fixes.patch
@@ -47,9 +47,7 @@
%prep
%setup -q -n Glide3
-%ifarch x86_64 ia64 alpha
-%patch0 -p1 -b .glide-ia64
-%endif
+%patch0 -p1 -b .64bit
%patch1 -p0 -b .new-autotools-bugfix
%patch2 -p1 -b .redhat-cleanup-1
%patch3 -p1 -b .fix
@@ -82,6 +80,8 @@
make -f makefile.autoconf all
cd ..
+#Sorry, no 64 bit support for Voodoo2 (yet)
+%ifarch %{ix86}
mkdir build-2
cd build-2
../configure \
@@ -90,7 +90,7 @@
--prefix=/usr
make -f makefile.autoconf all
cd ..
-
+%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -106,8 +106,13 @@
$RPM_BUILD_ROOT/%{_libdir}/libglide3-v3.so
install -m 755 ../build-2/cvg/glide3/src/.libs/libglide3.so.%{libver} \
$RPM_BUILD_ROOT/%{_libdir}/libglide3-v2.so
-# Point to v2 by default, ldconfig doesn't like this?
+
+# For ix86 Point to v2 by default else v5, ldconfig doesn't like this?
+%ifarch %{ix86}
ln -snf libglide3-v2.so $RPM_BUILD_ROOT%{_libdir}/libglide3.so.%{libver}
+%else
+ln -snf libglide3-v5.so $RPM_BUILD_ROOT%{_libdir}/libglide3.so.%{libver}
+%endif
ln -snf libglide3.so.%{libver} $RPM_BUILD_ROOT%{_libdir}/libglide3.so.3
# We are not installing these, so lets delete them
@@ -128,7 +133,9 @@
%doc COPYING
%{_libdir}/libglide3.so.3
%{_libdir}/libglide3.so.%{libver}
+%ifarch %{ix86}
%{_libdir}/libglide3-v2.so
+%endif
%{_libdir}/libglide3-v3.so
%{_libdir}/libglide3-v5.so
@@ -141,6 +148,18 @@
%changelog
+* Sat Apr 30 2005 Hans de Goede <j.w.r.degoede(a)hhs.nl>
+- Removed unnescearry makefile mods from Glide3-gcc4.patch. The option
+ I added disabled another warning then the one I was trying to get disabled.
+- Replaced glide-ia64.patch with Glide-64bit.patch this patch adds support
+ for x86_64 and has lots of "long" replaced with "unsigned long" so that
+ the code stays 100% the same on i386.
+- Made the use of the new 64bit patch unconditional (iow for all archs).
+- Fixed Glide3-fixes.patch so that compilation with the 64bit patch applied
+ actually works.
+- Don't build support for voodoo2 / cvg on 64 bit archs since the 64bit patch
+ only adds 64bit support for voodoo3 & 5 / h3 & h5.
+
* Tue Apr 26 2005 Hans de Goede <j.w.r.degoede(a)hhs.nl>
- added x86_64 to ExclusiveArch list
- apply glide-ia64.patch for x86_64
glide-ia64.patch:
Index: glide-ia64.patch
===================================================================
RCS file: /cvs/extras/rpms/Glide3/devel/glide-ia64.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- glide-ia64.patch 28 Apr 2005 18:39:19 -0000 1.1
+++ glide-ia64.patch 30 Apr 2005 10:18:56 -0000 1.2
@@ -58,16 +58,17 @@
+#endif /* !__ia64__ */
--- Glide3/h3/glide3/src/diget.c.ia64-foo Wed Nov 24 16:44:54 1999
+++ Glide3/h3/glide3/src/diget.c Thu Dec 21 14:27:40 2000
-@@ -615,10 +615,10 @@
+@@ -615,10 +615,11 @@
break;
case GR_SURFACE_TEXTURE:
- if (plength == 4) {
-+ if (plength == sizeof(long)) {
++ if (plength == sizeof(unsigned long)) {
++ unsigned long *p = (unsigned long *)params;
GR_DCL_GC;
- *params = (FxU32) &gc->tBuffer;
-+ *(long *)params = (long) &gc->tBuffer;
++ *p = (unsigned long) &gc->tBuffer;
retVal = plength;
}
break;
@@ -78,7 +79,7 @@
_GlideRoot.current_sst = which;
- setThreadValue( (FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst] );
-+ setThreadValue( (long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
++ setThreadValue( (unsigned long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
#ifdef GLIDE_MULTIPLATFORM
_GlideRoot.curGCFuncs = _GlideRoot.curGC->gcFuncs;
@@ -90,11 +91,11 @@
while ((int)Count >= 3) {
- b_ptr = (void *)((FxU32)pointers + stride);
- c_ptr = (void *)((FxU32)pointers + stride*2);
-+ b_ptr = (void *)((long)pointers + stride);
-+ c_ptr = (void *)((long)pointers + stride*2);
++ b_ptr = (void *)((unsigned long)pointers + stride);
++ c_ptr = (void *)((unsigned long)pointers + stride*2);
TRISETUP(pointers, b_ptr, c_ptr);
- pointers = (void *)((FxU32)c_ptr + stride);
-+ pointers = (void *)((long)c_ptr + stride);
++ pointers = (void *)((unsigned long)c_ptr + stride);
Count -= 3;
}
}
@@ -105,7 +106,7 @@
-#define GEN_INDEX(a) ((((FxU32) a) - ((FxU32) gc->reg_ptr)) >> 2)
-+#define GEN_INDEX(a) ((((long) a) - ((long) gc->reg_ptr)) >> 2)
++#define GEN_INDEX(a) ((((unsigned long) a) - ((unsigned long) gc->reg_ptr)) >> 2)
void
_grFifoWriteDebug(FxU32 addr, FxU32 val, FxU32 fifoPtr)
@@ -134,11 +135,11 @@
-FxU32
-+long
++unsigned long
_grHwFifoPtr(FxBool ignored)
{
- FxU32 rVal = 0;
-+ long rVal = 0;
++ unsigned long rVal = 0;
FxU32 status, readPtrL1, readPtrL2;
GR_DCL_GC;
@@ -147,7 +148,7 @@
readPtrL2 = GET(gc->cRegs->cmdFifo0.readPtrL);
} while (readPtrL1 != readPtrL2);
- rVal = (((FxU32)gc->cmdTransportInfo.fifoStart) +
-+ rVal = (((long)gc->cmdTransportInfo.fifoStart) +
++ rVal = (((unsigned long)gc->cmdTransportInfo.fifoStart) +
readPtrL2 -
(FxU32)gc->cmdTransportInfo.fifoOffset);
}
@@ -156,7 +157,7 @@
readPos=readPos-gcFifo->fifoOffset;
gcFifo->fifoPtr = gcFifo->fifoStart + (readPos>>2);
- gcFifo->fifoRead = (FxU32)gcFifo->fifoPtr;
-+ gcFifo->fifoRead = (long)gcFifo->fifoPtr;
++ gcFifo->fifoRead = (unsigned long)gcFifo->fifoPtr;
#else
gcFifo=&gc->cmdTransportInfo;
gcFifo->fifoPtr = gc->rawLfb+(fifoPtr>>2);
@@ -183,7 +184,7 @@
* which is *SLOW*.
*/
-FxU32 _grHwFifoPtr(FxBool);
-+long _grHwFifoPtr(FxBool);
++unsigned long _grHwFifoPtr(FxBool);
#define HW_FIFO_PTR(a) _grHwFifoPtr(a)
#if FIFO_ASSERT_FULL
@@ -193,8 +194,8 @@
ASSERT(_checkP); \
- ASSERT((((FxU32)_regGroupFifoPtr - (FxU32)gc->cmdTransportInfo.fifoPtr) >> 2) == _groupNum + 1); \
- gc->cmdTransportInfo.fifoRoom -= ((FxU32)_regGroupFifoPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
-+ ASSERT((((long)_regGroupFifoPtr - (long)gc->cmdTransportInfo.fifoPtr) >> 2) == _groupNum + 1); \
-+ gc->cmdTransportInfo.fifoRoom -= ((long)_regGroupFifoPtr - (long)gc->cmdTransportInfo.fifoPtr); \
++ ASSERT((((unsigned long)_regGroupFifoPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr) >> 2) == _groupNum + 1); \
++ gc->cmdTransportInfo.fifoRoom -= ((unsigned long)_regGroupFifoPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr); \
gc->cmdTransportInfo.fifoPtr = (FxU32*)_regGroupFifoPtr; \
GDBG_INFO(gc->myLevel + 200, "\tGroupEnd: (0x%X : 0x%X)\n", \
gc->cmdTransportInfo.fifoPtr, gc->cmdTransportInfo.fifoRoom); \
@@ -203,7 +204,7 @@
#define TRI_END \
TRI_ASSERT(); \
- gc->cmdTransportInfo.fifoRoom -= ((FxU32)tPackPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
-+ gc->cmdTransportInfo.fifoRoom -= ((long)tPackPtr - (long)gc->cmdTransportInfo.fifoPtr); \
++ gc->cmdTransportInfo.fifoRoom -= ((unsigned long)tPackPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr); \
gc->cmdTransportInfo.fifoPtr = tPackPtr; \
GDBG_INFO(gc->myLevel + 200, "\tTriEnd: (0x%X : 0x%X)\n", tPackPtr, gc->cmdTransportInfo.fifoRoom); \
FIFO_ASSERT(); \
@@ -212,7 +213,7 @@
!gc->open, \
"Called before grSstWinOpen()"); \
- GR_ASSERT(((FxU32)(packetPtr) & FIFO_ALIGN_MASK) == 0); /* alignment */ \
-+ GR_ASSERT(((long)(packetPtr) & FIFO_ALIGN_MASK) == 0); /* alignment */ \
++ GR_ASSERT(((unsigned long)(packetPtr) & FIFO_ALIGN_MASK) == 0); /* alignment */ \
GR_ASSERT((__numWords) > 0); /* packet size */ \
GR_ASSERT((__numWords) < ((0x01 << 19) - 2)); \
GR_ASSERT((((FxU32)(__numWords) + 2) << 2) <= (FxU32)gc->cmdTransportInfo.fifoRoom); \
@@ -229,8 +230,8 @@
DEBUGFIFODUMP_LINEAR(gc->cmdTransportInfo.fifoPtr); \
- GR_ASSERT((((FxU32)packetPtr - (FxU32)gc->cmdTransportInfo.fifoPtr) >> 2) == __writeSize + 2); \
- gc->cmdTransportInfo.fifoRoom -= ((FxU32)packetPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
-+ GR_ASSERT((((long)packetPtr - (long)gc->cmdTransportInfo.fifoPtr) >> 2) == __writeSize + 2); \
-+ gc->cmdTransportInfo.fifoRoom -= ((long)packetPtr - (long)gc->cmdTransportInfo.fifoPtr); \
++ GR_ASSERT((((unsigned long)packetPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr) >> 2) == __writeSize + 2); \
++ gc->cmdTransportInfo.fifoRoom -= ((unsigned long)packetPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr); \
gc->cmdTransportInfo.fifoPtr = packetPtr; \
GDBG_INFO(gc->myLevel + 200, "\tLinearEnd: (0x%X : 0x%X)\n", \
packetPtr, gc->cmdTransportInfo.fifoRoom); \
@@ -250,7 +251,7 @@
} \
GR_INC_SIZE((__writeCount) * sizeof(FxU32)); \
- gc->cmdTransportInfo.fifoRoom -= ((FxU32)curFifoPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
-+ gc->cmdTransportInfo.fifoRoom -= ((long)curFifoPtr - (long)gc->cmdTransportInfo.fifoPtr); \
++ gc->cmdTransportInfo.fifoRoom -= ((unsigned long)curFifoPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr); \
gc->cmdTransportInfo.fifoPtr = curFifoPtr; \
} \
GR_CHECK_SIZE(); \
@@ -259,7 +260,7 @@
FxU32* fifoPtr; /* Current write pointer into fifo */
- FxU32 fifoRead; /* Last known hw read ptr.
-+ long fifoRead; /* Last known hw read ptr.
++ unsigned long fifoRead; /* Last known hw read ptr.
* If on an sli enabled system this will be
* the 'closest' hw read ptr of the sli
* master and slave.
@@ -269,12 +270,12 @@
backBuffer,
- buffers[4],
+ buffers[4];
-+ long
++ unsigned long
lfbBuffers[4]; /* Tile relative addresses of the color/aux
* buffers for lfbReads.
*/
- FxU32 lockPtrs[2]; /* pointers to locked buffers */
-+ long lockPtrs[2]; /* pointers to locked buffers */
++ unsigned long lockPtrs[2]; /* pointers to locked buffers */
FxU32 fbStride;
struct {
@@ -294,7 +295,7 @@
#ifdef __linux__
-extern FxU32 threadValueLinux;
-+extern long threadValueLinux;
++extern unsigned long threadValueLinux;
#define getThreadValueFast() threadValueLinux
#endif
@@ -303,10 +304,10 @@
void
-setThreadValue( FxU32 value );
-+setThreadValue( long value );
++setThreadValue( unsigned long value );
-FxU32
-+long
++unsigned long
getThreadValueSLOW( void );
void
@@ -411,7 +412,7 @@
#define DA_END \
- gc->cmdTransportInfo.fifoRoom -= ((FxU32)packetPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
-+ gc->cmdTransportInfo.fifoRoom -= ((long)packetPtr - (long)gc->cmdTransportInfo.fifoPtr); \
++ gc->cmdTransportInfo.fifoRoom -= ((unsigned long)packetPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr); \
gc->cmdTransportInfo.fifoPtr = packetPtr; \
FIFO_ASSERT(); \
}
@@ -534,7 +535,7 @@
gdbg_printf("Command Fifo:\n");
gdbg_printf("\tSoftware:\n");
- gdbg_printf("\t\tfifoPtr: 0x%X\n", (FxU32)gc->cmdTransportInfo.fifoPtr - (FxU32) gc->rawLfb);
-+ gdbg_printf("\t\tfifoPtr: 0x%X\n", (long)gc->cmdTransportInfo.fifoPtr - (long) gc->rawLfb);
++ gdbg_printf("\t\tfifoPtr: 0x%X\n", (unsigned long)gc->cmdTransportInfo.fifoPtr - (unsigned long) gc->rawLfb);
gdbg_printf("\t\tfifoOffset: 0x%X\n", gc->cmdTransportInfo.fifoOffset);
gdbg_printf("\t\tfifoEnd: 0x%X\n", gc->cmdTransportInfo.fifoEnd - gc->rawLfb);
gdbg_printf("\t\tfifoSize: 0x%X\n", gc->cmdTransportInfo.fifoSize);
@@ -543,7 +544,7 @@
if ( !gc->windowed ) {
gdbg_printf("\tHardware:\n");
- gdbg_printf("\t\treadPtrL: 0x%X\n", HW_FIFO_PTR(FXTRUE) - (FxU32)gc->rawLfb);
-+ gdbg_printf("\t\treadPtrL: 0x%X\n", HW_FIFO_PTR(FXTRUE) - (long)gc->rawLfb);
++ gdbg_printf("\t\treadPtrL: 0x%X\n", HW_FIFO_PTR(FXTRUE) - (unsigned long)gc->rawLfb);
gdbg_printf("\t\tdepth: 0x%X\n", GR_CAGP_GET(depth));
gdbg_printf("\t\tholeCount: 0x%X\n", GR_CAGP_GET(holeCount));
gdbg_printf("\t\tbaseAddrL: 0x%X\n", GR_CAGP_GET(baseAddrL));
@@ -555,8 +556,8 @@
gc->bufferSwaps[i] =
- (FxU32) gc->cmdTransportInfo.fifoPtr -
- (FxU32) gc->cmdTransportInfo.fifoStart;
-+ (long) gc->cmdTransportInfo.fifoPtr -
-+ (long) gc->cmdTransportInfo.fifoStart;
++ (unsigned long) gc->cmdTransportInfo.fifoPtr -
++ (unsigned long) gc->cmdTransportInfo.fifoStart;
j = i;
}
}
@@ -574,7 +575,7 @@
* gc from tls via GR_DCL_GC. F*ck this up at your own peril.
*/
- setThreadValue((FxU32)gc);
-+ setThreadValue((long)gc);
++ setThreadValue((unsigned long)gc);
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
/* Flush any remaining commands and cleanup any per gc state */
grSurfaceReleaseContext((GrContext_t)gc);
@@ -655,7 +656,7 @@
/* If there is no current gc in tls then set the current context. */
- if (gc == NULL) setThreadValue((FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst]);
-+ if (gc == NULL) setThreadValue((long)&_GlideRoot.GCs[_GlideRoot.current_sst]);
++ if (gc == NULL) setThreadValue((unsigned long)&_GlideRoot.GCs[_GlideRoot.current_sst]);
}
break;
case DLL_THREAD_DETACH:
@@ -722,8 +723,8 @@
- gc->bufferSwaps[0] = ((FxU32) gc->cmdTransportInfo.fifoPtr -
- (FxU32) gc->cmdTransportInfo.fifoStart);
-+ gc->bufferSwaps[0] = ((long) gc->cmdTransportInfo.fifoPtr -
-+ (long) gc->cmdTransportInfo.fifoStart);
++ gc->bufferSwaps[0] = ((unsigned long) gc->cmdTransportInfo.fifoPtr -
++ (unsigned long) gc->cmdTransportInfo.fifoStart);
gc->swapsPending = 1;
@@ -732,7 +733,7 @@
* context.
*/
- setThreadValue( (FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst] );
-+ setThreadValue( (long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
++ setThreadValue( (unsigned long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
{
/* Partial Argument Validation */
@@ -741,13 +742,13 @@
gc->buffers[buffer] = bufInfo->colBuffStart[buffer];
GDBG_INFO(80, "Buffer %d: Start: 0x%x\n", buffer, gc->buffers[buffer]);
- gc->lfbBuffers[buffer] = (FxU32)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
-+ gc->lfbBuffers[buffer] = (long)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
++ gc->lfbBuffers[buffer] = (unsigned long)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
}
if (nAuxBuffers != 0) {
gc->buffers[buffer] = bufInfo->auxBuffStart;
GDBG_INFO(80, "Aux Buffer: Start: 0x%x\n", gc->buffers[buffer]);
- gc->lfbBuffers[buffer] = (FxU32)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
-+ gc->lfbBuffers[buffer] = (long)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
++ gc->lfbBuffers[buffer] = (unsigned long)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
}
vInfo->hWnd = gc->grHwnd;
@@ -765,7 +766,7 @@
#else
/* gc->fbOffset = (FxU32)fxHalFbiGetMemory((SstRegs*)gc->reg_ptr); */
- gc->fbOffset = (FxU32)gc->rawLfb;
-+ gc->fbOffset = (long)gc->rawLfb;
++ gc->fbOffset = (unsigned long)gc->rawLfb;
gc->tmuMemInfo[0].tramOffset = 0x200000;
gc->tmuMemInfo[0].tramSize = 0x200000;
gc->tmuMemInfo[1].tramOffset = gc->tmuMemInfo[0].tramSize + gc->tmuMemInfo[0].tramOffset;
@@ -786,7 +787,7 @@
* crashes' will ensue).
*/
- setThreadValue((FxU32)gc);
-+ setThreadValue((long) gc);
++ setThreadValue((unsigned long) gc);
if ((gc != NULL) && gc->open) grFlush();
/* Make sure that the user specified gc is not whacked */
@@ -797,7 +798,7 @@
* context.
*/
- setThreadValue( (FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst] );
-+ setThreadValue( (long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
++ setThreadValue( (unsigned long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
{
/* Partial Argument Validation */
@@ -806,13 +807,13 @@
gc->buffers[buffer] = bufInfo->colBuffStart[buffer];
GDBG_INFO(80, "Buffer %d: Start: 0x%x\n", buffer, gc->buffers[buffer]);
- gc->lfbBuffers[buffer] = (FxU32)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
-+ gc->lfbBuffers[buffer] = (long)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
++ gc->lfbBuffers[buffer] = (unsigned long)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
}
if (nAuxBuffers != 0) {
gc->buffers[buffer] = bufInfo->auxBuffStart;
GDBG_INFO(80, "Aux Buffer: Start: 0x%x\n", gc->buffers[buffer]);
- gc->lfbBuffers[buffer] = (FxU32)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
-+ gc->lfbBuffers[buffer] = (long)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
++ gc->lfbBuffers[buffer] = (unsigned long)gc->rawLfb + bufInfo->lfbBuffAddr[buffer];
}
vInfo->hWnd = gc->grHwnd;
@@ -821,7 +822,7 @@
* crashes' will ensue).
*/
- setThreadValue((FxU32)gc);
-+ setThreadValue((long)gc);
++ setThreadValue((unsigned long)gc);
if ((gc != NULL) && gc->open) grFlush();
/* Make sure that the user specified gc is not whacked */
@@ -861,14 +862,14 @@
} /* initThreadStorage */
-void setThreadValue( FxU32 value ) {
-+void setThreadValue( long value ) {
++void setThreadValue( unsigned long value ) {
GR_CHECK_F( "setThreadValue", !threadInit, "Thread storage not initialized\n" );
TlsSetValue( _GlideRoot.tlsIndex, (void*)value );
}
#pragma warning (4:4035) /* No return value */
-FxU32 getThreadValueSLOW( void ) {
-+long getThreadValueSLOW( void ) {
++unsigned long getThreadValueSLOW( void ) {
GR_CHECK_F( "getThreadValue", !threadInit, "Thread storage not initialized\n" );
#if 0
@@ -877,7 +878,7 @@
}
-void setThreadValue( FxU32 value )
-+void setThreadValue( long value )
++void setThreadValue( unsigned long value )
{
_threadValueMacOS = value;
}
@@ -886,20 +887,20 @@
#include "fxcmd.h"
-FxU32 threadValueLinux;
-+long threadValueLinux;
++unsigned long threadValueLinux;
void initThreadStorage(void)
{
}
-void setThreadValue( FxU32 value )
-+void setThreadValue( long value )
++void setThreadValue( unsigned long value )
{
threadValueLinux = value;
}
-FxU32 getThreadValueSLOW( void )
-+long getThreadValueSLOW( void )
++unsigned long getThreadValueSLOW( void )
{
return threadValueLinux;
}
@@ -1310,7 +1311,7 @@
- numBaseAddrs, /* # base addresses */
- baseAddresses[HWCEXT_MAX_BASEADDR]; /* linear Addresses */
+ FxU32 numBaseAddrs; /* # base addresses */
-+ long baseAddresses[HWCEXT_MAX_BASEADDR]; /* linear Addresses */
++ unsigned long baseAddresses[HWCEXT_MAX_BASEADDR]; /* linear Addresses */
} hwcExtLinearAddrRes_t;
/*
@@ -1358,8 +1359,8 @@
bInfo->linearInfo.initialized = FXTRUE;
- bInfo->linearInfo.linearAddress[0]=(FxU32)driInfo.pRegs;
- bInfo->linearInfo.linearAddress[1]=(FxU32)driInfo.pFB;
-+ bInfo->linearInfo.linearAddress[0]=(long)driInfo.pRegs;
-+ bInfo->linearInfo.linearAddress[1]=(long)driInfo.pFB;
++ bInfo->linearInfo.linearAddress[0]=(unsigned long)driInfo.pRegs;
++ bInfo->linearInfo.linearAddress[1]=(unsigned long)driInfo.pFB;
return FXTRUE;
}
@@ -1424,7 +1425,7 @@
for (bAddr = 0; bAddr < HWC_NUM_BASE_ADDR; bAddr++) {
if ((bAddrMask >> bAddr) & 0x1) {
- bInfo->linearInfo.linearAddress[bAddr] = (FxU32)
-+ bInfo->linearInfo.linearAddress[bAddr] = (long)
++ bInfo->linearInfo.linearAddress[bAddr] = (unsigned long)
pciMapCardMulti(bInfo->pciInfo.vendorID, bInfo->pciInfo.deviceID,
0x2000000, &bInfo->deviceNum, bInfo->boardNum, bAddr);
}
@@ -1463,7 +1464,7 @@
initialized;
- FxU32
- linearAddress[HWC_NUM_BASE_ADDR];
-+ long linearAddress[HWC_NUM_BASE_ADDR];
++ unsigned long linearAddress[HWC_NUM_BASE_ADDR];
} hwcLinearInfo;
typedef struct hwcRegInfo_s {
@@ -1476,7 +1477,7 @@
- sstBase, /* 3D register base */
- lfbBase, /* 3D lfb base */
- rawLfbBase; /* Raw LFB base (base address 1) */
-+ volatile long
++ volatile unsigned long
+ ioMemBase, /* mem base for I/O aliases */
+ cmdAGPBase, /* CMD/AGP register base */
+ waxBase, /* 2D register base */
@@ -1531,17 +1532,18 @@
+#endif /* !__ia64___ */
--- Glide3/h5/glide3/src/diget.c.ia64-foo Thu Nov 16 14:26:03 2000
+++ Glide3/h5/glide3/src/diget.c Thu Dec 21 14:27:40 2000
-@@ -807,11 +807,11 @@
+@@ -807,11 +807,12 @@
break;
case GR_SURFACE_TEXTURE:
- if (plength == 4) {
-+ if (plength == sizeof(long)) {
++ if (plength == sizeof(unsigned long)) {
++ unsigned long *p = (unsigned long *)params;
GR_DCL_GC;
#ifdef GLIDE_INIT_HWC
- *params = (FxU32) &gc->tBuffer;
-+ *(long *)params = (long) &gc->tBuffer;
++ *p = (unsigned long) &gc->tBuffer;
retVal = plength;
#endif
}
@@ -1552,7 +1554,7 @@
_GlideRoot.current_sst = which;
- setThreadValue( (FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst] );
-+ setThreadValue( (long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
++ setThreadValue( (unsigned long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
#ifdef GLIDE_MULTIPLATFORM
_GlideRoot.curGCFuncs = _GlideRoot.curGC->gcFuncs;
@@ -1564,11 +1566,11 @@
while ((int)Count >= 3) {
- b_ptr = (void *)((FxU32)pointers + stride);
- c_ptr = (void *)((FxU32)pointers + stride*2);
-+ b_ptr = (void *)((long)pointers + stride);
-+ c_ptr = (void *)((long)pointers + stride*2);
++ b_ptr = (void *)((unsigned long)pointers + stride);
++ c_ptr = (void *)((unsigned long)pointers + stride*2);
TRISETUP(pointers, b_ptr, c_ptr);
- pointers = (void *)((FxU32)c_ptr + stride);
-+ pointers = (void *)((long)c_ptr + stride);
++ pointers = (void *)((unsigned long)c_ptr + stride);
Count -= 3;
}
}
@@ -1579,7 +1581,7 @@
-#define GEN_INDEX(a) ((((FxU32) a) - ((FxU32) gc->reg_ptr)) >> 2)
-+#define GEN_INDEX(a) ((((long) a) - ((long) gc->reg_ptr)) >> 2)
++#define GEN_INDEX(a) ((((unsigned long) a) - ((unsigned long) gc->reg_ptr)) >> 2)
void
_grFifoWriteDebug(FxU32 addr, FxU32 val, FxU32 fifoPtr)
@@ -1611,11 +1613,11 @@
-FxU32
-_grHwFifoPtr(FxBool ignored)
-+long
++unsigned long
+_grHwFifoPtr(FxBool ignored)
{
- FxU32 rVal = 0;
-+ long rVal = 0;
++ unsigned long rVal = 0;
FxU32 status, readPtrL1, readPtrL2;
FxU32 chip ; /* AJB SLI MAYHEM */
@@ -1624,7 +1626,7 @@
} while (readPtrL1 != readPtrL2);
}
- rVal = (((FxU32)gc->cmdTransportInfo.fifoStart) +
-+ rVal = (((long)gc->cmdTransportInfo.fifoStart) +
++ rVal = (((unsigned long)gc->cmdTransportInfo.fifoStart) +
readPtrL2 -
(FxU32)gc->cmdTransportInfo.fifoOffset);
}
@@ -1633,7 +1635,7 @@
readPos=readPos-gcFifo->fifoOffset;
gcFifo->fifoPtr = gcFifo->fifoStart + (readPos>>2);
- gcFifo->fifoRead = (FxU32)gcFifo->fifoPtr;
-+ gcFifo->fifoRead = (long)gcFifo->fifoPtr;
++ gcFifo->fifoRead = (unsigned long)gcFifo->fifoPtr;
#else
gcFifo=&gc->cmdTransportInfo;
gcFifo->fifoPtr = gc->rawLfb+(fifoPtr>>2);
@@ -1660,7 +1662,7 @@
* which is *SLOW*.
*/
-FxU32 _grHwFifoPtr(FxBool);
-+long _grHwFifoPtr(FxBool);
++unsigned long _grHwFifoPtr(FxBool);
#define HW_FIFO_PTR(a) _grHwFifoPtr(a)
#if FIFO_ASSERT_FULL
@@ -1670,8 +1672,8 @@
ASSERT(_checkP); \
- ASSERT((((FxU32)_regGroupFifoPtr - (FxU32)gc->cmdTransportInfo.fifoPtr) >> 2) == _groupNum + 1); \
- gc->cmdTransportInfo.fifoRoom -= ((FxU32)_regGroupFifoPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
-+ ASSERT((((long)_regGroupFifoPtr - (long)gc->cmdTransportInfo.fifoPtr) >> 2) == _groupNum + 1); \
-+ gc->cmdTransportInfo.fifoRoom -= ((long)_regGroupFifoPtr - (long)gc->cmdTransportInfo.fifoPtr); \
++ ASSERT((((unsigned long)_regGroupFifoPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr) >> 2) == _groupNum + 1); \
++ gc->cmdTransportInfo.fifoRoom -= ((unsigned long)_regGroupFifoPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr); \
gc->cmdTransportInfo.fifoPtr = (FxU32*)_regGroupFifoPtr; \
GDBG_INFO(gc->myLevel + 200, "\tGroupEnd: (0x%X : 0x%X)\n", \
gc->cmdTransportInfo.fifoPtr, gc->cmdTransportInfo.fifoRoom); \
@@ -1680,7 +1682,7 @@
#define TRI_END \
TRI_ASSERT(); \
- gc->cmdTransportInfo.fifoRoom -= ((FxU32)tPackPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
-+ gc->cmdTransportInfo.fifoRoom -= ((long)tPackPtr - (long)gc->cmdTransportInfo.fifoPtr); \
++ gc->cmdTransportInfo.fifoRoom -= ((unsigned long)tPackPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr); \
gc->cmdTransportInfo.fifoPtr = tPackPtr; \
GDBG_INFO(gc->myLevel + 200, "\tTriEnd: (0x%X : 0x%X)\n", tPackPtr, gc->cmdTransportInfo.fifoRoom); \
FIFO_ASSERT(); \
@@ -1689,14 +1691,14 @@
!gc->open, \
"Called before grSstWinOpen()"); \
- GR_ASSERT(((FxU32)(packetPtr) & FIFO_ALIGN_MASK) == 0); /* alignment */ \
-+ GR_ASSERT(((long)(packetPtr) & FIFO_ALIGN_MASK) == 0); /* alignment */ \
++ GR_ASSERT(((unsigned long)(packetPtr) & FIFO_ALIGN_MASK) == 0); /* alignment */ \
GR_ASSERT((__numWords) > 0); /* packet size */ \
GR_ASSERT((__numWords) < ((0x01 << 19) - 2)); \
GR_ASSERT((((FxU32)(__numWords) + 2) << 2) <= (FxU32)gc->cmdTransportInfo.fifoRoom); \
- GR_ASSERT(((FxU32)packetPtr + (((__numWords) + 2) << 2)) < \
- (FxU32)gc->cmdTransportInfo.fifoEnd); \
-+ GR_ASSERT(((unsigned long)packetPtr + (((__numWords) + 2) << 2)) < \
-+ (unsigned long)gc->cmdTransportInfo.fifoEnd); \
++ GR_ASSERT(((unsigned unsigned long)packetPtr + (((__numWords) + 2) << 2)) < \
++ (unsigned unsigned long)gc->cmdTransportInfo.fifoEnd); \
GR_ASSERT((hdr2 & 0xE0000000UL) == 0x00UL); \
GR_ASSERT(((__addr) & 0x03UL) == 0x00UL); \
FIFO_ASSERT(); \
@@ -1706,8 +1708,8 @@
DEBUGFIFODUMP_LINEAR(gc->cmdTransportInfo.fifoPtr); \
- GR_ASSERT((((FxU32)packetPtr - (FxU32)gc->cmdTransportInfo.fifoPtr) >> 2) == __writeSize + 2); \
- gc->cmdTransportInfo.fifoRoom -= ((FxU32)packetPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
-+ GR_ASSERT((((long)packetPtr - (long)gc->cmdTransportInfo.fifoPtr) >> 2) == __writeSize + 2); \
-+ gc->cmdTransportInfo.fifoRoom -= ((long)packetPtr - (long)gc->cmdTransportInfo.fifoPtr); \
++ GR_ASSERT((((unsigned long)packetPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr) >> 2) == __writeSize + 2); \
++ gc->cmdTransportInfo.fifoRoom -= ((unsigned long)packetPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr); \
gc->cmdTransportInfo.fifoPtr = packetPtr; \
GDBG_INFO(gc->myLevel + 200, "\tLinearEnd: (0x%X : 0x%X)\n", \
packetPtr, gc->cmdTransportInfo.fifoRoom); \
@@ -1727,7 +1729,7 @@
} \
GR_INC_SIZE((__writeCount) * sizeof(FxU32)); \
- gc->cmdTransportInfo.fifoRoom -= ((FxU32)curFifoPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
-+ gc->cmdTransportInfo.fifoRoom -= ((long)curFifoPtr - (long)gc->cmdTransportInfo.fifoPtr); \
++ gc->cmdTransportInfo.fifoRoom -= ((unsigned long)curFifoPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr); \
gc->cmdTransportInfo.fifoPtr = curFifoPtr; \
} \
GR_CHECK_SIZE(); \
@@ -1736,7 +1738,7 @@
FxU32* fifoPtr; /* Current write pointer into fifo */
- FxU32 fifoRead; /* Last known hw read ptr.
-+ long fifoRead; /* Last known hw read ptr.
++ unsigned long fifoRead; /* Last known hw read ptr.
* If on an sli enabled system this will be
* the 'closest' hw read ptr of the sli
* master and slave.
@@ -1747,11 +1749,11 @@
- buffers1[4],
- lfbBuffers[4]; /* Tile relative addresses of the color/aux
+ buffers1[4];
-+ long lfbBuffers[4]; /* Tile relative addresses of the color/aux
++ unsigned long lfbBuffers[4]; /* Tile relative addresses of the color/aux
* buffers for lfbReads.
*/
- FxU32 lockPtrs[2]; /* pointers to locked buffers */
-+ long lockPtrs[2]; /* pointers to locked buffers */
++ unsigned long lockPtrs[2]; /* pointers to locked buffers */
FxU32 fbStride;
FxBool colTiled, // AJB - grBufferClear needs to know when target surfaces
@@ -1771,7 +1773,7 @@
#ifdef __linux__
-extern FxU32 threadValueLinux;
-+extern long threadValueLinux;
++extern unsigned long threadValueLinux;
#define getThreadValueFast() threadValueLinux
#endif /* defined(__linux__) */
@@ -1780,10 +1782,10 @@
void
-setThreadValue( FxU32 value );
-+setThreadValue( long value );
++setThreadValue( unsigned long value );
-FxU32
-+long
++unsigned long
getThreadValueSLOW( void );
void
@@ -1879,7 +1881,7 @@
#define DA_END \
- gc->cmdTransportInfo.fifoRoom -= ((FxU32)packetPtr - (FxU32)gc->cmdTransportInfo.fifoPtr); \
-+ gc->cmdTransportInfo.fifoRoom -= ((long)packetPtr - (long)gc->cmdTransportInfo.fifoPtr); \
++ gc->cmdTransportInfo.fifoRoom -= ((unsigned long)packetPtr - (unsigned long)gc->cmdTransportInfo.fifoPtr); \
gc->cmdTransportInfo.fifoPtr = packetPtr; \
FIFO_ASSERT(); \
}
@@ -2002,7 +2004,7 @@
gdbg_printf("Command Fifo:\n");
gdbg_printf("\tSoftware:\n");
- gdbg_printf("\t\tfifoPtr: 0x%X\n", (FxU32)gc->cmdTransportInfo.fifoPtr - (FxU32) gc->rawLfb);
-+ gdbg_printf("\t\tfifoPtr: 0x%X\n", (long)gc->cmdTransportInfo.fifoPtr - (long) gc->rawLfb);
++ gdbg_printf("\t\tfifoPtr: 0x%X\n", (unsigned long)gc->cmdTransportInfo.fifoPtr - (unsigned long) gc->rawLfb);
gdbg_printf("\t\tfifoOffset: 0x%X\n", gc->cmdTransportInfo.fifoOffset);
gdbg_printf("\t\tfifoEnd: 0x%X\n", gc->cmdTransportInfo.fifoEnd - gc->rawLfb);
gdbg_printf("\t\tfifoSize: 0x%X\n", gc->cmdTransportInfo.fifoSize);
@@ -2011,7 +2013,7 @@
if ( !gc->windowed ) {
gdbg_printf("\tHardware:\n");
- gdbg_printf("\t\treadPtrL: 0x%X\n", HW_FIFO_PTR(FXTRUE) - (FxU32)gc->rawLfb);
-+ gdbg_printf("\t\treadPtrL: 0x%X\n", HW_FIFO_PTR(FXTRUE) - (long)gc->rawLfb);
++ gdbg_printf("\t\treadPtrL: 0x%X\n", HW_FIFO_PTR(FXTRUE) - (unsigned long)gc->rawLfb);
gdbg_printf("\t\tdepth: 0x%X\n", GR_CAGP_GET(depth));
gdbg_printf("\t\tholeCount: 0x%X\n", GR_CAGP_GET(holeCount));
gdbg_printf("\t\tbaseAddrL: 0x%X\n", GR_CAGP_GET(baseAddrL));
@@ -2052,7 +2054,7 @@
/* If there is no current gc in tls then set the current context. */
- if (gc == NULL) setThreadValue((FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst]);
-+ if (gc == NULL) setThreadValue((long)&_GlideRoot.GCs[_GlideRoot.current_sst]);
++ if (gc == NULL) setThreadValue((unsigned long)&_GlideRoot.GCs[_GlideRoot.current_sst]);
}
break;
case DLL_THREAD_DETACH:
@@ -2092,14 +2094,14 @@
} /* initThreadStorage */
-void setThreadValue( FxU32 value ) {
-+void setThreadValue( long value ) {
++void setThreadValue( unsigned long value ) {
GR_CHECK_F( "setThreadValue", !threadInit, "Thread storage not initialized\n" );
TlsSetValue( _GlideRoot.tlsIndex, (void*)value );
}
#pragma warning (4:4035) /* No return value */
-FxU32 getThreadValueSLOW( void ) {
-+long getThreadValueSLOW( void ) {
++unsigned long getThreadValueSLOW( void ) {
GR_CHECK_F( "getThreadValue", !threadInit, "Thread storage not initialized\n" );
#if 0
@@ -2108,7 +2110,7 @@
}
-void setThreadValue( FxU32 value )
-+void setThreadValue( long value )
++void setThreadValue( unsigned long value )
{
_threadValueMacOS = value;
}
@@ -2117,7 +2119,7 @@
#include "fxcmd.h"
-FxU32 threadValueLinux;
-+long threadValueLinux;
++unsigned long threadValueLinux;
void initThreadStorage(void)
{
@@ -2126,13 +2128,13 @@
-void setThreadValue( FxU32 value )
-+void setThreadValue( long value )
++void setThreadValue( unsigned long value )
{
threadValueLinux = value;
}
-FxU32 getThreadValueSLOW( void )
-+long getThreadValueSLOW( void )
++unsigned long getThreadValueSLOW( void )
{
return threadValueLinux;
}
@@ -2199,8 +2201,8 @@
- gc->bufferSwaps[0] = ((FxU32) gc->cmdTransportInfo.fifoPtr -
- (FxU32) gc->cmdTransportInfo.fifoStart);
-+ gc->bufferSwaps[0] = ((long) gc->cmdTransportInfo.fifoPtr -
-+ (long) gc->cmdTransportInfo.fifoStart);
++ gc->bufferSwaps[0] = ((unsigned long) gc->cmdTransportInfo.fifoPtr -
++ (unsigned long) gc->cmdTransportInfo.fifoStart);
gc->swapsPending = 1;
@@ -2209,7 +2211,7 @@
* context.
*/
- setThreadValue( (FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst] );
-+ setThreadValue( (long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
++ setThreadValue( (unsigned long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
{
/* Partial Argument Validation */
@@ -2218,7 +2220,7 @@
gc->buffers0[buffer] = bufInfo->colBuffStart0[buffer];
GDBG_INFO(80, "Buffer %d: Start: 0x%x\n", buffer, gc->buffers0[buffer]);
- gc->lfbBuffers[buffer] = (FxU32)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer];
-+ gc->lfbBuffers[buffer] = (long)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer];
++ gc->lfbBuffers[buffer] = (unsigned long)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer];
if (bInfo->buffInfo.enable2ndbuffer) {
gc->buffers1[buffer] = bufInfo->colBuffStart1[buffer];
GDBG_INFO(80, "Buffer %d: Start: 0x%x\n", buffer, gc->buffers1[buffer]);
@@ -2227,7 +2229,7 @@
gc->buffers0[buffer] = bufInfo->auxBuffStart0;
GDBG_INFO(80, "Aux Buffer: Start: 0x%x\n", gc->buffers0[buffer]);
- gc->lfbBuffers[buffer] = (FxU32)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer];
-+ gc->lfbBuffers[buffer] = (long)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer];
++ gc->lfbBuffers[buffer] = (unsigned long)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer];
if (bInfo->buffInfo.enable2ndbuffer) {
gc->buffers1[buffer] = bufInfo->auxBuffStart1;
GDBG_INFO(80, "Aux Buffer: Start: 0x%x\n", gc->buffers1[buffer]);
@@ -2245,7 +2247,7 @@
#else
/* gc->fbOffset = (FxU32)fxHalFbiGetMemory((SstRegs*)gc->reg_ptr); */
- gc->fbOffset = (FxU32)gc->rawLfb;
-+ gc->fbOffset = (long)gc->rawLfb;
++ gc->fbOffset = (unsigned long)gc->rawLfb;
gc->fbOffset = 0;
gc->tmuMemInfo[0].tramOffset =
(pixelformat == GR_PIXFMT_ARGB_8888) ? 0x400000 : 0x200000;
@@ -2266,7 +2268,7 @@
* crashes' will ensue).
*/
- setThreadValue((FxU32)gc);
-+ setThreadValue((long)gc);
++ setThreadValue((unsigned long)gc);
if ((gc != NULL) && gc->open) grFlush();
/* Make sure that the user specified gc is not whacked */
@@ -2298,8 +2300,8 @@
gc->bufferSwaps[i] =
- (FxU32) gc->cmdTransportInfo.fifoPtr -
- (FxU32) gc->cmdTransportInfo.fifoStart;
-+ (long) gc->cmdTransportInfo.fifoPtr -
-+ (long) gc->cmdTransportInfo.fifoStart;
++ (unsigned long) gc->cmdTransportInfo.fifoPtr -
++ (unsigned long) gc->cmdTransportInfo.fifoStart;
j = i;
}
}
@@ -2317,7 +2319,7 @@
* gc from tls via GR_DCL_GC. F*ck this up at your own peril.
*/
- setThreadValue((FxU32)gc);
-+ setThreadValue((long)gc);
++ setThreadValue((unsigned long)gc);
#if (GLIDE_PLATFORM & GLIDE_OS_WIN32)
/* Flush any remaining commands and cleanup any per gc state */
grSurfaceReleaseContext((GrContext_t)gc);
@@ -2746,7 +2748,7 @@
- numBaseAddrs, /* # base addresses */
- baseAddresses[HWCEXT_MAX_BASEADDR]; /* linear Addresses */
+ FxU32 numBaseAddrs; /* # base addresses */
-+ long baseAddresses[HWCEXT_MAX_BASEADDR]; /* linear Addresses */
++ unsigned long baseAddresses[HWCEXT_MAX_BASEADDR]; /* linear Addresses */
} hwcExtLinearAddrRes_t;
/*
@@ -2784,7 +2786,7 @@
FxBool
initialized;
- FxU32
-+ long
++ unsigned long
linearAddress[HWC_NUM_BASE_ADDR];
} hwcLinearInfo;
@@ -2792,7 +2794,7 @@
FxBool
initialized;
- volatile FxU32
-+ volatile long
++ volatile unsigned long
ioMemBase, /* mem base for I/O aliases */
cmdAGPBase, /* CMD/AGP register base */
waxBase, /* 2D register base */
@@ -2819,8 +2821,8 @@
bInfo->procHandle = getpid();
- bInfo->linearInfo.linearAddress[0]=(FxU32)driInfo.pRegs;
- bInfo->linearInfo.linearAddress[1]=(FxU32)driInfo.pFB;
-+ bInfo->linearInfo.linearAddress[0]=(long)driInfo.pRegs;
-+ bInfo->linearInfo.linearAddress[1]=(long)driInfo.pFB;
++ bInfo->linearInfo.linearAddress[0]=(unsigned long)driInfo.pRegs;
++ bInfo->linearInfo.linearAddress[1]=(unsigned long)driInfo.pFB;
return FXTRUE;
}
@@ -2881,12 +2883,12 @@
static FxBool pciInitializeLinux(void);
static FxBool pciShutdownLinux(void);
-static FxBool pciMapLinearLinux(FxU32, FxU32 physical_addr, FxU32 *linear_addr,
-+static FxBool pciMapLinearLinux(FxU32, FxU32 physical_addr, long *linear_addr,
++static FxBool pciMapLinearLinux(FxU32, FxU32 physical_addr, unsigned long *linear_addr,
FxU32 *length);
-static FxBool pciUnmapLinearLinux(FxU32 linear_addr, FxU32 length);
-static FxBool pciSetPermissionLinux(const FxU32, const FxU32, const FxBool);
-+static FxBool pciUnmapLinearLinux(long linear_addr, FxU32 length);
-+static FxBool pciSetPermissionLinux(const long, const FxU32, const FxBool);
++static FxBool pciUnmapLinearLinux(unsigned long linear_addr, FxU32 length);
++static FxBool pciSetPermissionLinux(const unsigned long, const FxU32, const FxBool);
static FxU8 pciPortInByteLinux(unsigned short port);
static FxU16 pciPortInWordLinux(unsigned short port);
static FxU32 pciPortInLongLinux(unsigned short port);
@@ -2895,7 +2897,7 @@
static FxBool
pciMapLinearLinux(FxU32 bus, FxU32 physical_addr,
- FxU32 *linear_addr, FxU32 *length)
-+ long *linear_addr, FxU32 *length)
++ unsigned long *linear_addr, FxU32 *length)
{
int fd;
if (linuxDevFd!=-1) {
@@ -2904,7 +2906,7 @@
}
}
- if (((*linear_addr)=(FxU32)mmap(0, *length, PROT_READ|PROT_WRITE,
-+ if (((*linear_addr)=(long)mmap(0, *length, PROT_READ|PROT_WRITE,
++ if (((*linear_addr)=(unsigned long)mmap(0, *length, PROT_READ|PROT_WRITE,
MAP_SHARED, fd, physical_addr))<0) {
if (fd!=linuxDevFd) close(fd);
return FXFALSE;
@@ -2913,7 +2915,7 @@
static FxBool
-pciUnmapLinearLinux(FxU32 linear_addr, FxU32 length)
-+pciUnmapLinearLinux(long linear_addr, FxU32 length)
++pciUnmapLinearLinux(unsigned long linear_addr, FxU32 length)
{
- munmap((void*)linear_addr, length);
+ munmap((void *) linear_addr, length);
@@ -2922,7 +2924,7 @@
static FxBool
-pciSetPermissionLinux(const FxU32 addrBase, const FxU32 addrLen,
-+pciSetPermissionLinux(const long addrBase, const FxU32 addrLen,
++pciSetPermissionLinux(const unsigned long addrBase, const FxU32 addrLen,
const FxBool writePermP)
{
return FXTRUE;
@@ -2936,7 +2938,7 @@
- physAddress,
- virtAddress;
+ FxU32 physAddress;
-+ long virtAddress;
++ unsigned long virtAddress;
/* 1) open the PCI device and scan it for devices
* 2) scan the existing devices for a match
@@ -2954,7 +2956,7 @@
FX_EXPORT FxBool FX_CSTYLE
-pciMapPhysicalToLinear( FxU32 *linear_addr, FxU32 physical_addr,
-+pciMapPhysicalToLinear( long *linear_addr, FxU32 physical_addr,
++pciMapPhysicalToLinear( unsigned long *linear_addr, FxU32 physical_addr,
FxU32 *length )
{
return pciMapPhysicalDeviceToLinear(linear_addr,
@@ -2963,7 +2965,7 @@
FX_ENTRY FxBool FX_CALL
-pciMapPhysicalDeviceToLinear(FxU32 *linear_addr,
-+pciMapPhysicalDeviceToLinear(long *linear_addr,
++pciMapPhysicalDeviceToLinear(unsigned long *linear_addr,
FxU32 busNumber, FxU32 physical_addr,
FxU32 *length)
{
@@ -2972,7 +2974,7 @@
FX_EXPORT void FX_CSTYLE
-pciUnmapPhysical( FxU32 linear_addr, FxU32 length )
-+pciUnmapPhysical( long linear_addr, FxU32 length )
++pciUnmapPhysical( unsigned long linear_addr, FxU32 length )
{
int i,j;
@@ -2981,7 +2983,7 @@
FX_EXPORT FxBool FX_CSTYLE
-pciLinearRangeSetPermission(const FxU32 addrBase, const FxU32 addrLen, const FxBool writeableP)
-+pciLinearRangeSetPermission(const long addrBase, const FxU32 addrLen, const FxBool writeableP)
++pciLinearRangeSetPermission(const unsigned long addrBase, const FxU32 addrLen, const FxBool writeableP)
{
return pciLinearRangeSetPermissionDD(addrBase, addrLen, writeableP);
}
@@ -2992,17 +2994,17 @@
*/
FX_ENTRY FxBool FX_CALL
-pciMapPhysicalToLinear(FxU32 *linear_addr, FxU32 physical_addr,FxU32 *length);
-+pciMapPhysicalToLinear(long *linear_addr, FxU32 physical_addr,FxU32 *length);
++pciMapPhysicalToLinear(unsigned long *linear_addr, FxU32 physical_addr,FxU32 *length);
FX_ENTRY FxBool FX_CALL
-pciMapPhysicalDeviceToLinear(FxU32 *linear_addr,
-+pciMapPhysicalDeviceToLinear(long *linear_addr,
++pciMapPhysicalDeviceToLinear(unsigned long *linear_addr,
FxU32 busNumber, FxU32 physical_addr,
FxU32 *length);
FX_ENTRY void FX_CALL
-pciUnmapPhysical( FxU32 linear_addr, FxU32 length );
-+pciUnmapPhysical( long linear_addr, FxU32 length );
++pciUnmapPhysical( unsigned long linear_addr, FxU32 length );
const char *
pciGetVendorName( FxU16 vendor_id );
@@ -3011,7 +3013,7 @@
FX_ENTRY FxBool FX_CALL
-pciLinearRangeSetPermission(const FxU32 addrBase, const FxU32 addrLen, const FxBool writeableP);
-+pciLinearRangeSetPermission(const long addrBase, const FxU32 addrLen, const FxBool writeableP);
++pciLinearRangeSetPermission(const unsigned long addrBase, const FxU32 addrLen, const FxBool writeableP);
#define PCI_ERR_NOERR 0
#define PCI_ERR_WINRTINIT 1
@@ -3023,14 +3025,14 @@
FxBool (*addrMap)(FxU32 busNumber, FxU32 physAddr,
- FxU32* linearAddr, FxU32* length);
- FxBool (*addrUnmap)(FxU32 linearAddr, FxU32 length);
-+ long* linearAddr, FxU32* length);
-+ FxBool (*addrUnmap)(long linearAddr, FxU32 length);
++ unsigned long* linearAddr, FxU32* length);
++ FxBool (*addrUnmap)(unsigned long linearAddr, FxU32 length);
/* Optional things that a platform may or maynot support and clients
* should not rely on the call to suceed.
*/
- FxBool (*addrSetPermission)(const FxU32 addrBase, const FxU32 addrLen,
-+ FxBool (*addrSetPermission)(const long addrBase, const FxU32 addrLen,
++ FxBool (*addrSetPermission)(const unsigned long addrBase, const FxU32 addrLen,
const FxBool writePermP);
FxBool (*msrGet)(MSRInfo* in, MSRInfo* out);
@@ -3233,12 +3235,12 @@
/*
* Perform variance-based color quantization on a 24-bit image.
-@@ -135,16 +135,16 @@
+@@ -135,17 +135,17 @@
Boxes = _Boxes;
#if 0
- Histogram = (ulong *) txMalloc(ColormaxI*ColormaxI*ColormaxI * sizeof(long));
-+ Histogram = (uint *) txMalloc(ColormaxI*ColormaxI*ColormaxI * sizeof(long));
++ Histogram = (uint *) txMalloc(ColormaxI*ColormaxI*ColormaxI * sizeof(uint));
rgbmap = txMalloc((1<<NBITS)*(1<<NBITS)*(1<<NBITS));
#endif
@@ -3248,12 +3250,14 @@
- bzero(Boxes->freq[0], ColormaxI * sizeof(ulong));
- bzero(Boxes->freq[1], ColormaxI * sizeof(ulong));
- bzero(Boxes->freq[2], ColormaxI * sizeof(ulong));
+- bzero(Histogram, ColormaxI * ColormaxI * ColormaxI * sizeof(long));
+ bzero(Boxes->freq[0], ColormaxI * sizeof(uint));
+ bzero(Boxes->freq[1], ColormaxI * sizeof(uint));
+ bzero(Boxes->freq[2], ColormaxI * sizeof(uint));
- bzero(Histogram, ColormaxI * ColormaxI * ColormaxI * sizeof(long));
++ bzero(Histogram, ColormaxI * ColormaxI * ColormaxI * sizeof(uint));
/* Feed all bitmaps & generate histogram */
+ SumPixels = 0;
@@ -153,7 +153,7 @@
h = txMip->height;
for (i=0; i< txMip->depth; i++) {