rpms/Glide3/devel Glide3-64bit.patch,1.2,1.3 Glide3.spec,1.5,1.6

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Thu May 5 09:40:32 UTC 2005


Author: jwrdegoede

Update of /cvs/extras/rpms/Glide3/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29117

Modified Files:
	Glide3-64bit.patch Glide3.spec 
Log Message:
- More x86_64 fixes added to Glide-64bit.patch. 
- Removed ancient Conflicts: XFree86-libs = 4.1.0


Glide3-64bit.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.2 -r 1.3 Glide3-64bit.patch
Index: Glide3-64bit.patch
===================================================================
RCS file: /cvs/extras/rpms/Glide3/devel/Glide3-64bit.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Glide3-64bit.patch	4 May 2005 15:14:46 -0000	1.2
+++ Glide3-64bit.patch	5 May 2005 09:40:30 -0000	1.3
@@ -1,2709 +1,2774 @@
---- Glide3/cvg/init/sst1init.h.64bit	2000-11-16 20:26:02.000000000 +0100
-+++ Glide3/cvg/init/sst1init.h	2005-05-04 17:05:03.000000000 +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	1999-12-07 22:42:31.000000000 +0100
-+++ Glide3/cvg/glide3/src/fxglide.h	2005-05-04 17:05:03.000000000 +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__)
+--- Glide3/h3/minihwc/linhwc.c.save.64bit	2000-03-20 22:42:57.000000000 +0100
++++ Glide3/h3/minihwc/linhwc.c.save	2005-05-05 11:19:17.318341952 +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(__GNUC__) && defined(__alpha__)
++#elif 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 */
-@@ -1282,7 +1289,9 @@
- struct _GlideRoot_s {
-   int p6Fencer;                 /* xchg to here to keep this in cache!!! */
-   int current_sst;
-+#if FX_GLIDE_I386
-   FxU32 CPUType;
++#else
++# define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
 +#endif
-   GrGC *curGC;                  /* point to the current GC      */
-   FxU32 packerFixAddress;       /* address to write packer fix to */
-   FxBool    windowsInit;        /* Is the Windows part of glide initialized? */
-@@ -3087,6 +3096,7 @@
-                  va_list           args);
- #endif
  
