ARB prog parser: Set NumAttributes based on the number of attribs read
[mesa.git] / src / mesa / x86 / sse.c
index bcabf5ca1da2035a6e908ad97eb171c140a64356..aef15b53152978d324f2d5f285ae191c5c3e32cf 100644 (file)
@@ -1,10 +1,8 @@
-/* $Id: sse.c,v 1.2 2001/03/30 14:44:43 gareth Exp $ */
-
 /*
  * Mesa 3-D graphics library
- * Version:  3.5
+ * Version:  6.0
  *
- * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * Andre Werthmann <wertmann@cs.uni-potsdam.de>
  */
 
-#include "glheader.h"
-#include "context.h"
-#include "math/m_vertices.h"
+#include "main/glheader.h"
+#include "main/context.h"
 #include "math/m_xform.h"
 #include "tnl/t_context.h"
 
 #include "sse.h"
-#include "common_x86_macros.h"
+#include "x86_xform.h"
 
-#ifdef DEBUG
+#ifdef DEBUG_MATH
 #include "math/m_debug.h"
 #endif
 
@@ -49,13 +46,16 @@ DECLARE_XFORM_GROUP( sse, 3 )
 
 #if 1
 /* Some functions are not written in SSE-assembly, because the fpu ones are faster */
-extern void _mesa_sse_transform_normals_no_rot( NORM_ARGS );
-extern void _mesa_sse_transform_rescale_normals( NORM_ARGS );
-extern void _mesa_sse_transform_rescale_normals_no_rot( NORM_ARGS );
-
-extern void _mesa_sse_transform_points4_general( XFORM_ARGS );
-extern void _mesa_sse_transform_points4_3d( XFORM_ARGS );
-extern void _mesa_sse_transform_points4_identity( XFORM_ARGS );
+extern void _ASMAPI _mesa_sse_transform_normals_no_rot( NORM_ARGS );
+extern void _ASMAPI _mesa_sse_transform_rescale_normals( NORM_ARGS );
+extern void _ASMAPI _mesa_sse_transform_rescale_normals_no_rot( NORM_ARGS );
+
+extern void _ASMAPI _mesa_sse_transform_points4_general( XFORM_ARGS );
+extern void _ASMAPI _mesa_sse_transform_points4_3d( XFORM_ARGS );
+/* XXX this function segfaults, see below */
+extern void _ASMAPI _mesa_sse_transform_points4_identity( XFORM_ARGS );
+/* XXX this one works, see below */
+extern void _ASMAPI _mesa_x86_transform_points4_identity( XFORM_ARGS );
 #else
 DECLARE_NORM_GROUP( sse )
 #endif
@@ -96,8 +96,11 @@ void _mesa_init_sse_transform_asm( void )
       _mesa_sse_transform_points4_general;
    _mesa_transform_tab[4][MATRIX_3D] =
       _mesa_sse_transform_points4_3d;
+   /* XXX NOTE: _mesa_sse_transform_points4_identity segfaults with the
+      conformance tests, so use the x86 version.
+   */
    _mesa_transform_tab[4][MATRIX_IDENTITY] =
-      _mesa_sse_transform_points4_identity;
+      _mesa_x86_transform_points4_identity;/*_mesa_sse_transform_points4_identity;*/
 
    _mesa_normal_tab[NORM_TRANSFORM_NO_ROT] =
       _mesa_sse_transform_normals_no_rot;
@@ -111,26 +114,10 @@ void _mesa_init_sse_transform_asm( void )
    ASSIGN_NORM_GROUP( sse );
 #endif
 
-#ifdef DEBUG
+#ifdef DEBUG_MATH
    _math_test_all_transform_functions( "SSE" );
    _math_test_all_normal_transform_functions( "SSE" );
 #endif
 #endif
 }
 
-void _mesa_init_sse_vertex_asm( void )
-{
-#ifdef USE_SSE_ASM
-   _mesa_xform_points3_v16_general = _mesa_v16_sse_general_xform;
-#if 0
-   /* GH: These are broken.  I'm fixing them now.
-    */
-   _mesa_project_v16 = _mesa_sse_project_vertices;
-   _mesa_project_clipped_v16 = _mesa_sse_project_clipped_vertices;
-#endif
-
-#ifdef DEBUG_NOT
-   _math_test_all_vertex_functions( "SSE" );
-#endif
-#endif
-}