I compared sources of Mesa-5.0.2 final release
http://prdownloads.sourceforge.net/mesa3d/MesaLib-5.0.2.tar.gz?download
http://prdownloads.sourceforge.net/mesa3d/MesaDemos-5.0.2.tar.gz?download
 with mesa on this tree, the sources are not exactly equal, so I send to
you my proposal patch to put sources in last version of Mesa-5.0.2.
Can be applied like this: cd xc/xc; cat ff.diff | patch -p0.

I test it today and I don't see any regression, but without any
improvement as well. 

I am thinking, as well, do a patch kernel for integrate dri module in
kernel with this tree code and with ac code from kernel 2.4.22-ac4.
For compile kernel with savage module, instated have compile it after
compile kernel.

If anyone have some of this stuff already made it please help me to save
my time on doing it again.

Sorry for my terrible English if something is not clear please ask me
again.

Thanks 

-- 
Sérgio M. B.
--- extras/Mesa/src/math/m_xform.c	2003-06-30 17:52:05.000000000 +0100
+++ ../../Mesa-5.0.2/src/math/m_xform.c	2003-10-17 15:16:59.000000000 +0100
@@ -187,7 +187,7 @@
 /*
  * This is called only once.  It initializes several tables with pointers
  * to optimized transformation functions.  This is where we can test for
- * AMD 3Dnow! capability, Intel Katmai, etc. and hook in the right code.
+ * AMD 3Dnow! capability, Intel SSE, etc. and hook in the right code.
  */
 void
 _math_init_transformation( void )
--- extras/Mesa/src/mmath.h	2003-04-03 22:26:59.000000000 +0100
+++ ../../Mesa-5.0.2/src/mmath.h	2003-10-17 15:16:56.000000000 +0100
@@ -204,7 +204,7 @@
 
 
 #if defined(__i386__) || defined(__sparc__) || defined(__s390x__) || \
-    defined(__powerpc__) || \
+    defined(__powerpc__) || defined(__AMD64__) || \
     ( defined(__alpha__) && ( defined(__IEEE_FLOAT) || !defined(VMS) ) )
 #define USE_IEEE
 #endif
--- extras/Mesa/src/OSmesa/osmesa.c	2003-04-03 22:28:02.000000000 +0100
+++ ../../Mesa-5.0.2/src/OSmesa/osmesa.c	2003-10-11 16:38:26.000000000 +0100
@@ -114,8 +114,9 @@
 GLAPI OSMesaContext GLAPIENTRY
 OSMesaCreateContext( GLenum format, OSMesaContext sharelist )
 {
+   const GLint accumBits = (format == OSMESA_COLOR_INDEX) ? 0 : 16;
    return OSMesaCreateContextExt(format, DEFAULT_SOFTWARE_DEPTH_BITS,
-                                 8, 16, sharelist);
+                                 8, accumBits, sharelist);
 }
 
 
--- extras/Mesa/src/texstore.c	2003-04-03 22:27:31.000000000 +0100
+++ ../../Mesa-5.0.2/src/texstore.c	2003-11-07 14:51:04.000000000 +0000
@@ -1,7 +1,7 @@
 
 /*
  * Mesa 3-D graphics library
- * Version:  5.0.1
+ * Version:  5.0.2
  *
  * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
  *
@@ -1093,7 +1093,7 @@
                            texImage->Format,
                            texImage->TexFormat, texImage->Data,
                            width, height, depth, /* src size */
-                           xoffset, yoffset, xoffset, /* dest offsets */
+                           xoffset, yoffset, zoffset, /* dest offsets */
                            texImage->Width * texelBytes,  /* dst row stride */
                            texImage->Width * texImage->Height * texelBytes,
                            format, type, pixels, packing);
--- extras/Mesa/src/tnl/t_context.c	2003-04-03 22:30:26.000000000 +0100
+++ ../../Mesa-5.0.2/src/tnl/t_context.c	2003-10-17 15:16:59.000000000 +0100
@@ -144,7 +144,8 @@
    _tnl_array_destroy( ctx );
    _tnl_imm_destroy( ctx );
    _tnl_destroy_pipeline( ctx );
