dri_util: Update internal_format to GL_RGB8 for MESA_FORMAT_B8G8R8X8_UNORM
[mesa.git] / src / mesa / math / m_xform.h
index d1b974f0433e0f67e1543a33b292dc674cd91b09..d3a5c81d648df4a679426a387d867651877109d9 100644 (file)
@@ -1,8 +1,7 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.5.1
  *
- * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2008  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"),
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
  */
 
 
 #define _M_XFORM_H
 
 
+#include "util/compiler.h"
 #include "main/glheader.h"
-#include "main/config.h"
-#include "math/m_vector.h"
 #include "math/m_matrix.h"
-
-#ifdef USE_X86_ASM
-#define _XFORMAPI _ASMAPI
-#define _XFORMAPIP _ASMAPIP
-#else
-#define _XFORMAPI
-#define _XFORMAPIP *
-#endif
-
-
-extern void
-_mesa_transform_vector(GLfloat u[4], CONST GLfloat v[4], CONST GLfloat m[16]);
+#include "math/m_vector.h"
 
 
 extern void
 _math_init_transformation(void);
-
+extern void
+init_c_cliptest(void);
 
 /* KW: Clip functions now do projective divide as well.  The projected
  * coordinates are very useful to us because they let us cull
@@ -102,30 +91,31 @@ _math_init_transformation(void);
 #define CLIP_FRUSTUM_BITS    0x3f
 
 
-typedef GLvector4f * (_XFORMAPIP clip_func)( GLvector4f *vClip,
-                                            GLvector4f *vProj,
-                                            GLubyte clipMask[],
-                                            GLubyte *orMask,
-                                            GLubyte *andMask );
+typedef GLvector4f * (*clip_func)(GLvector4f *vClip,
+                                  GLvector4f *vProj,
+                                  GLubyte clipMask[],
+                                  GLubyte *orMask,
+                                  GLubyte *andMask,
+                                  GLboolean viewport_z_clip);
 
 typedef void (*dotprod_func)( GLfloat *out,
                              GLuint out_stride,
-                             CONST GLvector4f *coord_vec,
-                             CONST GLfloat plane[4] );
+                             const GLvector4f *coord_vec,
+                             const GLfloat plane[4] );
 
 typedef void (*vec_copy_func)( GLvector4f *to,
-                              CONST GLvector4f *from );
+                              const GLvector4f *from );
 
 
 
 /*
  * Functions for transformation of normals in the VB.
  */
-typedef void (_NORMAPIP normal_func)( CONST GLmatrix *mat,
-                                     GLfloat scale,
-                                     CONST GLvector4f *in,
-                                     CONST GLfloat lengths[],
-                                     GLvector4f *dest );
+typedef void (*normal_func)(const GLmatrix *mat,
+                            GLfloat scale,
+                            const GLvector4f *in,
+                            const GLfloat lengths[],
+                            GLvector4f *dest);
 
 
 /* Flags for selecting a normal transformation function.
@@ -143,21 +133,9 @@ typedef void (_NORMAPIP normal_func)( CONST GLmatrix *mat,
  *     when the mask byte is zero.  This is always present as a
  *     parameter, to allow a unified interface.
  */
-typedef void (_XFORMAPIP transform_func)( GLvector4f *to_vec,
-                                         CONST GLfloat m[16],
-                                         CONST GLvector4f *from_vec );
-
-
-extern GLvector4f *_mesa_project_points( GLvector4f *to,
-                                        CONST GLvector4f *from );
-
-extern void _mesa_transform_bounds3( GLubyte *orMask, GLubyte *andMask,
-                                    CONST GLfloat m[16],
-                                    CONST GLfloat src[][3] );
-
-extern void _mesa_transform_bounds2( GLubyte *orMask, GLubyte *andMask,
-                                    CONST GLfloat m[16],
-                                    CONST GLfloat src[][3] );
+typedef void (*transform_func)(GLvector4f *to_vec,
+                               const GLfloat m[16],
+                               const GLvector4f *from_vec);
 
 
 extern dotprod_func  _mesa_dotprod_tab[5];
@@ -173,9 +151,6 @@ extern normal_func   _mesa_normal_tab[0xf];
 extern transform_func *_mesa_transform_tab[5];
 
 
-extern void _mesa_transform_point_sz( GLfloat Q[4], CONST GLfloat M[16],
-                                     CONST GLfloat P[4], GLuint sz );
-
 
 #define TransformRaw( to, mat, from ) \
    ( _mesa_transform_tab[(from)->size][(mat)->type]( to, (mat)->m, from ), \