rpms/Glide3/devel Glide3-fixes.patch, NONE, 1.1 Glide3-gcc4.patch, NONE, 1.1 Glide3-new-autotools-bugfix.patch, NONE, 1.1 Glide3-redhat-cleanup-1.patch, NONE, 1.1 Glide3.spec, NONE, 1.1 glide-ia64.patch, NONE, 1.1 glidelink.c, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Thu Apr 28 18:39:21 UTC 2005
Author: jwrdegoede
Update of /cvs/extras/rpms/Glide3/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28955/devel
Modified Files:
.cvsignore sources
Added Files:
Glide3-fixes.patch Glide3-gcc4.patch
Glide3-new-autotools-bugfix.patch
Glide3-redhat-cleanup-1.patch Glide3.spec glide-ia64.patch
glidelink.c
Log Message:
auto-import Glide3-20010520-35 on branch devel from Glide3-20010520-35.src.rpm
Glide3-fixes.patch:
--- NEW FILE Glide3-fixes.patch ---
--- Glide3/cvg/init/makefile.autoconf.am.fix 2000-07-27 04:39:18.000000000 +0200
+++ Glide3/cvg/init/makefile.autoconf.am 2004-09-04 11:53:34.000000000 +0200
@@ -49,7 +49,7 @@
LDEFS = -DINIT_LINUX $(GLIDE_DEBUG_VDEFS)
-lib_LTLIBRARIES = libsst1init.la
+noinst_LTLIBRARIES = libsst1init.la
libsst1init_la_SOURCES = sst1init.c info.c print.c parse.c \
gamma.c util.c sli.c video.c dac.c \
gdebug.c canopus.c
--- Glide3/cvg/glide3/src/g3df.c.fix 1999-12-07 22:42:32.000000000 +0100
+++ Glide3/cvg/glide3/src/g3df.c 2004-09-04 11:53:34.000000000 +0200
@@ -70,6 +70,7 @@
*/
#include <stdio.h>
#include <string.h>
+#include <ctype.h>
#include <3dfx.h>
@@ -397,7 +398,11 @@
/* This function is not found in libgcc.a */
{
char* tempStr = (char*)color_format;
- while(*tempStr != '\0') *tempStr++ = toupper(*tempStr);
+ while(*tempStr != '\0')
+ {
+ *tempStr = toupper(*tempStr);
+ tempStr++;
+ }
}
#else
{
--- Glide3/cvg/glide3/src/distate.c.fix 1999-12-07 22:42:31.000000000 +0100
+++ Glide3/cvg/glide3/src/distate.c 2004-09-04 11:53:34.000000000 +0200
@@ -166,25 +166,25 @@
*/
#define STOREARG(function, arg) \
-gc->state.stateArgs.##function##Args.arg = arg
+gc->state.stateArgs.function##Args.arg = arg
#define LOADARG(function, arg) \
-gc->state.stateArgs.##function##Args.arg
+gc->state.stateArgs.function##Args.arg
#define INVALIDATE(regset) \
-gc->state.invalid |= ##regset##BIT
+gc->state.invalid |= regset##BIT
#define NOTVALID(regset) \
-(gc->state.invalid & ##regset##BIT)
+(gc->state.invalid & regset##BIT)
#define SETVALID(regset) \
-(gc->state.invalid &= ~(##regset##BIT))
+(gc->state.invalid &= ~(regset##BIT))
#define ENABLEMODE(mode) \
-gc->state.grEnableArgs.##mode## = GR_MODE_ENABLE;
+gc->state.grEnableArgs.mode = GR_MODE_ENABLE;
#define DISABLEMODE(mode) \
-gc->state.grEnableArgs.##mode## = GR_MODE_DISABLE;
+gc->state.grEnableArgs.mode = GR_MODE_DISABLE;
/*-------------------------------------------------------------------
Function: grAlphaBlendFunction
--- Glide3/cvg/glide3/src/fxglide.h.fix 1999-12-07 22:42:31.000000000 +0100
+++ Glide3/cvg/glide3/src/fxglide.h 2004-09-04 11:53:34.000000000 +0200
@@ -1417,7 +1417,7 @@
#ifdef GLIDE3
#define GR_STATE_ENTRY(name, type, args) \
- type _##name## args
+ type _##name args
#else
#define GR_STATE_ENTRY(name, type, args) \
GR_ENTRY(name, type, args)
@@ -2937,7 +2937,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)
@@ -3339,17 +3339,17 @@
#endif
#ifdef GLIDE3_DEBUG
-#define TEX_INFO(ptr,field) ptr##field
+#define TEX_INFO(ptr,field) ptr field
#define G3_LOD_TRANSLATE(lod) (lod)
#define G3_ASPECT_TRANSLATE(aspect) (aspect)
#else /* !GLIDE3_DEBUG */
-#define TEX_INFO(ptr,field) ptr##field##Log2
+#define TEX_INFO(ptr,field) ptr field##Log2
#define G3_LOD_TRANSLATE(lod) (0x8-lod)
#define G3_ASPECT_TRANSLATE(aspect) (0x3-(aspect))
#endif /* !GLIDE3_DEBUG */
#else /* !(defined(GLIDE3) && defined(GLIDE3_ALPHA)) */
-#define TEX_INFO(ptr,field) ptr##field
+#define TEX_INFO(ptr,field) ptr field
#define G3_LOD_TRANSLATE(lod) (lod)
#define G3_ASPECT_TRANSLATE(aspect) (aspect)
#endif /* !(defined(GLIDE3) && defined(GLIDE3_ALPHA)) */
--- Glide3/cvg/glide3/src/makefile.autoconf.am.fix 2000-10-31 04:25:45.000000000 +0100
+++ Glide3/cvg/glide3/src/makefile.autoconf.am 2004-09-04 11:53:34.000000000 +0200
@@ -23,12 +23,6 @@
#
# First the variable definitions.
#
-if HAL_HW
-HAL_HW_VDEFS = -DGLIDE_BLIT_CLEAR=1 \
- -DWTF_P_COMDEX_RESET=1 \
- -DHAL_HW=1
-endif
-
if GLIDE_DEBUG
DEBUG_VDEFS = -DGLIDE_DEBUG \
-DGDBG_INFO_ON \
@@ -40,15 +34,22 @@
GL_AMD3D_VDEFS = -DGL_AMD3D
endif
-if FX_GLIDE_HW_CULL
-FX_GLIDE_HW_VDEFS =
-else
-FX_GLIDE_HW_VDEFS = -DGLIDE_TRI_CULLING=1
-endif
-
if FX_GLIDE_SW_SETUP
FX_GLIDE_SW_SETUP_VDEFS = -DGLIDE_HW_TRI_SETUP=0 \
-DGLIDE_TRI_CULLING=1
+FX_GLIDE_CTRISETUP = 1
+else
+if FX_GLIDE_HW_CULL
+FX_GLIDE_SW_SETUP_VDEFS = -DGLIDE_HW_TRI_SETUP=1
+else
+FX_GLIDE_SW_SETUP_VDEFS = -DGLIDE_HW_TRI_SETUP=1 -DGLIDE_TRI_CULLING=1
+endif
+if FX_HOOPTI_TRI_SETUP_COMPARE
+FX_HOOPTI_TRI_SETUP_COMPARE_VDEFS = -DGLIDE_FP_CLAMP=1 \
+ -DGLIDE_FP_CLAMP_TEX=1 \
+ -DHOOPTI_TRI_SETUP_COMPARE=1 \
+ -DGLIDE_TRI_CULLING=1
+endif
endif
if FX_GLIDE_CTRISETUP
@@ -74,79 +75,106 @@
FX_GLIDE_NO_SPLASH_VDEFS = -DGLIDE_SPLASH
endif
-if FX_HOOPTI_TRI_SETUP_COMPARE
-FX_HOOPTI_TRI_SETUP_COMPARE_VDEFS = -DGLIDE_FP_CLAMP=1 \
- -DGLIDE_FP_CLAMP_TEX=1 \
- -DHOOPTI_TRI_SETUP_COMPARE=1 \
- -DGLIDE_TRI_CULLING=1
-endif
-
if FX_GLIDE_DEBUG_FIFO
FX_GLIDE_DEBUG_FIFO_VDEFS = -DGLIDE_USE_DEBUG_FIFO=1 \
-DFIFO_ASSERT_FULL=1
endif
-include_HEADERS = glide.h
+VDEFS = $(HAL_HW_VDEFS) \
+ $(DEBUG_VDEFS) \
+ $(GL_AMD3D_VDEFS) \
+ $(FX_GLIDE_SW_SETUP_VDEFS) \
+ $(FX_HOOPTI_TRI_SETUP_COMPARE_VDEFS) \
+ $(FX_GLIDE_CTRISETUP_VDEFS) \
+ $(FX_GLIDE_VERTEX_TABLE_VDEFS) \
+ $(FX_GLIDE_NO_PLUG_VDEFS) \
+ $(FX_GLIDE_NO_SPLASH_VDEFS) \
+ $(FX_GLIDE_DEBUG_FIFO_VDEFS)
+
+LDEFS = -DCVG \
+ -DGLIDE_PACKET3_TRI_SETUP=1 \
+ -DGLIDE_CHIP_BROADCAST=1 \
+ -DGLIDE_DISPATCH_SETUP=1 \
+ -DGLIDE_DISPATCH_DOWNLOAD=1 \
+ -DGLIDE_LIB \
+ -DGLIDE3 \
+ -DGLIDE3_ALPHA \
+ -DUSE_PACKET_FIFO=1 \
+ -DGLIDE_BLIT_CLEAR=1 \
+ -DHAL_HW=1 \
+ -DFX_STATIC_BUILD
+
+
+if FX_GLIDE_CTRISETUP
+FX_GLIDE_TRISETUP_SRC = gxdraw.c
+else
+if GL_AMD3D
+FX_GLIDE_TRISETUP_SRC = xtexdl_3dnow.S xdraw2_3dnow.S xdraw3_3dnow.S xdraw2_def.S xdraw3_def.S
+else
+FX_GLIDE_TRISETUP_SRC = xdraw2_def.S xdraw3_def.S
+endif
+endif
+
+#
+# Library definitions.
+#
+
+WHOLE_LIBS = $(top_builddir)/swlibs/fxmisc/libfxmisc.la \
+ $(top_builddir)/swlibs/newpci/pcilib/libfxpci.la \
+ $(top_builddir)/cvg/init/libsst1init.la
+LINK_LIBS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm
+
+CLEANFILES = fxinline.h fxgasm.h
+
+noinst_PROGRAMS = fxgasm
+include_HEADERS = glide.h glideutl.h glidesys.h
+noinst_HEADERS = fxglide.h gsstdef.h gump.h \
+ rcver.h macglide.h
+fxgasm_SOURCES = fxgasm.c
+fxgasm_LDADD =
lib_LTLIBRARIES = libglide3.la
libglide3_la_SOURCES = gsplash.c g3df.c gu.c gpci.c \
diglide.c disst.c ditex.c gbanner.c gerror.c\
digutex.c gaa.c gdraw.c\
gglide.c glfb.c gsst.c gtex.c gtexdl.c\
fifo.c gstrip.c distrip.c distate.c diget.c \
- xtexdl.c cpudtect.s
+ xtexdl.c cpudtect.S \
+ $(FX_GLIDE_TRISETUP_SRC)
+
+libglide3_la_LDFLAGS = -version-info 13:0:10
+libglide3_la_LIBADD = $(WHOLE_LIBS) $(LINK_LIBS)
+
#
# Special rules for assembly files.
#
-PREPROCESSOR=/lib/cpp -$$ -I.
-xdraw2_def.o xdraw2_def.lo: xdraw2.s xdraw2.inc.s fxgasm.h
- $(PREPROCESSOR) $< > $*.tmp.s
- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
- $(CP) $*.o $*.lo
- $(RM) -f $*.tmp.s
-
-xdraw2_3dnow.o xdraw2_3dnow.lo: xdraw2.s xdraw2.inc.s fxgasm.h
- $(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s
- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
- $(CP) $*.o $*.lo
- $(RM) -f $*.tmp.s
-
-xdraw3_def.o xdraw3_def.lo: xdraw3.s fxgasm.h
- $(PREPROCESSOR) $< > $*.tmp.s
- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
- $(CP) $*.o $*.lo
- $(RM) -f $*.tmp.s
-
-xdraw3_3dnow.o xdraw3_3dnow.lo: xdraw3.s fxgasm.h
- $(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s
- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
- $(CP) $*.o $*.lo
- $(RM) -f $*.tmp.s
-
-xtexdl_3dnow.o xtexdl_3dnow.lo: xtexdl.s fxgasm.h
- $(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s
- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
- $(CP) $*.o $*.lo
- $(RM) -f $*.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
+xdraw2_def.o xdraw2_def.lo: xdraw2.S xdraw2.inc.S fxgasm.h
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -c -o $@ $<
+
+xdraw2_3dnow.o xdraw2_3dnow.lo: xdraw2.S xdraw2.inc.S fxgasm.h
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ $<
+
+xdraw3_def.o xdraw3_def.lo: xdraw3.S fxgasm.h
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -c -o $@ $<
+
+xdraw3_3dnow.o xdraw3_3dnow.lo: xdraw3.S fxgasm.h
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ $<
+
+xtexdl_3dnow.o xtexdl_3dnow.lo: xtexdl.S fxgasm.h
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ $<
#--------------------------------------------------------------------------#
# special rules for making fxgasm.h, fxinclude.h
#
fxgasm.h: fxgasm
- ./fxgasm -hex > fxgasm.h
+ ./fxgasm > fxgasm.h
fxinline.h: fxgasm
./fxgasm -inline > fxinline.h
#--------------------------------------------------------------------------#
# special rules for using fxgasm.h, fxinclude.h
#
-diget.o diget.lo gdraw.o gdraw.lo gglide.o gglide.lo gu.o gu.lo: fxinline.h
+diget.o diget.lo gdraw.o gdraw.lo gglide.o gglide.lo gu.o gu.lo gsplash.o gsplash.lo: fxinline.h
xdraw2_def.o xdraw3_def.o xtexdl_def.o: fxinline.h
xdraw2_def.lo xdraw3_def.lo xtexdl_def.lo: fxinline.h
xdraw2_3dnow.o xdraw3_3dnow.o xtexdl_3dnow.o: fxgasm.h
--- Glide3/h3/glide3/src/makefile.autoconf.am.fix 2004-09-04 11:53:34.000000000 +0200
+++ Glide3/h3/glide3/src/makefile.autoconf.am 2004-09-04 11:53:34.000000000 +0200
@@ -94,16 +94,12 @@
else
FX_GLIDE_CTRISETUP_SRC =
if GL_AMD3D
-ASMTRISETUP =
+ASMTRISETUP = xtexdl_3dnow.S xdraw2_3dnow.S xdraw3_3dnow.S xdraw2_def.S xdraw3_def.S
else
-ASMTRISETUP = xdraw2.S xdraw3.S
+ASMTRISETUP = xdraw2_def.S xdraw3_def.S
endif
endif
-if GL_AMD3D
-GL_AMD3D_SRC = xtexdl_3dnow.S xdraw2_3dnow.S xdraw3_3dnow.S
-endif
-
VDEFS = $(FX_CHRIS_DENIS_ANTHONY_HACK_VDEFS) \
$(FX_GLIDE_ALT_TAB_VDEFS) \
$(FX_GLIDE_DIRECT_WRITE_VDEFS) \
@@ -138,33 +134,21 @@
#
# Special rules for assembly files.
#
-xdraw2.o : xdraw2.S xdraw2.inc.S fxgasm.h
- $(CC) $(AFLAGS) -c -o $@ xdraw2.S
+xdraw2_def.lo: xdraw2.S xdraw2.inc.S fxgasm.h
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -c -o $@ $<
-xdraw3.o : xdraw3.S fxgasm.h
- $(CC) $(AFLAGS) -c -o $@ xdraw3.S
+xdraw2_3dnow.lo: xdraw2.S xdraw2.inc.S fxgasm.h
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ $<
-# 3DNow!(tm) dependencies
-# XXX_def.obj targets are the default targets
+xdraw3_def.lo: xdraw3.S fxgasm.h
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -c -o $@ $<
-if GL_AMD3D
-else
-xdraw2_def.o: xdraw2.S xdraw2.inc.S fxgasm.h
- $(CC) $(AFLAGS) -c -o $@ xdraw2.S
+xdraw3_3dnow.lo: xdraw3.S fxgasm.h
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ $<
-xdraw2_3dnow.o: xdraw2.S xdraw2.inc.S fxgasm.h
- $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xdraw2.S
+xtexdl_3dnow.lo: xtexdl.S fxgasm.h
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ $<
-xdraw3_def.o: xdraw3.S fxgasm.h
- $(CC) $(AFLAGS) -c -o $@ xdraw3.S
-
-xdraw3_3dnow.o: xdraw3.S fxgasm.h
- $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xdraw3.S
-
-xtexdl_3dnow.o: xtexdl.S fxgasm.h
- $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xtexdl.S
-
-endif
if DRI_BUILD
gglide.c: $(top_srcdir)/h3/glide3/src/gglide.c.dri
@@ -219,7 +203,7 @@
gglide.c distate.c gstrip.c distrip.c \
diget.c glfb.c gsst.c gtex.c gtexdl.c \
fifo.c xtexdl_def.c cpudtect.S \
- $(VGLIDE_SRC) $(ASMTRISETUP) $(GL_AMD3D_SRC)
+ $(VGLIDE_SRC) $(ASMTRISETUP)
libglide3_la_LDFLAGS = -version-info 13:0:10
libglide3_la_LIBADD = $(WHOLE_LIBS) $(LINK_LIBS)
--- Glide3/h3/glide3/src/distate.c.fix 2000-11-24 19:36:48.000000000 +0100
+++ Glide3/h3/glide3/src/distate.c 2004-09-04 11:53:34.000000000 +0200
@@ -203,23 +203,23 @@
*/
#define STOREARG(function, arg) \
-gc->state.stateArgs.##function##Args.arg = arg
+gc->state.stateArgs.function##Args.arg = arg
#define LOADARG(function, arg) \
-gc->state.stateArgs.##function##Args.arg
+gc->state.stateArgs.function##Args.arg
#define NOTVALID(regset) \
-(gc->state.invalid & ##regset##BIT)
+(gc->state.invalid & regset##BIT)
#define SETVALID(regset) \
-(gc->state.invalid &= ~(##regset##BIT))
+(gc->state.invalid &= ~(regset##BIT))
#define ENABLEMODE(mode) \
-gc->state.grEnableArgs.##mode## = GR_MODE_ENABLE;
+gc->state.grEnableArgs.mode = GR_MODE_ENABLE;
#define DISABLEMODE(mode) \
-gc->state.grEnableArgs.##mode## = GR_MODE_DISABLE;
+gc->state.grEnableArgs.mode = GR_MODE_DISABLE;
/*-------------------------------------------------------------------
Function: grAlphaBlendFunction
--- Glide3/h3/glide3/src/fxglide.h.fix 2000-11-24 19:36:48.000000000 +0100
+++ Glide3/h3/glide3/src/fxglide.h 2004-09-04 11:53:34.000000000 +0200
@@ -1512,7 +1512,7 @@
#ifdef GLIDE3
#define GR_STATE_ENTRY(name, type, args) \
- type _##name## args
+ type _##name args
#else
#define GR_STATE_ENTRY(name, type, args) \
GR_ENTRY(name, type, args)
@@ -1831,7 +1831,7 @@
#define CUR_TRI_PROC(__checkValidP, __cullP) \
(*gc->archDispatchProcs.coorModeTriVector)[__checkValidP][__cullP]
#define INVALIDATE(regset) {\
- gc->state.invalid |= ##regset##BIT; \
+ gc->state.invalid |= regset##BIT; \
gc->triSetupProc = CUR_TRI_PROC(FXTRUE, (gc->state.cull_mode != GR_CULL_DISABLE)); \
}
--- Glide3/h3/glide3/src/g3df.c.fix 1999-11-24 22:44:56.000000000 +0100
+++ Glide3/h3/glide3/src/g3df.c 2004-09-04 11:53:34.000000000 +0200
@@ -72,6 +72,7 @@
*/
#include <stdio.h>
#include <string.h>
+#include <ctype.h>
#include <3dfx.h>
#define FX_DLL_DEFINITION
@@ -401,7 +402,11 @@
/* This function is not found in libgcc.a */
{
char* tempStr = (char*)color_format;
- while(*tempStr != '\0') *tempStr++ = toupper(*tempStr);
+ while(*tempStr != '\0')
+ {
+ *tempStr = toupper(*tempStr);
+ tempStr++;
+ }
}
#else
{
--- Glide3/h3/glide3/src/fxcmd.h.fix 1999-11-24 22:44:55.000000000 +0100
+++ Glide3/h3/glide3/src/fxcmd.h 2004-09-04 11:53:34.000000000 +0200
@@ -1312,7 +1312,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/h3/minihwc/linhwc.c.dri.fix 2000-10-27 12:27:27.000000000 +0200
+++ Glide3/h3/minihwc/linhwc.c.dri 2004-09-04 11:53:34.000000000 +0200
@@ -76,6 +76,13 @@
#define HWC_TILED_BUFFER_Y_ALIGN 0x20000UL
#define HWC_TILED_BUFFER_X_ADJUST 0x80UL
+/* from glide3/src/fifo.c */
+void _grImportFifo(int fifoPtr, int fifoRead);
+void _grExportFifo(int *fifoPtr, int *fifoRead);
+
+/* from glide3/src/distate.c */
+void _grInvalidateAll(void);
+
static hwcInfo hInfo;
static char errorString[1024];
@@ -83,6 +90,7 @@
static FxU32 calcBufferSize(FxU32 xres, FxU32 yres, FxBool tiled);
static FxU32 calcBufferSizeInTiles(FxU32 xres, FxU32 yres);
static FxU32 calcBufferHeightInTiles(FxU32 yres);
+static FxU32 hwcBufferLfbAddr(const hwcBoardInfo *bInfo, FxU32 physAddress);
typedef struct envitem_t {
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 @@
#
# Special rules for assembly files.
#
-PREPROCESSOR=/lib/cpp -$$ -I.
+PREPROCESSOR=/lib/cpp -I.
xdraw2_def.o xdraw2_def.lo: xdraw2.s xdraw2.inc.s fxgasm.h
$(PREPROCESSOR) $< > $*.tmp.s
- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
- $(CP) $*.o $*.lo
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -c -o $@ $*.tmp.s
$(RM) -f $*.tmp.s
xdraw2_3dnow.o xdraw2_3dnow.lo: xdraw2.s xdraw2.inc.s fxgasm.h
$(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s
- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
- $(CP) $*.o $*.lo
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ $*.tmp.s
$(RM) -f $*.tmp.s
xdraw3_def.o xdraw3_def.lo: xdraw3.s fxgasm.h
$(PREPROCESSOR) $< > $*.tmp.s
- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
- $(CP) $*.o $*.lo
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -c -o $@ $*.tmp.s
$(RM) -f $*.tmp.s
xdraw3_3dnow.o xdraw3_3dnow.lo: xdraw3.s fxgasm.h
$(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s
- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
- $(CP) $*.o $*.lo
+ libtool --mode=compile $(CC) -I. $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ $*.tmp.s
$(RM) -f $*.tmp.s
xtexdl_3dnow.o xtexdl_3dnow.lo: xtexdl.s fxgasm.h
$(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s
- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
- $(CP) $*.o $*.lo
+ 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
- $(CC) $(AFLAGS) -c -o $*.o $*.tmp.s
- $(CP) $*.o $*.lo
- $(RM) -f $*.tmp.s
#
# Library definitions.
@@ -196,7 +186,7 @@
FX_GLIDE_CTRISETUP_SRC = gxdraw.c
else
if GL_AMD3D
-FX_GLIDE_CTRISETUP_SRC = xdraw2_3dnow.s xdraw3_3dnow.s
+FX_GLIDE_CTRISETUP_SRC = xdraw2_3dnow.s xdraw3_3dnow.s xtexdl_3dnow.s xdraw2_def.s xdraw3_def.s
else
FX_GLIDE_CTRISETUP_SRC = xdraw2_def.s xdraw3_def.s
endif
--- Glide3/h5/glide3/src/fxglide.h.fix 2000-11-24 19:36:47.000000000 +0100
+++ Glide3/h5/glide3/src/fxglide.h 2004-09-04 11:53:34.000000000 +0200
@@ -2119,7 +2119,7 @@
#ifdef GLIDE3
#define GR_STATE_ENTRY(name, type, args) \
- type _##name## args
+ type _##name args
#else
#define GR_STATE_ENTRY(name, type, args) \
GR_ENTRY(name, type, args)
@@ -2626,13 +2626,13 @@
#define CUR_TRI_PROC(__checkValidP, __cullP) \
(*gc->archDispatchProcs.coorModeTriVector)[__checkValidP][__cullP]
#define INVALIDATE(regset) {\
- gc->state.invalid |= ##regset##BIT; \
+ gc->state.invalid |= regset##BIT; \
gc->triSetupProc = CUR_TRI_PROC(FXTRUE, (gc->state.cull_mode != GR_CULL_DISABLE)); \
}
#define INVALIDATE_TMU(tmu, regset) {\
INVALIDATE(tmuConfig); \
- gc->state.tmuInvalid[tmu] |= ##regset##BIT; \
+ gc->state.tmuInvalid[tmu] |= regset##BIT; \
}
void
--- Glide3/h5/glide3/src/distate.c.fix 2000-11-24 19:36:47.000000000 +0100
+++ Glide3/h5/glide3/src/distate.c 2004-09-04 11:53:34.000000000 +0200
@@ -349,31 +349,31 @@
*/
#define STOREARG_TMU(function, tmu, arg) \
-gc->state.stateArgs.##function##Args.arg[tmu] = arg
+gc->state.stateArgs.function##Args.arg[tmu] = arg
#define LOADARG_TMU(function, tmu, arg) \
-gc->state.stateArgs.##function##Args.arg[tmu]
+gc->state.stateArgs.function##Args.arg[tmu]
#define STOREARG(function, arg) \
-gc->state.stateArgs.##function##Args.arg = arg
+gc->state.stateArgs.function##Args.arg = arg
#define LOADARG(function, arg) \
-gc->state.stateArgs.##function##Args.arg
+gc->state.stateArgs.function##Args.arg
#define NOTVALID(regset) \
-(gc->state.invalid & ##regset##BIT)
+(gc->state.invalid & regset##BIT)
#define NOTVALID_TMU(tmu, regset) \
-(gc->state.tmuInvalid[tmu] & ##regset##BIT)
+(gc->state.tmuInvalid[tmu] & regset##BIT)
#define SETVALID(regset) \
-(gc->state.invalid &= ~(##regset##BIT))
+(gc->state.invalid &= ~(regset##BIT))
#define ENABLEMODE(mode) \
-gc->state.grEnableArgs.##mode## = GR_MODE_ENABLE;
+gc->state.grEnableArgs.mode = GR_MODE_ENABLE;
#define DISABLEMODE(mode) \
-gc->state.grEnableArgs.##mode## = GR_MODE_DISABLE;
+gc->state.grEnableArgs.mode = GR_MODE_DISABLE;
/*-------------------------------------------------------------------
Function: grAlphaBlendFunction
--- Glide3/h5/glide3/src/g3df.c.fix 2000-11-16 00:32:53.000000000 +0100
+++ Glide3/h5/glide3/src/g3df.c 2004-09-04 11:53:34.000000000 +0200
@@ -101,6 +101,7 @@
*/
#include <stdio.h>
#include <string.h>
+#include <ctype.h>
#include <3dfx.h>
#define FX_DLL_DEFINITION
@@ -476,7 +477,11 @@
/* This function is not found in libgcc.a */
{
char* tempStr = (char*)color_format;
- while(*tempStr != '\0') *tempStr++ = toupper(*tempStr);
+ while(*tempStr != '\0')
+ {
+ *tempStr = toupper(*tempStr);
+ tempStr++;
+ }
}
#else
{
--- Glide3/h5/glide3/src/gglide.c.fix 2004-09-07 11:54:18.939373784 +0200
+++ Glide3/h5/glide3/src/gglide.c 2004-09-07 11:55:00.657031736 +0200
@@ -2903,6 +2903,11 @@
GR_END();
#undef FN_NAME
} /* grBufferSwap */
+
+void grBufferSwap(FxU32 i) {
+ grDRIBufferSwap(i);
+}
+
#endif /* defined(__linux__) */
/*---------------------------------------------------------------------------
--- Glide3/swlibs/fxmisc/fxos.c.fix 2000-10-03 20:31:53.000000000 +0200
+++ Glide3/swlibs/fxmisc/fxos.c 2004-09-04 11:53:34.000000000 +0200
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#ifdef WIN32
#include <windows.h>
--- Glide3/swlibs/include/make/3dfx.linux.mak.fix 2000-07-12 23:35:28.000000000 +0200
+++ Glide3/swlibs/include/make/3dfx.linux.mak 2004-09-04 11:53:34.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
+GCOPTS = -Wall -Wno-unknown-pragmas -Wno-unused-value -Wno-unused
ifeq "$(FX_GLIDE_PIC)" "1"
GCPTS := $(GCOPTS) -fPIC -DPIC
endif
@@ -87,7 +87,7 @@
# assembly language in grDrawTriangle. Larger optimization removes
# an extra push in the calling sequence.
#
-CNODEBUG = -O6 -m486 -fomit-frame-pointer -funroll-loops \
+CNODEBUG = $(RPM_OPT_FLAGS) -O6 -fomit-frame-pointer -funroll-loops \
-fexpensive-optimizations -ffast-math -DBIG_OPT
CDEBUG = -g -O
--- Glide3/swlibs/include/make/makefile.autoconf.bottom.fix 2000-08-07 17:24:44.000000000 +0200
+++ Glide3/swlibs/include/make/makefile.autoconf.bottom 2004-09-04 11:53:34.000000000 +0200
@@ -51,11 +51,11 @@
GLIDE_DEBUG_GCFLAGS = -g -O
GLIDE_DEBUG_GDEFS = -DGDBG_INFO_ON -DGLIDE_DEBUG
else
-GLIDE_DEBUG_GCFLAGS = -O6 -m486
+GLIDE_DEBUG_GCFLAGS = $(RPM_OPT_FLAGS) -O6
GLIDE_DEBUG_GDEFS = -fomit-frame-pointer -funroll-loops \
-fexpensive-optimizations -ffast-math -DBIG_OPT
endif
-GCFLAGS = $(GLIDE_DEBUG_GCFLAGS)
+GCFLAGS = $(GLIDE_DEBUG_GCFLAGS) -Wno-unknown-pragmas -Wno-unused-value -Wno-unused
#
# Global DEFS
#
@@ -69,14 +69,13 @@
# Global INCLUDES
#
ifeq ("@FX_GLIDE_HW@","cvg")
-CVG_VINCLUDES= -I$(top_srcdir)/init \
+CVG_VINCLUDES= -I$(top_srcdir)/cvg/init \
-I$(top_srcdir)/cvg/glide3/src \
-I$(top_srcdir)/cvg/incsrc
endif
ifeq ("@FX_GLIDE_HW@","h3")
-H3_VINCLUDES = -I$(top_srcdir)/cinit \
- -I$(top_srcdir)/h3/glide3/src \
+H3_VINCLUDES = -I$(top_srcdir)/h3/glide3/src \
-I$(top_srcdir)/h3/incsrc \
-I$(top_srcdir)/h3/minihwc
endif
--- Glide3/swlibs/include/make/3dfx.mak.fix 2000-10-03 20:25:35.000000000 +0200
+++ Glide3/swlibs/include/make/3dfx.mak 2004-09-04 11:53:34.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
+GCOPTS = -Wall -Wno-unknown-pragmas -Wno-unused-value -Wno-unused
ifeq "$(FX_GLIDE_PIC)" "1"
GCOPTS := $(GCOPTS) -fPIC -DPIC
endif
@@ -120,7 +120,7 @@
# assembly language in grDrawTriangle. Larger optimization removes
# an extra push in the calling sequence.
#
-CNODEBUG = -O6 -m486 -fomit-frame-pointer -funroll-loops \
+CNODEBUG = $(RPM_OPT_FLAGS) -O6 -fomit-frame-pointer -funroll-loops \
-fexpensive-optimizations -ffast-math -DBIG_OPT
CDEBUG = -g -O
--- Glide3/swlibs/newpci/pcilib/fxpci.c.fix 2000-11-27 10:49:33.000000000 +0100
+++ Glide3/swlibs/newpci/pcilib/fxpci.c 2004-09-04 11:53:34.000000000 +0200
@@ -469,7 +469,7 @@
*/
#ifdef __linux__
- if (hasDev3DfxLinux) return pciOpenLinux();
+ if (hasDev3DfxLinux()) return pciOpenLinux();
#endif /* defined(__linux__) */
@@ -649,8 +649,8 @@
pciGetConfigData( PCI_VENDOR_ID, deviceNumber, &vID );
pciGetConfigData( PCI_DEVICE_ID, deviceNumber, &dID );
- // Quick optimization, if there is no device or vendor ID...
- if ((!dID) && (!dID))
+ /* Quick optimization, if there is no device or vendor ID... */
+ if ((!dID) || (!vID))
continue;
if (deviceID == 0xFFFF) /* if special value */
--- Glide3/swlibs/texus2/lib/makefile.autoconf.am.fix 2000-08-25 19:33:26.000000000 +0200
+++ Glide3/swlibs/texus2/lib/makefile.autoconf.am 2004-09-04 11:53:34.000000000 +0200
@@ -33,6 +33,7 @@
noinst_LTLIBRARIES = libtexus.la
noinst_HEADERS = texusint.h
include_HEADERS = texus.h
+libtexus_la_LIBADD = -lm
libtexus_la_SOURCES = texuslib.c clamp.c read.c \
resample.c mipmap.c quantize.c ncc.c nccnnet.c \
pal256.c pal6666.c dequant.c view.c util.c \
Glide3-gcc4.patch:
--- NEW FILE Glide3-gcc4.patch ---
--- 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 @@
e = pointers;
if (mode)
e = *(float **)e;
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
ptX = FARRAY(e, gc->state.vData.vertexInfo.offset);
ptY = FARRAY(e, gc->state.vData.vertexInfo.offset+4);
@@ -673,7 +673,7 @@
if (mode)
e = *(float **)e;
oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset);
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
ptX = FARRAY(e, gc->state.vData.vertexInfo.offset)
*oow*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
@@ -790,9 +790,9 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
if (ltype == GR_LINES)
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
/* 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 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
if (ltype == GR_LINES)
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
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 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
}
@@ -1304,7 +1304,7 @@
b = *(float **)b;
c = *(float **)c;
}
- (float *)pointers += stride*3;
+ pointers = (float *)pointers + stride*3;
/* move culling test to here */
{
@@ -1612,7 +1612,7 @@
b = *(float **)b;
c = *(float **)c;
}
- (float *)pointers += stride*3;
+ pointers = (float *)pointers + stride*3;
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 @@
if (type == kSetupFan) {
v[0] = (mode == 0) ? pointers : *(float **)pointers;
while (sCount--) {
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
if (mode) {
v[1] = *(float **)pointers;
v[2] = *((float **)pointers+1);
@@ -1819,7 +1819,7 @@
_grAADrawTriangles(1, type, 3, v);
else
_grAAVpDrawTriangles(1, type, 3, v);
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
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 @@
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),
@@ -488,7 +488,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;
@@ -610,9 +610,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
@@ -772,10 +772,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;
@@ -785,7 +785,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)
@@ -936,7 +936,7 @@
vPtr = pointers;
if (mode)
vPtr = *(float **)vPtr;
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
i = gc->tsuDataList[dataElem];
@@ -976,7 +976,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/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/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 @@
e = pointers;
if (mode)
e = *(float **)e;
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
ptX = FARRAY(e, gc->state.vData.vertexInfo.offset);
ptY = FARRAY(e, gc->state.vData.vertexInfo.offset+4);
@@ -715,7 +715,7 @@
if (mode)
e = *(float **)e;
oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset);
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
ptX = FARRAY(e, gc->state.vData.vertexInfo.offset)
*oow*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
@@ -837,9 +837,9 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
if (ltype == GR_LINES)
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
/* 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 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
if (ltype == GR_LINES)
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
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 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
}
@@ -1366,7 +1366,7 @@
b = *(float **)b;
c = *(float **)c;
}
- (float *)pointers += stride*3;
+ pointers = (float *)pointers + stride*3;
/* move culling test to here */
{
@@ -1540,7 +1540,7 @@
b = *(float **)b;
c = *(float **)c;
}
- (float *)pointers += stride*3;
+ pointers = (float *)pointers + stride*3;
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 @@
if (type == kSetupFan) {
v[0] = (mode == 0) ? pointers : *(float **)pointers;
while (sCount--) {
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
if (mode) {
v[1] = *(float **)pointers;
v[2] = *((float **)pointers+1);
@@ -1747,7 +1747,7 @@
_grAADrawTriangles(1, type, 3, v);
else
_grAAVpDrawTriangles(1, type, 3, v);
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
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 @@
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),
@@ -660,7 +660,7 @@
if (mode)
vPtr = *(float **)vPtr;
oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset);
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
{
float fx, fy;
@@ -794,9 +794,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
@@ -956,10 +956,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;
@@ -969,7 +969,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)
@@ -1116,7 +1116,7 @@
vPtr = pointers;
if (mode)
vPtr = *(float **)vPtr;
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
i = gc->tsuDataList[dataElem];
@@ -1156,7 +1156,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/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/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 @@
e = pointers;
if (mode)
e = *(float **)e;
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
ptX = FARRAY(e, gc->state.vData.vertexInfo.offset);
ptY = FARRAY(e, gc->state.vData.vertexInfo.offset+4);
@@ -727,7 +727,7 @@
if (mode)
e = *(float **)e;
oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset);
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
ptX = FARRAY(e, gc->state.vData.vertexInfo.offset)
*oow*gc->state.Viewport.hwidth+gc->state.Viewport.ox;
@@ -851,9 +851,9 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
if (ltype == GR_LINES)
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
/* 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 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
if (ltype == GR_LINES)
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
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 @@
v1 = *(float **)v1;
v2 = *(float **)v2;
}
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
owb = oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
}
@@ -1384,7 +1384,7 @@
b = *(float **)b;
c = *(float **)c;
}
- (float *)pointers += stride*3;
+ pointers = (float *)pointers + stride*3;
/* move culling test to here */
{
@@ -1558,7 +1558,7 @@
b = *(float **)b;
c = *(float **)c;
}
- (float *)pointers += stride*3;
+ pointers = (float *)pointers + stride*3;
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 @@
if (type == kSetupFan) {
v[0] = (mode == 0) ? pointers : *(float **)pointers;
while (sCount--) {
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
if (mode) {
v[1] = *(float **)pointers;
v[2] = *((float **)pointers+1);
@@ -1765,7 +1765,7 @@
_grAADrawTriangles(1, type, 3, v);
else
_grAAVpDrawTriangles(1, type, 3, v);
- (float *)pointers += stride;
+ pointers = (float *)pointers + stride;
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);
}
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-new-autotools-bugfix.patch:
--- NEW FILE Glide3-new-autotools-bugfix.patch ---
Fixup for new autotools for rawhide. <mharris at redhat.com>
--- h3/glide3/src/makefile.autoconf.am.new-autotools-bugfix Wed May 29 11:54:04 2002
+++ h3/glide3/src/makefile.autoconf.am Wed May 29 11:55:46 2002
@@ -208,7 +208,8 @@
noinst_HEADERS = fxglide.h gsstdef.h gsfc.h \
fxcmd.h fxsplash.h tv.h rcver.h qmodes.h \
macglide3.h
-fxgasm_SOURCES = fxgasm.c gthread.c
+fxgasm_SOURCES = fxgasm.c
+fxgasm_LDADD = gthread.lo
lib_LTLIBRARIES = libglide3.la
libglide3_la_SOURCES = fxinline.h fxgasm.h \
--- h5/glide3/src/makefile.autoconf.am.new-autotools-bugfix Wed May 29 11:56:58 2002
+++ h5/glide3/src/makefile.autoconf.am Wed May 29 11:58:15 2002
@@ -221,8 +221,8 @@
gsfc.h gsstdef.h \
qmodes.h tv.h \
fxgasm.h fxinline.h
-fxgasm_SOURCES = fxgasm.c gthread.c
-fxgasm_DEPENDENCIES = gthread.lo
+fxgasm_SOURCES = fxgasm.c
+fxgasm_LDADD = gthread.lo
lib_LTLIBRARIES = libglide3.la
libglide3_la_SOURCES = fxinline.h fxgasm.h \
Glide3-redhat-cleanup-1.patch:
--- NEW FILE Glide3-redhat-cleanup-1.patch ---
--- Glide3/swlibs/texus2/lib/read.c.cleanup-fixes Wed Sep 26 03:40:48 2001
+++ Glide3/swlibs/texus2/lib/read.c Wed Sep 26 03:51:08 2001
@@ -40,8 +40,8 @@
{
FxU32 cookie;
int c;
- int fformat; // format of the image file.
- int status;
+ int fformat; // format of the image file.
+ int status = 0;
if ( stream == NULL ) {
txError("Bad file handle.");
@@ -52,13 +52,13 @@
txError("Unexpected end of file");
return 0;
}
- cookie = (c << 8);
+ cookie = (c << 8);
if ((c=getc( stream )) == EOF ) {
txError("Unexpected end of file");
return 0;
}
- cookie |= c;
+ cookie |= c;
switch( cookie )
{
@@ -68,37 +68,37 @@
case ('3' << 8) | 'D': fformat = TX_3DF; break;
case 0x01DA: // byte swapped RGT file.
case 0xDA01: fformat = TX_RGT; break;
- case ('T' << 8) | 'X': fformat = TX_TXS; break;
+ case ('T' << 8) | 'X': fformat = TX_TXS; break;
default: fformat = TX_UNK; break;
}
switch (fformat) {
case TX_SBI: status = _txReadSBIHeader( stream, cookie, info ); break;
case TX_RGT: status = _txReadRGTHeader( stream, cookie, info ); break;
- case TX_TXS: status = _txReadTXSHeader( stream, info, FXFALSE ); break;
+ case TX_TXS: status = _txReadTXSHeader( stream, info, FXFALSE ); break;
case TX_PPM: status = _txReadPPMHeader( stream, cookie, info ); break;
case TX_3DF: status = _txRead3DFHeader( stream, cookie, info ); break;
case TX_UNK: status = _txReadTGAHeader( stream, cookie, info ); break;
}
- /* Not reached. */
- return (status) ? fformat : 0;
+ /* Not reached. */
+ return (status) ? fformat : 0;
}
static FxBool
_txReadData( FILE *stream, int fformat, TxMip *info )
{
- switch (fformat) {
+ switch (fformat) {
case TX_SBI: return _txReadSBIData( stream, info );
case TX_RGT: return _txReadRGTData( stream, info );
case TX_PPM: return _txReadPPMData( stream, info );
case TX_3DF: return _txRead3DFData( stream, info );
- case TX_TXS: return _txReadTXSData( stream, info );
- case TX_UNK: return _txReadTGAData( stream, info );
+ case TX_TXS: return _txReadTXSData( stream, info );
+ case TX_UNK: return _txReadTGAData( stream, info );
}
- /* Not reached. */
- return FXFALSE;
+ /* Not reached. */
+ return FXFALSE;
}
@@ -110,10 +110,10 @@
file = fopen(filename, "rb");
if( file == NULL )
- {
+ {
fprintf( stderr,"Error: can't open input file %s\n", filename );
exit(2);
- }
+ }
retval = txMipReadFromFP( txMip, filename, file, prefFormat );
fclose(file);
@@ -129,10 +129,10 @@
if ((prefFormat != GR_TEXFMT_ARGB_8888) &&
(prefFormat != GR_TEXFMT_ANY))
- {
+ {
txPanic("txMipRead: bad preferred format.");
return FXFALSE;
- }
+ }
if ( (format = _txReadHeader( file, txMip )) == 0 ) {
fprintf(stderr,"Error: reading info for %s, %s\n",
@@ -140,12 +140,12 @@
exit(2);
}
if( txVerbose )
- {
+ {
fprintf(stderr,"Loading image file ");
fprintf (stderr,"%s (%dw x %dh x %d Bpp x %d mips) .. ", debug_filename,
txMip->width,txMip->height, GR_TEXFMT_SIZE(txMip->format), txMip->depth);
- }
+ }
/*
* Allocate memory requested in data[0];
@@ -181,7 +181,6 @@
fprintf(stderr," done.\n");
if (prefFormat == GR_TEXFMT_ANY) return FXTRUE;
-
/*
* Now convert to ARGB8888 if requested.
*/
@@ -191,15 +190,13 @@
txTrue.depth = txMip->depth;
if (txMipAlloc(&txTrue) == FXFALSE) return FXFALSE;
-
/*
* Dequantize from src to dest.
*/
if( txVerbose )
- {
-
+ {
fprintf(stderr, "Dequantizing Input from %s to argb8888.\n", Format_Name[txMip->format]);
- }
+ }
txMipDequantize(&txTrue, txMip);
--- Glide3/swlibs/texus2/lib/quantize.c.cleanup-fixes Wed Sep 26 03:46:40 2001
+++ Glide3/swlibs/texus2/lib/quantize.c Wed Sep 26 03:50:30 2001
@@ -28,10 +28,11 @@
#include "texusint.h"
static int
-dithmat[4][4] = { 0, 8, 2, 10,
- 12, 4, 14, 6,
- 3, 11, 1, 9,
- 15, 7, 13, 5 };
+dithmat[4][4] = { { 0, 8, 2, 10 },
+ { 12, 4, 14, 6 },
+ { 3, 11, 1, 9 },
+ { 15, 7, 13, 5 }
+};
// for error diffusion.
static int errR[MAX_TEXWIDTH], errG[MAX_TEXWIDTH], errB[MAX_TEXWIDTH];
@@ -1114,7 +1115,7 @@
int w, int h,
FxU32 format, FxU32 dither)
{
- int (*quantizer)(unsigned long argb, int x, int y, int w);
+ int (*quantizer)(unsigned long argb, int x, int y, int w) = NULL;
int x, y;
dither &= TX_DITHER_MASK;
@@ -1203,7 +1204,7 @@
case GR_TEXFMT_YUYV_422:
case GR_TEXFMT_UYVY_422:
case GR_TEXFMT_AYUV_444:
- case GR_TEXFMT_RGB_888: quantizer = NULL;
+ case GR_TEXFMT_RGB_888: quantizer = NULL;
break;
default: txPanic("Bad texture format in txQuantize()\n");
--- Glide3/swlibs/texus2/lib/ncc.c.cleanup-fixes Wed Sep 26 03:51:57 2001
+++ Glide3/swlibs/texus2/lib/ncc.c Wed Sep 26 03:53:28 2001
@@ -26,12 +26,12 @@
#include "texusint.h"
static int
-dithmat[4][4] = { 0, 8, 2, 10,
- 12, 4, 14, 6,
- 3, 11, 1, 9,
- 15, 7, 13, 5 };
+dithmat[4][4] = {{ 0, 8, 2, 10},
+ { 12, 4, 14, 6},
+ { 3, 11, 1, 9},
+ { 15, 7, 13, 5}};
-static struct {
+static struct {
int yhist[256], ihist[256], qhist[256];
int ymin, ymax, imin, imax, qmin, qmax;
int npixels;
--- Glide3/swlibs/texus2/lib/nccnnet.c.cleanup-fixes Wed Sep 26 03:57:00 2001
+++ Glide3/swlibs/texus2/lib/nccnnet.c Wed Sep 26 04:02:45 2001
@@ -1,4 +1,3 @@
-
/*
** Copyright (c) 1995, 3Dfx Interactive, Inc.
** All Rights Reserved.
@@ -409,7 +408,7 @@
txMapPal256toYAB((FxU32 *)yabTable, (FxU8 *)map, ncolors, (FxU32 *)pxMip->pal);
if( txVerbose )
{
- printf("eMax=(%3d%3d%3d)...eAvg=(%3d%3d%3d)\n",
+ printf("eMax=(%3l%3l%3l)...eAvg=(%3l%3l%3l)\n",
errG, errR, errB,
totG/ncolors, totR/ncolors, totB/ncolors
);
--- Glide3/swlibs/texus2/lib/txs.c.cleanup-fixes Wed Sep 26 04:17:57 2001
+++ Glide3/swlibs/texus2/lib/txs.c Wed Sep 26 04:24:50 2001
@@ -64,7 +64,8 @@
if ( output_info )
{
- printf("cookie = %s\nversion = %f\nformat = %s (%d)\nwidth = %d\nheight = %d\nmipmap_levels = %d\ndata_offset = %#010x\n\n",
+ printf("cookie = %s\nversion = %f\nformat = %s (%d)\nwidth = %d\nheight = %d\n"
+ "mipmap_levels = %d\ndata_offset = %#010x\n\n",
cookie, info->version, Format_Name[info->format], info->format,
info->width, info->height, info->mipmap_levels, data_offset);
--- NEW FILE Glide3.spec ---
Name: Glide3
Version: 20010520
Release: 35
Summary: Glide runtime for the 3Dfx Voodoo family of cards
# Glide3 is x86/alpha/ia64/x86_64 only, ia64 and x86_64 are untested
ExclusiveArch: %{ix86} alpha ia64 x86_64
Group: User Interface/X Hardware Support
License: 3DFX GLIDE Source Code General Public License
URL: http://glide.sourceforge.net
# Create the Glide3 tarball by using:
# cvs -d :pserver:anonymous at cvs.glide.sourceforge.net:/cvsroot/glide co Glide3
# pushd Glide3 ; find . -name CVS -type d |xargs rm -rf
# find . -name .cvsignore | xargs rm ; popd
# tar jcf Glide3-$(date +"%Y%m%d").tar.bz2 Glide3/
Source0: %{name}-%{version}.tar.bz2
Source1: glidelink.c
Patch0: glide-ia64.patch
Patch1: Glide3-new-autotools-bugfix.patch
Patch2: Glide3-redhat-cleanup-1.patch
Patch3: Glide3-fixes.patch
Patch4: Glide3-gcc4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: automake14 autoconf xorg-x11-devel
# XFree86-libs 4.1.0 contained a local copy of Glide3 so we conflict it
Conflicts: XFree86-libs = 4.1.0
%description
Glide3 provides the necessary low-level interface glue between the Mesa
3D graphics library, and 3Dfx Voodoo series of hardware. This package is
required by the XFree86 tdfx driver in order to provide 3D acceleration
support for the 3Dfx Voodoo 3/4/5 and Voodoo Banshee hardware.
%package devel
Summary: Development libraries and headers for Glide
Group: Development/Libraries
Requires: Glide3 = %{version}
Conflicts: XFree86-devel = 4.1.0
%description devel
Glide3-devel contains the developmental files that must be installed in order
to recompile XFree86 on platforms which 3Dfx harware 3D acceleration is
supported on.
%prep
%setup -q -n Glide3
%ifarch x86_64 ia64 alpha
%patch0 -p1 -b .glide-ia64
%endif
%patch1 -p0 -b .new-autotools-bugfix
%patch2 -p1 -b .redhat-cleanup-1
%patch3 -p1 -b .fix
%patch4 -p1 -b .gcc4
%build
aclocal-1.4
libtoolize --copy --force
automake-1.4 -a
autoconf
mkdir build-5
cd build-5
../configure \
--enable-fx-debug=no \
--enable-fx-glide-hw=h5 \
--enable-fx-dri-build \
--prefix=/usr
make -f makefile.autoconf all
cd ..
mkdir build-3
cd build-3
../configure \
--enable-fx-debug=no \
--enable-fx-glide-hw=h3 \
--enable-fx-dri-build \
--prefix=/usr
make -f makefile.autoconf all
cd ..
mkdir build-2
cd build-2
../configure \
--enable-fx-debug=no \
--enable-fx-glide-hw=cvg \
--prefix=/usr
make -f makefile.autoconf all
cd ..
%install
rm -rf $RPM_BUILD_ROOT
cd build-5
make -f makefile.autoconf install DESTDIR=$RPM_BUILD_ROOT
%define libver 3.10.0
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
mv $RPM_BUILD_ROOT%{_libdir}/libglide3.so.%{libver} \
$RPM_BUILD_ROOT/%{_libdir}/libglide3-v5.so
install -m 755 ../build-3/h3/glide3/src/.libs/libglide3.so.%{libver} \
$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?
ln -snf libglide3-v2.so $RPM_BUILD_ROOT%{_libdir}/libglide3.so.%{libver}
ln -snf libglide3.so.%{libver} $RPM_BUILD_ROOT%{_libdir}/libglide3.so.3
# We are not installing these, so lets delete them
rm -f $RPM_BUILD_ROOT%{_libdir}/libglide3.{a,la}
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/libglide3.so.3
%{_libdir}/libglide3.so.%{libver}
%{_libdir}/libglide3-v2.so
%{_libdir}/libglide3-v3.so
%{_libdir}/libglide3-v5.so
%files devel
%defattr(-,root,root,-)
%dir %{_includedir}/glide3
%{_includedir}/glide3/*
%{_libdir}/libglide3.so
%changelog
* Tue Apr 26 2005 Hans de Goede <j.w.r.degoede at hhs.nl>
- added x86_64 to ExclusiveArch list
- apply glide-ia64.patch for x86_64
- added Glide3-gcc4.patch which fixes all gcc4 errors
- first attempt to clean up the specfile a bit
* Sat Sep 4 2004 Hans de Goede <j.w.r.degoede at hhs.nl>
- added Glide3-fixes.patch which:
* Generally do everything needed to get this to compile on FC3test1
* replaces gcc3-patch with a patch which fixes the macros instead of
the caller of the macros
* replaces and fixes libtool patch
* replaces and improves gcc34 patch
* also fix this all for voodoo2
* fixes a bug in g3df.c which caused some of the test programs to fail
- also compile for Voodoo 2 (cvg)
- do the make install for the Voodoo 5 (h5) build not the (h3) since the
h5 headers define some additional texture types which Mesa 6 needs to compile
- made the symlink point to voodoo2 by default, since the XFree included mesa
which is used for h3 and h5 knows how to load the correct Glide itself.
Maybe we should reintroduce glidelink, since the symlink will still be needed
for native glide apps on h3 and h5.
- removed unused automake version detection macros
- removed Prereq ldconfig, rpm should pick this up automaticly
- removed conflicting parts from glide-ia64 patch, these are all handled
in an architecture indepent way in Glide3-fixes.patch, move it back to
position 0.
* Mon Jul 5 2004 Mike A. Harris <mharris at redhat.com> 20010520-33
- Moved glide-ia64 patch from position 0 to position 50 as we no longer
build Glide3 on these architectures. The patch should be reworked to apply
cleanly after all of the other patches we apply that are required for our
real builds. Currently it will just fail to apply. (#126734)
* Wed Jun 23 2004 Mike A. Harris <mharris at redhat.com>
- Fixed missing dependancy in Glide3
* Fri Jun 18 2004 Alan Cox <alan at redhat.com>
- Fixed gcc 3.4 compile breakage. It remains to see if it works. If not
I'd try turning off aliasing in gcc
* Tue Jun 15 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt
* Fri Mar 19 2004 Mike A. Harris <mharris at redhat.com> 20010520-30
- Fixes from Alan Cox, who got Glide3 to build in Fedora Core devel:
- Added Glide3-gcc3.patch, Glide3-new-libtool.patch
- Use aclocal instead of aclocal-1.4, and automake instead of automake-1.4
- Run aclocal before libtoolize
- Added with_glide3_devel macro, enabled by default for now, which disables
the creation of the Glide3-devel subpackage. XFree86 4.2.0 and later seem
to dlopen() Glide3 now and not require it during build time, so there is not
any need to include Glide3-devel any longer. This needs to be install
tested and runtime tested first however, so we still include Glide3-devel
for now.
- Changed Prereq: /sbin/ldconfig to Requires(post,postun): /sbin/ldconfig
* Fri Feb 27 2004 Mike A. Harris <mharris at redhat.com> 20010520-29
- Added COPYING file to %%doc in files list (#115945)
* Thu Jan 29 2004 Mike A. Harris <mharris at redhat.com> 20010520-28
- Rebuild for Fedora Core 2
* Mon Sep 1 2003 Mike A. Harris <mharris at redhat.com> 20010520-27
- Rebuild 20010520-26 for Cambridge, for self hosting chocolatey goodness
- ia64 wont compile anymore and the problems are far too large to bother
fixing. Glide3 is now supported only on x86/alpha
* Tue Aug 5 2003 Elliot Lee <sopwith at redhat.com> 20010520-26
- Fix autoconf version
* Wed Jan 22 2003 Tim Powers <timp at redhat.com> 20010520-25
- rebuilt
* Fri Dec 20 2002 Mike A. Harris <mharris at redhat.com> 20010520-24
- Reworded the -devel package description for bug (#79477)
* Mon Nov 25 2002 Mike A. Harris <mharris at redhat.com> 20010520-23
- Bump and rebuild to pick up Alpha which did not get built in -22 somehow
* Sat Nov 23 2002 Mike A. Harris <mharris at redhat.com> 20010520-22
- Moved comment from XFree86 package to here on how to create Glide3 tarball
* Fri Nov 22 2002 Mike A. Harris <mharris at redhat.com> 20010520-21
- Remove /usr/lib/libglide3.{a,la} from buildroot since we dont ship them
- Use _libdir, _includedir everywhere
- Remove redundant ExcludeArch directive for s390
* Thu Oct 3 2002 Mike A. Harris <mharris at redhat.com> 20010520-20
- All-arch rebuild
- Added "Exclusivearch: {ix86}, alpha, ia64" as Glide3 is not ported to
other arches and likely never ever will be. That way lays madness.
* Fri Jun 21 2002 Tim Powers <timp at redhat.com> 20010520-18
- automated rebuild
* Wed May 29 2002 Elliot Lee <sopwith at redhat.com> 20010520-17
- Make it specify the auto* tool versions explicitly.
* Tue May 28 2002 Mike A. Harris <mharris at redhat.com> 20010520-16
- Rebuilt with gcc 3.1 with new GNU autoconk/autobreak/libfool
- Added Glide3-new-autotools-bugfix.patch to fix problems with Glide automake
files.
* Wed Apr 3 2002 Mike A. Harris <mharris at redhat.com> 20010520-13
- Removed glidelink cruft entirely.
- Simplified spec install stage, filelist, etc to minimize error potential
- Fixed dangling symlink bug (#61521)
* Sun Mar 10 2002 Mike A. Harris <mharris at redhat.com> 20010520-12
- Removed all the old /usr/lib/lib* files, and removed the /usr/lib/glide3
directory. Moved the Voodoo 3 and voodoo 5 glide libs directly into
/usr/lib where the XFree86 4.2.0 tdfx dri driver will load them automatically.
* Thu Feb 21 2002 Mike A. Harris <mharris at redhat.com> 20010520-11
- Made glidelink conditional, and disabled by default, as it is not needed
in XFree86 4.2.0 as Mesa now loads the proper Glide3 library on its own.
- Added buildrequires kudzu-devel (#59960)
* Sat Jan 26 2002 Mike A. Harris <mharris at redhat.com> 20010520-10
- Added autoconf version detection and override via __automake so Glide3 will
build on any Red Hat Linux 7.* or rawhide system without specfile editing.
- Added -q flag to setup section
* Fri Jan 25 2002 Mike A. Harris <mharris at redhat.com> 20010520-9
- Fixed a build failure on ia64 with the ia64 patch
* Fri Jan 25 2002 Mike A. Harris <mharris at redhat.com> 20010520-8
- Undeprecated the Glide3 package that was merged into XFree86 packaging as
it seemed to create more problems than it solved. Took the RHL 7.2 package
as a starting point, and deintegrated Glide from the XFree86 4.2.0 package
back to separate packaging. Bumped release up to -8
- Changed Copyright tag to License
- Added Glide3-redhat-cleanup-1.patch to clean up some compiler warnings.
- Added Conflicts: XFree86-libs = 4.1.0 and Conflicts: XFree86-devel = 4.1.0
- Fixed BuildRoot with _tmppath
* Mon Feb 19 2001 Bill Nottingham <notting at redhat.com>
- fix typo in ia64 patch, only apply patch on alpha/ia64 (#27889)
* Thu Dec 21 2000 Bill Nottingham <notting at redhat.com>
- fix alpha asm (rth at redhat.com)
* Wed Dec 20 2000 Bill Nottingham <notting at redhat.com>
- update CVS
- build in 7.1 tree
* Wed Aug 23 2000 Bill Nottingham <notting at redhat.com>
- initial packaging
glide-ia64.patch:
--- NEW FILE glide-ia64.patch ---
--- Glide3/cvg/glide3/src/makefile.linux.ia64-foo Thu Dec 21 14:30:58 2000
+++ Glide3/cvg/glide3/src/makefile.linux Thu Dec 21 14:31:48 2000
@@ -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/h3/glide3/src/cpudtect.S.ia64-foo Wed Nov 24 16:44:53 1999
+++ Glide3/h3/glide3/src/cpudtect.S Thu Dec 21 16:38:48 2000
@@ -48,7 +48,30 @@
/* 2 3/04/97 9:10p Dow */
/* Neutered mutiplatform multiheaded monster. */
+#ifdef __ia64__
+ .align 32
+ .global _cpu_detect_asm
+ .proc _cpu_detect_asm
+
+_cpu_detect_asm:
+ mov ret0=0
+ br.ret.sptk.few b0
+
+ .end _cpu_detect_asm
+
+#elif defined(__alpha__) /* !__ia64__ */
+
+ .align 4
+ .globl _cpu_detect_asm
+ .ent _cpu_detect_asm
+_cpu_detect_asm:
+ .prologue 0
+ mov $31,$0
+ ret $31,($26),1
+ .end _cpu_detect_asm
+
+#else /* !__ia64__ */
.file "cpudtect.asm"
@@ -324,3 +347,5 @@
.size double_precision_asm,.L_END_double_precision_asm-double_precision_asm
.end
+
+#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 @@
break;
case GR_SURFACE_TEXTURE:
- if (plength == 4) {
+ if (plength == sizeof(long)) {
GR_DCL_GC;
- *params = (FxU32) &gc->tBuffer;
+ *(long *)params = (long) &gc->tBuffer;
retVal = plength;
}
break;
--- Glide3/h3/glide3/src/disst.c.ia64-foo Wed Nov 24 16:44:54 1999
+++ Glide3/h3/glide3/src/disst.c Thu Dec 21 14:27:40 2000
@@ -183,7 +183,7 @@
GrErrorCallback( "grSstSelect: non-existent SST", FXTRUE );
_GlideRoot.current_sst = which;
- setThreadValue( (FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst] );
+ setThreadValue( (long)&_GlideRoot.GCs[_GlideRoot.current_sst] );
#ifdef GLIDE_MULTIPLATFORM
_GlideRoot.curGCFuncs = _GlideRoot.curGC->gcFuncs;
--- Glide3/h3/glide3/src/distrip.c.ia64-foo Wed Nov 24 16:44:54 1999
+++ Glide3/h3/glide3/src/distrip.c Thu Dec 21 14:27:40 2000
@@ -544,10 +544,10 @@
else {
void *b_ptr, *c_ptr;
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);
TRISETUP(pointers, b_ptr, c_ptr);
- pointers = (void *)((FxU32)c_ptr + stride);
+ pointers = (void *)((long)c_ptr + stride);
Count -= 3;
}
}
--- Glide3/h3/glide3/src/fifo.c.ia64-foo Wed Nov 24 16:44:55 1999
+++ Glide3/h3/glide3/src/fifo.c Thu Dec 21 14:27:40 2000
@@ -475,7 +475,7 @@
} ;
-#define GEN_INDEX(a) ((((FxU32) a) - ((FxU32) gc->reg_ptr)) >> 2)
+#define GEN_INDEX(a) ((((long) a) - ((long) gc->reg_ptr)) >> 2)
void
_grFifoWriteDebug(FxU32 addr, FxU32 val, FxU32 fifoPtr)
@@ -833,7 +833,9 @@
gc->contextP = 1;
#endif
if (gc->contextP) {
+#if 0
FxU32 wrapAddr = 0x00UL;
+#endif
FxU32 checks;
GR_ASSERT(blockSize > 0);
@@ -973,7 +975,9 @@
P6FENCE;
+#if 0
wrapAddr = (FxU32)gc->cmdTransportInfo.fifoPtr;
+#endif
/* Update roomXXX fields for the actual wrap */
gc->cmdTransportInfo.roomToReadPtr -= gc->cmdTransportInfo.roomToEnd;
@@ -1047,10 +1051,10 @@
}
-FxU32
+long
_grHwFifoPtr(FxBool ignored)
{
- FxU32 rVal = 0;
+ long rVal = 0;
FxU32 status, readPtrL1, readPtrL2;
GR_DCL_GC;
@@ -1069,7 +1073,7 @@
#endif
readPtrL2 = GET(gc->cRegs->cmdFifo0.readPtrL);
} while (readPtrL1 != readPtrL2);
- rVal = (((FxU32)gc->cmdTransportInfo.fifoStart) +
+ rVal = (((long)gc->cmdTransportInfo.fifoStart) +
readPtrL2 -
(FxU32)gc->cmdTransportInfo.fifoOffset);
}
@@ -1191,13 +1195,13 @@
gcFifo=&gc->cmdTransportInfo;
readPos=readPos-gcFifo->fifoOffset;
gcFifo->fifoPtr = gcFifo->fifoStart + (readPos>>2);
- gcFifo->fifoRead = (FxU32)gcFifo->fifoPtr;
+ gcFifo->fifoRead = (long)gcFifo->fifoPtr;
#else
gcFifo=&gc->cmdTransportInfo;
gcFifo->fifoPtr = gc->rawLfb+(fifoPtr>>2);
gcFifo->fifoRead = ((int)gc->rawLfb)+fifoRead;
#endif
- gcFifo->roomToReadPtr = gcFifo->fifoRead-((int)gcFifo->fifoPtr)-FIFO_END_ADJUST-sizeof(FxU32);
+ gcFifo->roomToReadPtr = gcFifo->fifoRead-((long)gcFifo->fifoPtr)-FIFO_END_ADJUST-sizeof(FxU32);
if (gcFifo->roomToReadPtr<0) gcFifo->roomToReadPtr+=gcFifo->fifoSize;
gcFifo->roomToEnd = gcFifo->fifoSize -
((gcFifo->fifoPtr-gcFifo->fifoStart)<<2) -
@@ -1215,7 +1219,7 @@
GR_DCL_GC;
gcFifo=&gc->cmdTransportInfo;
*fifoPtr=(gcFifo->fifoPtr-gc->rawLfb)<<2;
- *fifoRead=(gcFifo->fifoRead-(int)gc->rawLfb);
+ *fifoRead=(gcFifo->fifoRead-(long)gc->rawLfb);
}
#endif
--- Glide3/h3/glide3/src/fxcmd.h.ia64-foo Wed Nov 24 16:44:55 1999
+++ Glide3/h3/glide3/src/fxcmd.h Thu Dec 21 14:27:40 2000
@@ -182,7 +182,7 @@
/* NB: This should be used sparingly because it does a 'real' hw read
* which is *SLOW*.
*/
-FxU32 _grHwFifoPtr(FxBool);
+long _grHwFifoPtr(FxBool);
#define HW_FIFO_PTR(a) _grHwFifoPtr(a)
#if FIFO_ASSERT_FULL
@@ -716,8 +716,8 @@
#define REG_GROUP_END() \
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); \
gc->cmdTransportInfo.fifoPtr = (FxU32*)_regGroupFifoPtr; \
GDBG_INFO(gc->myLevel + 200, "\tGroupEnd: (0x%X : 0x%X)\n", \
[...3308 lines suppressed...]
static int
-_txPixQuantize_ARGB4444_D4x4 (unsigned long argb, int x, int y, int w)
+_txPixQuantize_ARGB4444_D4x4 (unsigned int argb, int x, int y, int w)
{
int d = dithmat[y&3][x&3];
int n, t;
@@ -427,7 +427,7 @@
}
static int
-_txPixQuantize_ARGB4444_DErr (unsigned long argb, int x, int y, int w)
+_txPixQuantize_ARGB4444_DErr (unsigned int argb, int x, int y, int w)
{
static int qr, qg, qb; // quantized incoming values.
int ir, ig, ib; // incoming values.
@@ -484,7 +484,7 @@
}
static int
-_txPixQuantize_AI88( unsigned long argb, int x, int y, int w)
+_txPixQuantize_AI88( unsigned int argb, int x, int y, int w)
{
return (
(((int) (((argb >>16) & 0xFF) * .30F +
@@ -498,7 +498,7 @@
static void
_txImgQuantize(char *dst, char *src, int w, int h, FxU32 format, FxU32 dither)
{
- int (*quantizer)(unsigned long argb, int x, int y, int w) = NULL;
+ int (*quantizer)(unsigned int argb, int x, int y, int w) = NULL;
int x, y;
dither &= TX_DITHER_MASK;
@@ -589,7 +589,7 @@
// 8 bit dst
for (y=0; y<h; y++) {
for (x=0; x<w; x++) {
- *dst++ = (*quantizer)(*(unsigned long *)src, x, y, w);
+ *dst++ = (*quantizer)(*(unsigned int *)src, x, y, w);
src += 4;
}
}
@@ -599,7 +599,7 @@
for (y=0; y<h; y++) {
for (x=0; x<w; x++) {
- *dst16++ = (*quantizer)(*(unsigned long *)src, x, y, w);
+ *dst16++ = (*quantizer)(*(unsigned int *)src, x, y, w);
src += 4;
}
}
--- Glide3/swlibs/texus/lib/rgt.c.ia64-foo Wed Jun 14 20:11:40 2000
+++ Glide3/swlibs/texus/lib/rgt.c Thu Dec 21 14:27:40 2000
@@ -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/texus.h.ia64-foo Wed Jun 14 20:11:40 2000
+++ Glide3/swlibs/texus/lib/texus.h Thu Dec 21 14:27:40 2000
@@ -38,8 +38,13 @@
typedef unsigned char FxU8;
typedef unsigned short FxU16;
typedef short FxI16;
+#ifdef __LP64__
+typedef unsigned int FxU32;
+typedef int FxI32;
+#else
typedef unsigned long FxU32;
typedef long FxI32;
+#endif
typedef int FxBool;
/*
--- Glide3/swlibs/texus/lib/texusint.h.ia64-foo Wed Jun 14 20:11:40 2000
+++ Glide3/swlibs/texus/lib/texusint.h Thu Dec 21 14:27:40 2000
@@ -67,7 +67,7 @@
int txAspectRatio(int w, int h);
void txPanic(char *);
void txError(char *);
-void txYABtoPal256(long *palette, const long* yabTable);
+void txYABtoPal256(int *palette, const int* yabTable);
void txRectCopy(FxU8 *dst, int dstStride, const FxU8 *src, int srcStride,
int width, int height);
FxBool txMipAlloc(TxMip *txMip);
@@ -90,7 +90,7 @@
void txDiffuseIndex(TxMip *pxMip, TxMip *txMip, int pixsize,
const FxU32 *palette, int ncolors);
-int txNearestColor(long ir, long ig, long ib, const FxU32 *pal, int npal);
+int txNearestColor(int ir, int ig, int ib, const FxU32 *pal, int npal);
FxBool _txReadTGAHeader( FILE *stream, FxU32 cookie, TxMip *info);
FxBool _txReadTGAData( FILE *stream, TxMip *info);
--- Glide3/swlibs/texus/lib/util.c.ia64-foo Wed Jun 14 20:11:40 2000
+++ Glide3/swlibs/texus/lib/util.c Thu Dec 21 14:27:40 2000
@@ -133,14 +133,14 @@
}
void
-txYABtoPal256(long *palette, const long* yabTable)
+txYABtoPal256(int *palette, const int* yabTable)
{
// Convert YAB table to a 256 color palette
// Assume yabTable[] has first 16Y's, 12 A's, 12 B's
- const long *Y = yabTable;
- const long *A = yabTable + 16;
- const long *B = yabTable + 16 + 12;
+ const int *Y = yabTable;
+ const int *A = yabTable + 16;
+ const int *B = yabTable + 16 + 12;
int i;
for (i=0; i<256; i++) {
@@ -265,7 +265,7 @@
int *explode3 = &_explode3[255];
int
-txNearestColor(long ir, long ig, long ib, const FxU32 *pal, int ncolors)
+txNearestColor(int ir, int ig, int ib, const FxU32 *pal, int ncolors)
{
int i, d;
int mindist, minpos; // closest distance to input
--- Glide3/swlibs/texus2/cmd/makefile.autoconf.am.ia64-foo Mon Aug 7 11:24:44 2000
+++ Glide3/swlibs/texus2/cmd/makefile.autoconf.am Thu Dec 21 14:27:40 2000
@@ -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/set-for-dri.ia64-foo Thu Dec 21 14:27:40 2000
+++ Glide3/set-for-dri Thu Dec 21 14:27:40 2000
@@ -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/set-for-standalone.ia64-foo Thu Dec 21 14:27:40 2000
+++ Glide3/set-for-standalone Thu Dec 21 14:27:40 2000
@@ -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).save
+ echo ln -sf $rn $n
+ ln -sf $rn $n
+done
+
--- Glide3/configure.in.ia64-foo Thu Dec 21 14:39:25 2000
+++ Glide3/configure.in Thu Dec 21 16:41:57 2000
@@ -171,7 +171,12 @@
GLIDE_SANITY_SIZE=false
FX_DLL_BUILD=false
FX_GLIDE_HW_CULL=false
-FX_GLIDE_CTRISETUP=false
+ARCH=`uname -m | sed "s|[456]86|386|g"`
+if test "$ARCH" = "i386" ; then
+ FX_GLIDE_CTRISETUP=false
+else
+ FX_GLIDE_CTRISETUP=true
+fi
# Next, we read some configuration options
# statically. This is to avoid creating a bunch of
# not-terribly-useful --enable options.
--- NEW FILE glidelink.c ---
/* This program is a horrible hack to make the libglide3 library
** symlinked to the proper library for voodoo 3 or 5
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <kudzu/kudzu.h>
char *oldpath = GLIDELIB;
int main(int argc, char **argv) {
struct device **devicelist;
struct pciDevice *videodev;
devicelist = probeDevices(CLASS_VIDEO, BUS_PCI, PROBE_ALL);
if (!devicelist || !devicelist[0])
exit(0);
videodev = (struct pciDevice *)devicelist[0];
switch (videodev->vendorId) {
case 0x121a:
switch (videodev->deviceId) {
case 0x0003:
case 0x0004:
case 0x0005:
unlink(oldpath);
symlink("glide3/libglide3-v3.so",oldpath);
break;
case 0x0009:
unlink(oldpath);
symlink("glide3/libglide3-v5.so",oldpath);
break;
default:
break;
}
break;
default:
break;
}
exit(0);
}
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/Glide3/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 28 Apr 2005 18:29:12 -0000 1.1
+++ .cvsignore 28 Apr 2005 18:39:19 -0000 1.2
@@ -0,0 +1 @@
+Glide3-20010520.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/Glide3/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 28 Apr 2005 18:29:12 -0000 1.1
+++ sources 28 Apr 2005 18:39:19 -0000 1.2
@@ -0,0 +1 @@
+6cd7e5926c2a97bb96add94ca6a54a0c Glide3-20010520.tar.bz2
More information about the fedora-extras-commits
mailing list