-   _tnl_free_immediate( ctx, tnl->freed_immediate );
+   if (tnl->freed_immediate) 
+     _tnl_free_immediate( ctx, tnl->freed_immediate );
 
    FREE(tnl);
    ctx->swtnl_context = 0;
--- extras/Mesa/src/tnl/t_vb_texgen.c	2003-04-03 22:30:39.000000000 +0100
+++ ../../Mesa-5.0.2/src/tnl/t_vb_texgen.c	2003-10-11 17:31:31.000000000 +0100
@@ -321,6 +321,7 @@
    GLfloat (*f)[3] = store->tmp_f;
    GLfloat *m = store->tmp_m;
 
+
 /*     _mesa_debug(NULL, "%s normstride %d eyestride %d\n",  */
 /*  	   __FUNCTION__, VB->NormalPtr->stride, */
 /*  	   VB->EyePtr->stride); */
@@ -358,22 +359,20 @@
    struct vertex_buffer *VB = &tnl->vb;
    GLvector4f *in = VB->TexCoordPtr[unit];
    GLvector4f *out = &store->texcoord[unit];
-   struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
+   const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
    const GLvector4f *obj = VB->ObjPtr;
    const GLvector4f *eye = VB->EyePtr;
    const GLvector4f *normal = VB->NormalPtr;
+   const GLfloat *m = store->tmp_m;
+   const GLuint count = VB->Count;
    GLfloat (*texcoord)[4] = (GLfloat (*)[4])out->data;
-   GLfloat *indata;
-   GLuint count = VB->Count;
    GLfloat (*f)[3] = store->tmp_f;
-   GLfloat *m = store->tmp_m;
    GLuint holes = 0;
 
-
    if (texUnit->_GenFlags & TEXGEN_NEED_M) {
-      build_m_tab[in->size]( store->tmp_f, store->tmp_m, normal, eye );
+      build_m_tab[eye->size]( store->tmp_f, store->tmp_m, normal, eye );
    } else if (texUnit->_GenFlags & TEXGEN_NEED_F) {
-      build_f_tab[in->size]( (GLfloat *)store->tmp_f, 3, normal, eye );
+      build_f_tab[eye->size]( (GLfloat *)store->tmp_f, 3, normal, eye );
    }
 
    if (!in) {
@@ -419,8 +418,8 @@
 				       texUnit->EyePlaneS );
 	 break;
       case GL_SPHERE_MAP:
-	 for (indata=in->start,i=0 ; i<count ;i++, STRIDE_F(indata,in->stride))
-	    texcoord[i][0] = indata[0] * m[i] + 0.5F;
+         for (i = 0; i < count; i++)
+            texcoord[i][0] = f[i][0] * m[i] + 0.5F;
 	 break;
       case GL_REFLECTION_MAP_NV:
 	 for (i=0;i<count;i++)
@@ -452,8 +451,8 @@
 				       texUnit->EyePlaneT );
 	 break;
       case GL_SPHERE_MAP:
-	 for (indata=in->start,i=0; i<count ;i++,STRIDE_F(indata,in->stride))
-	     texcoord[i][1] = indata[1] * m[i] + 0.5F;
+         for (i = 0; i < count; i++)
+            texcoord[i][1] = f[i][1] * m[i] + 0.5F;
 	 break;
       case GL_REFLECTION_MAP_NV:
 	 for (i=0;i<count;i++)
@@ -564,8 +563,9 @@
 
 	 store->TexgenSize[i] = sz;
 	 store->TexgenHoles[i] = (all_bits[sz] & ~texUnit->TexGenEnabled);
-	 store->TexgenFunc[i] = texgen;
+	 store->TexgenFunc[i] = texgen; /* general solution */
 