-+#if FX_GLIDE_I386
- /* Returns 16:16 pair indicating the cpu's manufacturer and its
-  * capabilities. Non-Intel processors should have a vendor id w/ the
-  * high bit set so that it appears to be a negative #. The value of
-@@ -3119,6 +3129,7 @@
+ #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;
  
- extern void GR_CDECL 
- double_precision_asm(void);
-+#endif
+   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 @@
  
- #ifdef GLIDE3
- /*
---- Glide3/cvg/glide3/src/makefile.linux.64bit	2000-07-12 23:33:31.000000000 +0200
-+++ Glide3/cvg/glide3/src/makefile.linux	2005-05-04 17:05:03.000000000 +0200
-@@ -19,10 +19,16 @@
+   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-05-05 11:19:17.319341800 +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;
  
- TAG_REGEXP      = $(BUILD_ROOT)/$(FX_GLIDE_HW)/$(FX_HW_PROJECTS)/src/glide.rx
+ 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-05-05 11:19:17.321341496 +0200
+@@ -192,9 +192,8 @@
  
-+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
+ /* 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;
  
- HWSPEC          =       fifo.c
- LCDEFS          +=       -DCVG \
---- Glide3/cvg/glide3/src/gpci.c.64bit	1999-12-07 22:42:33.000000000 +0100
-+++ Glide3/cvg/glide3/src/gpci.c	2005-05-04 17:05:03.000000000 +0200
-@@ -576,52 +576,41 @@
- #endif
+ /*
+--- Glide3/h3/minihwc/linhwc.c.dri.64bit	2000-10-27 12:27:27.000000000 +0200
++++ Glide3/h3/minihwc/linhwc.c.dri	2005-05-05 11:19:17.323341192 +0200
+@@ -67,7 +67,13 @@
+ #include "lindri.h"
  
-   /* Setup the basic proc tables based on the cpu type. */
--  {
--    _GlideRoot.CPUType = _cpu_detect_asm();
--    if (GETENV("FX_CPU")) _GlideRoot.CPUType = atoi(GETENV("FX_CPU"));
-+#if FX_GLIDE_I386
-+  _GlideRoot.CPUType = _cpu_detect_asm();
-+  if (GETENV("FX_CPU")) _GlideRoot.CPUType = atoi(GETENV("FX_CPU"));
+ 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
  
--    /* Default case */
[...6084 lines suppressed...]
+         if (path)
+--- Glide3/cvg/init/sst1init.h.64bit	2000-11-16 20:26:02.000000000 +0100
++++ Glide3/cvg/init/sst1init.h	2005-05-05 11:19:17.250352288 +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	1999-12-07 22:42:31.000000000 +0100
++++ Glide3/cvg/glide3/src/fxglide.h	2005-05-05 11:19:17.254351680 +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 */
+@@ -1282,7 +1289,9 @@
+ struct _GlideRoot_s {
+   int p6Fencer;                 /* xchg to here to keep this in cache!!! */
+   int current_sst;
++#if FX_GLIDE_I386
+   FxU32 CPUType;
++#endif
+   GrGC *curGC;                  /* point to the current GC      */
+   FxU32 packerFixAddress;       /* address to write packer fix to */
+   FxBool    windowsInit;        /* Is the Windows part of glide initialized? */
+@@ -3087,6 +3096,7 @@
+                  va_list           args);
+ #endif
+ 
++#if FX_GLIDE_I386
+ /* Returns 16:16 pair indicating the cpu's manufacturer and its
+  * capabilities. Non-Intel processors should have a vendor id w/ the
+  * high bit set so that it appears to be a negative #. The value of
+@@ -3119,6 +3129,7 @@
+ 
+ extern void GR_CDECL 
+ double_precision_asm(void);
++#endif
+ 
+ #ifdef GLIDE3
+ /*
+--- Glide3/cvg/glide3/src/gpci.c.64bit	1999-12-07 22:42:33.000000000 +0100
++++ Glide3/cvg/glide3/src/gpci.c	2005-05-05 11:19:57.629213768 +0200
+@@ -576,52 +576,41 @@
+ #endif
+ 
+   /* Setup the basic proc tables based on the cpu type. */
+-  {
+-    _GlideRoot.CPUType = _cpu_detect_asm();
+-    if (GETENV("FX_CPU")) _GlideRoot.CPUType = atoi(GETENV("FX_CPU"));
++#if FX_GLIDE_I386
++  _GlideRoot.CPUType = _cpu_detect_asm();
++  if (GETENV("FX_CPU")) _GlideRoot.CPUType = atoi(GETENV("FX_CPU"));
++#endif
+ 
+-    /* Default case */
+-#if GLIDE_DISPATCH_SETUP || GLIDE_DISPATCH_DOWNLOAD
++  /* Default case */
+ #if GLIDE_DISPATCH_SETUP
+-    _GlideRoot.deviceArchProcs.curTriProcs        = _triSetupProcs + 0;
+-    _GlideRoot.deviceArchProcs.curDrawTrisProc    = _grDrawTriangles_Default;
+-    _GlideRoot.deviceArchProcs.curVertexListProcs = _vertexListProcs[0];
+-    _GlideRoot.deviceArchProcs.curLineProc        = _grDrawTextureLine_Default;
++  _GlideRoot.deviceArchProcs.curTriProcs        = _triSetupProcs + 0;
++  _GlideRoot.deviceArchProcs.curDrawTrisProc    = _grDrawTriangles_Default;
++  _GlideRoot.deviceArchProcs.curVertexListProcs = _vertexListProcs[0];
++  _GlideRoot.deviceArchProcs.curLineProc        = _grDrawTextureLine_Default;
+ #endif /* GLIDE_DISPATCH_SETUP */
+ #if GLIDE_DISPATCH_DOWNLOAD
+-    _GlideRoot.deviceArchProcs.curTexProcs = _texDownloadProcs + 0;
++  _GlideRoot.deviceArchProcs.curTexProcs = _texDownloadProcs + 0;
+ #endif /* GLIDE_DISPATCH_DOWNLOAD */
+ 
+-    /* Check for vendor specific optimization cases */
+-    switch((_GlideRoot.CPUType & 0xFFFF0000UL) >> 16UL) {
++#if FX_GLIDE_I386 && GL_AMD3D && GLIDE_DISPATCH_SETUP
++  /* Check for vendor specific optimization cases */
++  switch((_GlideRoot.CPUType & 0xFFFF0000UL) >> 16UL) {
+     case kCPUVendorIntel:
+       break;
+ 
+     case kCPUVendorAMD:
+       if ((_GlideRoot.CPUType & 0xFFFFUL) == 0x02UL) {
+-#if GLIDE_DISPATCH_SETUP
+-        _GlideRoot.deviceArchProcs.curTriProcs        = _triSetupProcs + 0;
+-#ifdef GL_AMD3D
+         _GlideRoot.deviceArchProcs.curDrawTrisProc    = _grDrawTriangles_3DNow;
+         _GlideRoot.deviceArchProcs.curLineProc        = _grDrawTextureLine_3DNow;
+-#else
+-        _GlideRoot.deviceArchProcs.curDrawTrisProc    = _grDrawTriangles_Default;
+-        _GlideRoot.deviceArchProcs.curLineProc        = _grDrawTextureLine_Default;
+-#endif
+         _GlideRoot.deviceArchProcs.curVertexListProcs = _vertexListProcs[0];
+-#endif /* GLIDE_DISPATCH_SETUP */
+-#if GLIDE_DISPATCH_DOWNLOAD
+-        _GlideRoot.deviceArchProcs.curTexProcs = _texDownloadProcs + 0;
+-#endif /* GLIDE_DISPATCH_DOWNLOAD */
+       }
+       break;
+       
+     case kCPUVendorUnknown:
+     default:
+       break;
+-    }
+-#endif /* GLIDE_DISPATCH_SETUP || GLIDE_DISPATCH_DOWNLOAD */
+   }
++#endif
+ 
+   /* Check for user environment tweaks */
+   {
+@@ -654,7 +643,9 @@
+     GDBG_INFO(80,"      swapInterval: %d\n",_GlideRoot.environment.swapInterval);
+     GDBG_INFO(80,"          noSplash: %d\n",_GlideRoot.environment.noSplash);
+     GDBG_INFO(80,"     shamelessPlug: %d\n",_GlideRoot.environment.shamelessPlug);
++#if FX_GLIDE_I386
+     GDBG_INFO(80,"               cpu: %d\n",_GlideRoot.CPUType);
++#endif
+     GDBG_INFO(80,"          snapshot: %d\n",_GlideRoot.environment.snapshot);
+     GDBG_INFO(80,"  disableDitherSub: %d\n",_GlideRoot.environment.disableDitherSub);
+   }
+--- Glide3/cvg/glide3/src/fxgasm.c.64bit	2005-05-05 11:34:03.732586504 +0200
++++ Glide3/cvg/glide3/src/fxgasm.c	2005-05-05 11:34:16.002721160 +0200
+@@ -207,7 +207,9 @@
+     HEADER ("GlideRoot");
+     OFFSET (gr,p6Fencer,"p6Fencer\t");
+     OFFSET (gr,current_sst,"current_sst\t");
++#if FX_GLIDE_I386
+     OFFSET (gr,CPUType,"CPUType\t\t");
++#endif
+     OFFSET (gr,curGC,"curGC\t\t");
+     OFFSET (gr,curTriSize,"curTriSize\t");
+ 
+--- Glide3/cvg/glide3/src/makefile.linux.64bit	2000-07-12 23:33:31.000000000 +0200
++++ Glide3/cvg/glide3/src/makefile.linux	2005-05-05 11:19:17.255351528 +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_I386=false
-+  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.
-@@ -215,6 +222,8 @@
-                test x$FX_GLIDE_VERTEX_TABLE = xtrue)
- AM_CONDITIONAL(FX_HOOPTI_TRI_SETUP_COMPARE,dnl
-                test x$FX_HOOPTI_TRI_SETUP_COMPARE = xtrue)
-+AM_CONDITIONAL(FX_GLIDE_I386,dnl
-+               test x$FX_GLIDE_I386 = xtrue)
++FX_GLIDE_CTRISETUP =    1
++endif
  
- dnl Checks for programs.
- AC_PROG_CC
+ HWSPEC          =       fifo.c
+ LCDEFS          +=       -DCVG \
+--- Glide3/cvg/glide3/src/diglide.c.64bit	1999-12-07 22:42:30.000000000 +0100
++++ Glide3/cvg/glide3/src/diglide.c	2005-05-05 11:19:17.256351376 +0200
+@@ -267,9 +267,12 @@
+     gc->state.checkFifo = hints;
+     break;
+ 
++#if FX_GLIDE_I386
+   case GR_HINT_FPUPRECISION:
+-    hints ? double_precision_asm() : single_precision_asm();
++    if (_GlideRoot.CPUType != 4) /* don't do this on a 486 */
++      hints ? double_precision_asm() : single_precision_asm();
+     break;
++#endif
+ 
+   case GR_HINT_ALLOW_MIPMAP_DITHER:
+     /* Regardless of the game hint, force the user selection */


Index: Glide3.spec
===================================================================
RCS file: /cvs/extras/rpms/Glide3/devel/Glide3.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Glide3.spec	4 May 2005 15:14:46 -0000	1.5
+++ Glide3.spec	5 May 2005 09:40:30 -0000	1.6
@@ -23,10 +23,7 @@
 Patch4:  Glide3-gcc4.patch
 Patch5:  Glide3-amd3dnow.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
@@ -38,7 +35,6 @@
 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
@@ -156,6 +152,10 @@
 
 
 %changelog
+* Mon May  5 2005 Hans de Goede <j.w.r.degoede at hhs.nl>
+- More x86_64 fixes added to Glide-64bit.patch.
+- Removed ancient Conflicts: XFree86-libs = 4.1.0
+
 * Mon May  4 2005 Hans de Goede <j.w.r.degoede at hhs.nl>
 - Tested amd3dnow code on a voodoo2, works for me (tm). Enabled
   amd3dnow code on i386 for now.




More information about the fedora-extras-commits mailing list