+         /* look for special texgen cases */
 	 if (texUnit->TexGenEnabled == (S_BIT|T_BIT|R_BIT)) {
 	    if (texUnit->_GenFlags == TEXGEN_REFLECTION_MAP_NV) {
 	       store->TexgenFunc[i] = texgen_reflection_map_nv;
--- extras/Mesa/src/tnl_dd/t_dd_vbtmp.h	2003-10-31 10:01:27.000000000 +0000
+++ ../../Mesa-5.0.2/src/tnl_dd/t_dd_vbtmp.h	2003-04-03 17:07:28.000000000 +0100
@@ -404,34 +404,6 @@
 	       v->v.v1 = tc1[i][1];
 	    }
 	 }
-	 if (DO_TEX2) {
-	    if (DO_PTEX) {
-	       v->pv.u2 = tc2[i][0];
-	       v->pv.v2 = tc2[i][1];
-	       if (tc2_size == 4) 
-		  v->pv.q2 = tc2[i][3];
-	       else
-		  v->pv.q2 = 1.0;
-	    } 
-	    else {
-	       v->v.u2 = tc2[i][0];
-	       v->v.v2 = tc2[i][1];
-	    }
-	 } 
-	 if (DO_TEX3) {
-	    if (DO_PTEX) {
-	       v->pv.u3 = tc3[i][0];
-	       v->pv.v3 = tc3[i][1];
-	       if (tc3_size == 4) 
-		  v->pv.q3 = tc3[i][3];
-	       else
-		  v->pv.q3 = 1.0;
-	    } 
-	    else {
-	       v->v.u3 = tc3[i][0];
-	       v->v.v3 = tc3[i][1];
-	    }
-	 } 
       }
    }
 }
--- extras/Mesa/src/X86/3dnow_normal.S	2003-04-03 22:28:27.000000000 +0100
+++ ../../Mesa-5.0.2/src/X86/3dnow_normal.S	2003-10-17 15:16:58.000000000 +0100
@@ -40,7 +40,7 @@
 GLOBL GLNAME(_mesa_3dnow_transform_normalize_normals)
 GLNAME(_mesa_3dnow_transform_normalize_normals):
 
- #define FRAME_OFFSET 12
+#define FRAME_OFFSET 12
 
     PUSH_L     ( EDI )
     PUSH_L     ( ESI )
@@ -66,8 +66,8 @@
     PUSH_L     ( EAX )
     PUSH_L     ( EDX )                  /*  save counter & pointer for   */
                                         /*  the normalize pass           */
- #undef  FRAME_OFFSET
- #define FRAME_OFFSET 24
+#undef  FRAME_OFFSET
+#define FRAME_OFFSET 24
 
     MOVQ       ( M(0), MM3 )            /*  m1              | m0         */
     MOVQ       ( M(4), MM4 )            /*  m5              | m4         */
@@ -217,8 +217,8 @@
 GLOBL GLNAME(_mesa_3dnow_transform_normalize_normals_no_rot)
 GLNAME(_mesa_3dnow_transform_normalize_normals_no_rot):
 
- #undef FRAME_OFFSET
- #define FRAME_OFFSET 12
+#undef FRAME_OFFSET
+#define FRAME_OFFSET 12
 
     PUSH_L     ( EDI )
     PUSH_L     ( ESI )
@@ -356,8 +356,8 @@
 GLOBL GLNAME(_mesa_3dnow_transform_rescale_normals_no_rot)
 GLNAME(_mesa_3dnow_transform_rescale_normals_no_rot):
 
- #undef FRAME_OFFSET
- #define FRAME_OFFSET 12
+#undef FRAME_OFFSET
+#define FRAME_OFFSET 12
 
     PUSH_L     ( EDI )
     PUSH_L     ( ESI )
@@ -427,8 +427,8 @@
 GLOBL GLNAME(_mesa_3dnow_transform_rescale_normals)
 GLNAME(_mesa_3dnow_transform_rescale_normals):
 
- #undef  FRAME_OFFSET
- #define FRAME_OFFSET 8
+#undef  FRAME_OFFSET
+#define FRAME_OFFSET 8
 
     PUSH_L     ( EDI )
     PUSH_L     ( ESI )
@@ -524,8 +524,8 @@
 GLOBL GLNAME(_mesa_3dnow_transform_normals_no_rot)
 GLNAME(_mesa_3dnow_transform_normals_no_rot):
 
- #undef  FRAME_OFFSET
- #define FRAME_OFFSET 8
+#undef  FRAME_OFFSET
+#define FRAME_OFFSET 8
 
     PUSH_L     ( EDI )
     PUSH_L     ( ESI )
@@ -590,8 +590,8 @@
 GLOBL GLNAME(_mesa_3dnow_transform_normals)
 GLNAME(_mesa_3dnow_transform_normals):
 
- #undef  FRAME_OFFSET
- #define FRAME_OFFSET 8
+#undef  FRAME_OFFSET
+#define FRAME_OFFSET 8
 
     PUSH_L     ( EDI )
     PUSH_L     ( ESI )
@@ -674,8 +674,8 @@
 GLOBL GLNAME(_mesa_3dnow_normalize_normals)
 GLNAME(_mesa_3dnow_normalize_normals):
 
- #undef  FRAME_OFFSET
- #define FRAME_OFFSET 12
+#undef  FRAME_OFFSET
+#define FRAME_OFFSET 12
 
     PUSH_L     ( EDI )
     PUSH_L     ( ESI )
@@ -785,8 +785,8 @@
 GLOBL GLNAME(_mesa_3dnow_rescale_normals)
 GLNAME(_mesa_3dnow_rescale_normals):
 
- #undef  FRAME_OFFSET
- #define FRAME_OFFSET 8
+#undef  FRAME_OFFSET
+#define FRAME_OFFSET 8
     PUSH_L     ( EDI )
     PUSH_L     ( ESI )
 
--- extras/Mesa/src/X86/common_x86_asm.h	2003-04-03 22:28:35.000000000 +0100
+++ ../../Mesa-5.0.2/src/X86/common_x86_asm.h	2003-10-17 15:16:58.000000000 +0100
@@ -29,7 +29,7 @@
  *
  * Written by Holger Waechtler <[EMAIL PROTECTED]>
  * Changed by Andre Werthmann <[EMAIL PROTECTED]> for using the
- * new Katmai functions
+ * new SSE functions
  *
  * Reimplemented by Gareth Hughes in a more
  * future-proof manner, based on code in the Linux kernel.
--- extras/Mesa/src/X86/common_x86_asm.S	2003-04-03 22:28:34.000000000 +0100
+++ ../../Mesa-5.0.2/src/X86/common_x86_asm.S	2003-10-17 15:16:58.000000000 +0100
@@ -112,10 +112,10 @@
 	CPUID
 	MOV_L	( EDX, EAX )
 
-	/* Mask out highest bit, which is used by AMD for 3dnow
-         * Newer Intel have this bit set, but do not support 3dnow 
- 	 */
-        AND_L   ( CONST(0X7FFFFFFF), EAX)
+	/* Mask out highest bit, which is used by AMD for 3dnow.
+	 * Newer Intel have this bit set, but do not support 3dnow.
+	 */
+	AND_L	( CONST(0X7FFFFFFF), EAX)
 	JMP	( LLBL(cpuid_done) )
 
 LLBL(cpuid_amd):
--- extras/Mesa/src/X86/common_x86.c	2003-04-03 22:28:33.000000000 +0100
+++ ../../Mesa-5.0.2/src/X86/common_x86.c	2003-10-17 15:16:58.000000000 +0100
@@ -29,7 +29,7 @@
  *
  * Written by Holger Waechtler <[EMAIL PROTECTED]>
  * Changed by Andre Werthmann <[EMAIL PROTECTED]> for using the
- * new Katmai functions.
+ * new SSE functions.
  */
 
 #include <stdlib.h>

Reply via email to