gallium: add compute shader IR type
[mesa.git] / src / mesa / math / m_xform_tmp.h
index cb94f88ed1e064f369c681921e53f3296a6354f6..af85de3d4d530a6e69dee1fe0b06d86960e22f9f 100644 (file)
@@ -1,10 +1,8 @@
-/* $Id: m_xform_tmp.h,v 1.2 2000/12/26 05:09:31 keithw Exp $ */
 
 /*
  * Mesa 3-D graphics library
- * Version:  3.1
  *
- * Copyright (C) 1999  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2001  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.
  */
 
 /*
  *     cliped and/or culled vertices.
  */
 
-static void _XFORMAPI
+/* GH: Not any more -- it's easier (and faster) to just process the
+ *     entire vector.  Clipping and culling are handled further down
+ *     the pipe, most often during or after the conversion to some
+ *     driver-specific vertex format.
+ */
+
+static void
 TAG(transform_points1_general)( GLvector4f *to_vec,
                                const GLfloat m[16],
-                                           const GLvector4f *from_vec,
-                                           const GLubyte *mask,
-                                           const GLubyte flag )
+                               const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -81,55 +84,42 @@ TAG(transform_points1_general)( GLvector4f *to_vec,
    const GLfloat m2 = m[2],  m14 = m[14];
    const GLfloat m3 = m[3],  m15 = m[15];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0];
-        to[i][0] = m0 * ox + m12;
-        to[i][1] = m1 * ox + m13;
-        to[i][2] = m2 * ox + m14;
-        to[i][3] = m3 * ox + m15;
-      }
+      const GLfloat ox = from[0];
+      to[i][0] = m0 * ox + m12;
+      to[i][1] = m1 * ox + m13;
+      to[i][2] = m2 * ox + m14;
+      to[i][3] = m3 * ox + m15;
    }
-
    to_vec->size = 4;
    to_vec->flags |= VEC_SIZE_4;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points1_identity)( GLvector4f *to_vec,
                                 const GLfloat m[16],
-                                            const GLvector4f *from_vec,
-                                            const GLubyte *mask,
-                                            const GLubyte flag )
+                                const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
    GLuint count = from_vec->count;
    GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
    GLuint i;
-   (void) mask;
-   (void) flag;
+   (void) m;
    if (to_vec == from_vec) return;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        to[i][0] = from[0];
-      }
+      to[i][0] = from[0];
    }
-
    to_vec->size = 1;
    to_vec->flags |= VEC_SIZE_1;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points1_2d)( GLvector4f *to_vec,
                           const GLfloat m[16],
-                                      const GLvector4f *from_vec,
-                                      const GLubyte *mask,
-                                      const GLubyte flag )
+                          const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -138,26 +128,20 @@ TAG(transform_points1_2d)( GLvector4f *to_vec,
    const GLfloat m0 = m[0], m1 = m[1];
    const GLfloat m12 = m[12], m13 = m[13];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0];
-        to[i][0] = m0 * ox + m12;
-        to[i][1] = m1 * ox + m13;
-      }
+      const GLfloat ox = from[0];
+      to[i][0] = m0 * ox + m12;
+      to[i][1] = m1 * ox + m13;
    }
    to_vec->size = 2;
    to_vec->flags |= VEC_SIZE_2;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points1_2d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
-                                             const GLvector4f *from_vec,
-                                             const GLubyte *mask,
-                                             const GLubyte flag )
+                                 const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -165,27 +149,20 @@ TAG(transform_points1_2d_no_rot)( GLvector4f *to_vec,
    GLuint count = from_vec->count;
    const GLfloat m0 = m[0], m12 = m[12], m13 = m[13];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0];
-        to[i][0] = m0 * ox + m12;
-        to[i][1] =           m13;
-      }
+      const GLfloat ox = from[0];
+      to[i][0] = m0 * ox + m12;
+      to[i][1] =           m13;
    }
-
    to_vec->size = 2;
    to_vec->flags |= VEC_SIZE_2;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points1_3d)( GLvector4f *to_vec,
                           const GLfloat m[16],
-                                      const GLvector4f *from_vec,
-                                      const GLubyte *mask,
-                                      const GLubyte flag )
+                          const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -194,15 +171,11 @@ TAG(transform_points1_3d)( GLvector4f *to_vec,
    const GLfloat m0 = m[0], m1 = m[1], m2 = m[2];
    const GLfloat m12 = m[12], m13 = m[13], m14 = m[14];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0];
-        to[i][0] = m0 * ox + m12;
-        to[i][1] = m1 * ox + m13;
-        to[i][2] = m2 * ox + m14;
-      }
+      const GLfloat ox = from[0];
+      to[i][0] = m0 * ox + m12;
+      to[i][1] = m1 * ox + m13;
+      to[i][2] = m2 * ox + m14;
    }
    to_vec->size = 3;
    to_vec->flags |= VEC_SIZE_3;
@@ -210,12 +183,10 @@ TAG(transform_points1_3d)( GLvector4f *to_vec,
 }
 
 
-static void _XFORMAPI
+static void
 TAG(transform_points1_3d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
-                                             const GLvector4f *from_vec,
-                                             const GLubyte *mask,
-                                             const GLubyte flag )
+                                 const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -224,27 +195,21 @@ TAG(transform_points1_3d_no_rot)( GLvector4f *to_vec,
    const GLfloat m0 = m[0];
    const GLfloat m12 = m[12], m13 = m[13], m14 = m[14];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0];
-        to[i][0] = m0 * ox           + m12;
-        to[i][1] =                     m13;
-        to[i][2] =                     m14;
-      }
+      const GLfloat ox = from[0];
+      to[i][0] = m0 * ox           + m12;
+      to[i][1] =                     m13;
+      to[i][2] =                     m14;
    }
    to_vec->size = 3;
    to_vec->flags |= VEC_SIZE_3;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points1_perspective)( GLvector4f *to_vec,
                                    const GLfloat m[16],
-                                               const GLvector4f *from_vec,
-                                               const GLubyte *mask,
-                                               const GLubyte flag )
+                                   const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -252,16 +217,12 @@ TAG(transform_points1_perspective)( GLvector4f *to_vec,
    GLuint count = from_vec->count;
    const GLfloat m0 = m[0], m14 = m[14];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0];
-        to[i][0] = m0 * ox                ;
-        to[i][1] =           0            ;
-        to[i][2] =                     m14;
-        to[i][3] = 0;
-      }
+      const GLfloat ox = from[0];
+      to[i][0] = m0 * ox                ;
+      to[i][1] =           0            ;
+      to[i][2] =                     m14;
+      to[i][3] = 0;
    }
    to_vec->size = 4;
    to_vec->flags |= VEC_SIZE_4;
@@ -275,12 +236,10 @@ TAG(transform_points1_perspective)( GLvector4f *to_vec,
  * present early in the geometry pipeline and throughout the
  * texture pipeline.
  */
-static void _XFORMAPI
+static void
 TAG(transform_points2_general)( GLvector4f *to_vec,
                                const GLfloat m[16],
-                                           const GLvector4f *from_vec,
-                                           const GLubyte *mask,
-                                           const GLubyte flag )
+                               const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -291,54 +250,43 @@ TAG(transform_points2_general)( GLvector4f *to_vec,
    const GLfloat m2 = m[2],  m6 = m[6],  m14 = m[14];
    const GLfloat m3 = m[3],  m7 = m[7],  m15 = m[15];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1];
-        to[i][0] = m0 * ox + m4 * oy + m12;
-        to[i][1] = m1 * ox + m5 * oy + m13;
-        to[i][2] = m2 * ox + m6 * oy + m14;
-        to[i][3] = m3 * ox + m7 * oy + m15;
-      }
+      const GLfloat ox = from[0], oy = from[1];
+      to[i][0] = m0 * ox + m4 * oy + m12;
+      to[i][1] = m1 * ox + m5 * oy + m13;
+      to[i][2] = m2 * ox + m6 * oy + m14;
+      to[i][3] = m3 * ox + m7 * oy + m15;
    }
    to_vec->size = 4;
    to_vec->flags |= VEC_SIZE_4;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points2_identity)( GLvector4f *to_vec,
                                 const GLfloat m[16],
-                                            const GLvector4f *from_vec,
-                                            const GLubyte *mask,
-                                            const GLubyte flag )
+                                const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
    GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
    GLuint count = from_vec->count;
    GLuint i;
-   (void) mask;
-   (void) flag;
+   (void) m;
    if (to_vec == from_vec) return;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        to[i][0] = from[0];
-        to[i][1] = from[1];
-      }
+      to[i][0] = from[0];
+      to[i][1] = from[1];
    }
    to_vec->size = 2;
    to_vec->flags |= VEC_SIZE_2;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points2_2d)( GLvector4f *to_vec,
                           const GLfloat m[16],
-                                      const GLvector4f *from_vec,
-                                      const GLubyte *mask,
-                                      const GLubyte flag )
+                          const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -347,27 +295,20 @@ TAG(transform_points2_2d)( GLvector4f *to_vec,
    const GLfloat m0 = m[0], m1 = m[1], m4 = m[4], m5 = m[5];
    const GLfloat m12 = m[12], m13 = m[13];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1];
-        to[i][0] = m0 * ox + m4 * oy + m12;
-        to[i][1] = m1 * ox + m5 * oy + m13;
-      }
+      const GLfloat ox = from[0], oy = from[1];
+      to[i][0] = m0 * ox + m4 * oy + m12;
+      to[i][1] = m1 * ox + m5 * oy + m13;
    }
-
    to_vec->size = 2;
    to_vec->flags |= VEC_SIZE_2;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points2_2d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
-                                             const GLvector4f *from_vec,
-                                             const GLubyte *mask,
-                                             const GLubyte flag )
+                                 const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -375,27 +316,20 @@ TAG(transform_points2_2d_no_rot)( GLvector4f *to_vec,
    GLuint count = from_vec->count;
    const GLfloat m0 = m[0], m5 = m[5], m12 = m[12], m13 = m[13];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1];
-        to[i][0] = m0 * ox           + m12;
-        to[i][1] =           m5 * oy + m13;
-      }
+      const GLfloat ox = from[0], oy = from[1];
+      to[i][0] = m0 * ox           + m12;
+      to[i][1] =           m5 * oy + m13;
    }
-
    to_vec->size = 2;
    to_vec->flags |= VEC_SIZE_2;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points2_3d)( GLvector4f *to_vec,
                           const GLfloat m[16],
-                                      const GLvector4f *from_vec,
-                                      const GLubyte *mask,
-                                      const GLubyte flag )
+                          const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -404,15 +338,11 @@ TAG(transform_points2_3d)( GLvector4f *to_vec,
    const GLfloat m0 = m[0], m1 = m[1], m2 = m[2], m4 = m[4], m5 = m[5];
    const GLfloat m6 = m[6], m12 = m[12], m13 = m[13], m14 = m[14];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1];
-        to[i][0] = m0 * ox + m4 * oy + m12;
-        to[i][1] = m1 * ox + m5 * oy + m13;
-        to[i][2] = m2 * ox + m6 * oy + m14;
-      }
+      const GLfloat ox = from[0], oy = from[1];
+      to[i][0] = m0 * ox + m4 * oy + m12;
+      to[i][1] = m1 * ox + m5 * oy + m13;
+      to[i][2] = m2 * ox + m6 * oy + m14;
    }
    to_vec->size = 3;
    to_vec->flags |= VEC_SIZE_3;
@@ -423,12 +353,10 @@ TAG(transform_points2_3d)( GLvector4f *to_vec,
 /* I would actually say this was a fairly important function, from
  * a texture transformation point of view.
  */
-static void _XFORMAPI
+static void
 TAG(transform_points2_3d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
-                                             const GLvector4f *from_vec,
-                                             const GLubyte *mask,
-                                             const GLubyte flag )
+                                 const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -437,15 +365,11 @@ TAG(transform_points2_3d_no_rot)( GLvector4f *to_vec,
    const GLfloat m0 = m[0], m5 = m[5];
    const GLfloat m12 = m[12], m13 = m[13], m14 = m[14];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1];
-        to[i][0] = m0 * ox           + m12;
-        to[i][1] =           m5 * oy + m13;
-        to[i][2] =                     m14;
-      }
+      const GLfloat ox = from[0], oy = from[1];
+      to[i][0] = m0 * ox           + m12;
+      to[i][1] =           m5 * oy + m13;
+      to[i][2] =                     m14;
    }
    if (m14 == 0) {
       to_vec->size = 2;
@@ -458,12 +382,10 @@ TAG(transform_points2_3d_no_rot)( GLvector4f *to_vec,
 }
 
 
-static void _XFORMAPI
+static void
 TAG(transform_points2_perspective)( GLvector4f *to_vec,
                                    const GLfloat m[16],
-                                               const GLvector4f *from_vec,
-                                               const GLubyte *mask,
-                                               const GLubyte flag )
+                                   const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -471,16 +393,12 @@ TAG(transform_points2_perspective)( GLvector4f *to_vec,
    GLuint count = from_vec->count;
    const GLfloat m0 = m[0], m5 = m[5], m14 = m[14];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1];
-        to[i][0] = m0 * ox                ;
-        to[i][1] =           m5 * oy      ;
-        to[i][2] =                     m14;
-        to[i][3] = 0;
-      }
+      const GLfloat ox = from[0], oy = from[1];
+      to[i][0] = m0 * ox                ;
+      to[i][1] =           m5 * oy      ;
+      to[i][2] =                     m14;
+      to[i][3] = 0;
    }
    to_vec->size = 4;
    to_vec->flags |= VEC_SIZE_4;
@@ -489,12 +407,10 @@ TAG(transform_points2_perspective)( GLvector4f *to_vec,
 
 
 
-static void _XFORMAPI
+static void
 TAG(transform_points3_general)( GLvector4f *to_vec,
                                const GLfloat m[16],
-                                           const GLvector4f *from_vec,
-                                           const GLubyte *mask,
-                                           const GLubyte flag )
+                               const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -505,55 +421,44 @@ TAG(transform_points3_general)( GLvector4f *to_vec,
    const GLfloat m2 = m[2],  m6 = m[6],  m10 = m[10],  m14 = m[14];
    const GLfloat m3 = m[3],  m7 = m[7],  m11 = m[11],  m15 = m[15];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1], oz = from[2];
-        to[i][0] = m0 * ox + m4 * oy + m8  * oz + m12;
-        to[i][1] = m1 * ox + m5 * oy + m9  * oz + m13;
-        to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14;
-        to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15;
-      }
+      const GLfloat ox = from[0], oy = from[1], oz = from[2];
+      to[i][0] = m0 * ox + m4 * oy + m8  * oz + m12;
+      to[i][1] = m1 * ox + m5 * oy + m9  * oz + m13;
+      to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14;
+      to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15;
    }
    to_vec->size = 4;
    to_vec->flags |= VEC_SIZE_4;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points3_identity)( GLvector4f *to_vec,
                                 const GLfloat m[16],
-                                            const GLvector4f *from_vec,
-                                            const GLubyte *mask,
-                                            const GLubyte flag )
+                                const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
    GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
    GLuint count = from_vec->count;
    GLuint i;
-   (void) mask;
-   (void) flag;
+   (void) m;
    if (to_vec == from_vec) return;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        to[i][0] = from[0];
-        to[i][1] = from[1];
-        to[i][2] = from[2];
-      }
+      to[i][0] = from[0];
+      to[i][1] = from[1];
+      to[i][2] = from[2];
    }
    to_vec->size = 3;
    to_vec->flags |= VEC_SIZE_3;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points3_2d)( GLvector4f *to_vec,
                           const GLfloat m[16],
-                                      const GLvector4f *from_vec,
-                                      const GLubyte *mask,
-                                      const GLubyte flag )
+                          const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -562,27 +467,21 @@ TAG(transform_points3_2d)( GLvector4f *to_vec,
    const GLfloat m0 = m[0], m1 = m[1], m4 = m[4], m5 = m[5];
    const GLfloat m12 = m[12], m13 = m[13];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1], oz = from[2];
-        to[i][0] = m0 * ox + m4 * oy            + m12       ;
-        to[i][1] = m1 * ox + m5 * oy            + m13       ;
-        to[i][2] =                   +       oz             ;
-      }
+      const GLfloat ox = from[0], oy = from[1], oz = from[2];
+      to[i][0] = m0 * ox + m4 * oy            + m12       ;
+      to[i][1] = m1 * ox + m5 * oy            + m13       ;
+      to[i][2] =                   +       oz             ;
    }
    to_vec->size = 3;
    to_vec->flags |= VEC_SIZE_3;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points3_2d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
-                                             const GLvector4f *from_vec,
-                                             const GLubyte *mask,
-                                             const GLubyte flag )
+                                 const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -590,27 +489,21 @@ TAG(transform_points3_2d_no_rot)( GLvector4f *to_vec,
    GLuint count = from_vec->count;
    const GLfloat m0 = m[0], m5 = m[5], m12 = m[12], m13 = m[13];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1], oz = from[2];
-        to[i][0] = m0 * ox                      + m12       ;
-        to[i][1] =           m5 * oy            + m13       ;
-        to[i][2] =                   +       oz             ;
-      }
+      const GLfloat ox = from[0], oy = from[1], oz = from[2];
+      to[i][0] = m0 * ox                      + m12       ;
+      to[i][1] =           m5 * oy            + m13       ;
+      to[i][2] =                   +       oz             ;
    }
    to_vec->size = 3;
    to_vec->flags |= VEC_SIZE_3;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points3_3d)( GLvector4f *to_vec,
                           const GLfloat m[16],
-                                      const GLvector4f *from_vec,
-                                      const GLubyte *mask,
-                                      const GLubyte flag )
+                          const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -620,15 +513,11 @@ TAG(transform_points3_3d)( GLvector4f *to_vec,
    const GLfloat m6 = m[6], m8 = m[8], m9 = m[9], m10 = m[10];
    const GLfloat m12 = m[12], m13 = m[13], m14 = m[14];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1], oz = from[2];
-        to[i][0] = m0 * ox + m4 * oy +  m8 * oz + m12       ;
-        to[i][1] = m1 * ox + m5 * oy +  m9 * oz + m13       ;
-        to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14       ;
-      }
+      const GLfloat ox = from[0], oy = from[1], oz = from[2];
+      to[i][0] = m0 * ox + m4 * oy +  m8 * oz + m12       ;
+      to[i][1] = m1 * ox + m5 * oy +  m9 * oz + m13       ;
+      to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14       ;
    }
    to_vec->size = 3;
    to_vec->flags |= VEC_SIZE_3;
@@ -637,12 +526,10 @@ TAG(transform_points3_3d)( GLvector4f *to_vec,
 
 /* previously known as ortho...
  */
-static void _XFORMAPI
+static void
 TAG(transform_points3_3d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
-                                             const GLvector4f *from_vec,
-                                             const GLubyte *mask,
-                                             const GLubyte flag )
+                                 const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -651,27 +538,21 @@ TAG(transform_points3_3d_no_rot)( GLvector4f *to_vec,
    const GLfloat m0 = m[0], m5 = m[5];
    const GLfloat m10 = m[10], m12 = m[12], m13 = m[13], m14 = m[14];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1], oz = from[2];
-        to[i][0] = m0 * ox                      + m12       ;
-        to[i][1] =           m5 * oy            + m13       ;
-        to[i][2] =                     m10 * oz + m14       ;
-      }
+      const GLfloat ox = from[0], oy = from[1], oz = from[2];
+      to[i][0] = m0 * ox                      + m12       ;
+      to[i][1] =           m5 * oy            + m13       ;
+      to[i][2] =                     m10 * oz + m14       ;
    }
    to_vec->size = 3;
    to_vec->flags |= VEC_SIZE_3;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points3_perspective)( GLvector4f *to_vec,
                                    const GLfloat m[16],
-                                               const GLvector4f *from_vec,
-                                               const GLubyte *mask,
-                                               const GLubyte flag )
+                                   const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -680,16 +561,12 @@ TAG(transform_points3_perspective)( GLvector4f *to_vec,
    const GLfloat m0 = m[0], m5 = m[5], m8 = m[8], m9 = m[9];
    const GLfloat m10 = m[10], m14 = m[14];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1], oz = from[2];
-        to[i][0] = m0 * ox           + m8  * oz       ;
-        to[i][1] =           m5 * oy + m9  * oz       ;
-        to[i][2] =                     m10 * oz + m14 ;
-        to[i][3] =                          -oz       ;
-      }
+      const GLfloat ox = from[0], oy = from[1], oz = from[2];
+      to[i][0] = m0 * ox           + m8  * oz       ;
+      to[i][1] =           m5 * oy + m9  * oz       ;
+      to[i][2] =                     m10 * oz + m14 ;
+      to[i][3] =                          -oz       ;
    }
    to_vec->size = 4;
    to_vec->flags |= VEC_SIZE_4;
@@ -698,12 +575,10 @@ TAG(transform_points3_perspective)( GLvector4f *to_vec,
 
 
 
-static void _XFORMAPI
+static void
 TAG(transform_points4_general)( GLvector4f *to_vec,
                                const GLfloat m[16],
-                                           const GLvector4f *from_vec,
-                                           const GLubyte *mask,
-                                           const GLubyte flag )
+                               const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -714,56 +589,45 @@ TAG(transform_points4_general)( GLvector4f *to_vec,
    const GLfloat m2 = m[2],  m6 = m[6],  m10 = m[10],  m14 = m[14];
    const GLfloat m3 = m[3],  m7 = m[7],  m11 = m[11],  m15 = m[15];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
-        to[i][0] = m0 * ox + m4 * oy + m8  * oz + m12 * ow;
-        to[i][1] = m1 * ox + m5 * oy + m9  * oz + m13 * ow;
-        to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow;
-        to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15 * ow;
-      }
+      const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
+      to[i][0] = m0 * ox + m4 * oy + m8  * oz + m12 * ow;
+      to[i][1] = m1 * ox + m5 * oy + m9  * oz + m13 * ow;
+      to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow;
+      to[i][3] = m3 * ox + m7 * oy + m11 * oz + m15 * ow;
    }
    to_vec->size = 4;
    to_vec->flags |= VEC_SIZE_4;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points4_identity)( GLvector4f *to_vec,
                                 const GLfloat m[16],
-                                            const GLvector4f *from_vec,
-                                            const GLubyte *mask,
-                                            const GLubyte flag )
+                                const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
    GLfloat (*to)[4] = (GLfloat (*)[4])to_vec->start;
    GLuint count = from_vec->count;
    GLuint i;
-   (void) mask;
-   (void) flag;
+   (void) m;
    if (to_vec == from_vec) return;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        to[i][0] = from[0];
-        to[i][1] = from[1];
-        to[i][2] = from[2];
-        to[i][3] = from[3];
-      }
+      to[i][0] = from[0];
+      to[i][1] = from[1];
+      to[i][2] = from[2];
+      to[i][3] = from[3];
    }
    to_vec->size = 4;
    to_vec->flags |= VEC_SIZE_4;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points4_2d)( GLvector4f *to_vec,
                           const GLfloat m[16],
-                                      const GLvector4f *from_vec,
-                                      const GLubyte *mask,
-                                      const GLubyte flag )
+                          const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -772,28 +636,22 @@ TAG(transform_points4_2d)( GLvector4f *to_vec,
    const GLfloat m0 = m[0], m1 = m[1], m4 = m[4], m5 = m[5];
    const GLfloat m12 = m[12], m13 = m[13];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
-        to[i][0] = m0 * ox + m4 * oy            + m12 * ow;
-        to[i][1] = m1 * ox + m5 * oy            + m13 * ow;
-        to[i][2] =                   +       oz           ;
-        to[i][3] =                                      ow;
-      }
+      const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
+      to[i][0] = m0 * ox + m4 * oy            + m12 * ow;
+      to[i][1] = m1 * ox + m5 * oy            + m13 * ow;
+      to[i][2] =                   +       oz           ;
+      to[i][3] =                                      ow;
    }
    to_vec->size = 4;
    to_vec->flags |= VEC_SIZE_4;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points4_2d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
-                                             const GLvector4f *from_vec,
-                                             const GLubyte *mask,
-                                             const GLubyte flag )
+                                 const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -801,28 +659,22 @@ TAG(transform_points4_2d_no_rot)( GLvector4f *to_vec,
    GLuint count = from_vec->count;
    const GLfloat m0 = m[0], m5 = m[5], m12 = m[12], m13 = m[13];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
-        to[i][0] = m0 * ox                      + m12 * ow;
-        to[i][1] =           m5 * oy            + m13 * ow;
-        to[i][2] =                   +       oz           ;
-        to[i][3] =                                      ow;
-      }
+      const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
+      to[i][0] = m0 * ox                      + m12 * ow;
+      to[i][1] =           m5 * oy            + m13 * ow;
+      to[i][2] =                   +       oz           ;
+      to[i][3] =                                      ow;
    }
    to_vec->size = 4;
    to_vec->flags |= VEC_SIZE_4;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points4_3d)( GLvector4f *to_vec,
                           const GLfloat m[16],
-                                      const GLvector4f *from_vec,
-                                      const GLubyte *mask,
-                                      const GLubyte flag )
+                          const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -832,28 +684,22 @@ TAG(transform_points4_3d)( GLvector4f *to_vec,
    const GLfloat m6 = m[6], m8 = m[8], m9 = m[9], m10 = m[10];
    const GLfloat m12 = m[12], m13 = m[13], m14 = m[14];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
-        to[i][0] = m0 * ox + m4 * oy +  m8 * oz + m12 * ow;
-        to[i][1] = m1 * ox + m5 * oy +  m9 * oz + m13 * ow;
-        to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow;
-        to[i][3] =                                      ow;
-      }
+      const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
+      to[i][0] = m0 * ox + m4 * oy +  m8 * oz + m12 * ow;
+      to[i][1] = m1 * ox + m5 * oy +  m9 * oz + m13 * ow;
+      to[i][2] = m2 * ox + m6 * oy + m10 * oz + m14 * ow;
+      to[i][3] =                                      ow;
    }
    to_vec->size = 4;
    to_vec->flags |= VEC_SIZE_4;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points4_3d_no_rot)( GLvector4f *to_vec,
                                  const GLfloat m[16],
-                                             const GLvector4f *from_vec,
-                                             const GLubyte *mask,
-                                             const GLubyte flag )
+                                 const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -862,28 +708,22 @@ TAG(transform_points4_3d_no_rot)( GLvector4f *to_vec,
    const GLfloat m0 = m[0], m5 = m[5];
    const GLfloat m10 = m[10], m12 = m[12], m13 = m[13], m14 = m[14];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
-        to[i][0] = m0 * ox                      + m12 * ow;
-        to[i][1] =           m5 * oy            + m13 * ow;
-        to[i][2] =                     m10 * oz + m14 * ow;
-        to[i][3] =                                      ow;
-      }
+      const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
+      to[i][0] = m0 * ox                      + m12 * ow;
+      to[i][1] =           m5 * oy            + m13 * ow;
+      to[i][2] =                     m10 * oz + m14 * ow;
+      to[i][3] =                                      ow;
    }
    to_vec->size = 4;
    to_vec->flags |= VEC_SIZE_4;
    to_vec->count = from_vec->count;
 }
 
-static void _XFORMAPI
+static void
 TAG(transform_points4_perspective)( GLvector4f *to_vec,
                                    const GLfloat m[16],
-                                               const GLvector4f *from_vec,
-                                               const GLubyte *mask,
-                                               const GLubyte flag )
+                                   const GLvector4f *from_vec )
 {
    const GLuint stride = from_vec->stride;
    GLfloat *from = from_vec->start;
@@ -892,35 +732,30 @@ TAG(transform_points4_perspective)( GLvector4f *to_vec,
    const GLfloat m0 = m[0], m5 = m[5], m8 = m[8], m9 = m[9];
    const GLfloat m10 = m[10], m14 = m[14];
    GLuint i;
-   (void) mask;
-   (void) flag;
    STRIDE_LOOP {
-      CLIP_CHECK {
-        const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
-        to[i][0] = m0 * ox           + m8  * oz            ;
-        to[i][1] =           m5 * oy + m9  * oz            ;
-        to[i][2] =                     m10 * oz + m14 * ow ;
-        to[i][3] =                          -oz            ;
-      }
+      const GLfloat ox = from[0], oy = from[1], oz = from[2], ow = from[3];
+      to[i][0] = m0 * ox           + m8  * oz            ;
+      to[i][1] =           m5 * oy + m9  * oz            ;
+      to[i][2] =                     m10 * oz + m14 * ow ;
+      to[i][3] =                          -oz            ;
    }
-
    to_vec->size = 4;
    to_vec->flags |= VEC_SIZE_4;
    to_vec->count = from_vec->count;
 }
 
-static transform_func _XFORMAPI TAG(transform_tab_1)[7];
-static transform_func _XFORMAPI TAG(transform_tab_2)[7];
-static transform_func _XFORMAPI TAG(transform_tab_3)[7];
-static transform_func _XFORMAPI TAG(transform_tab_4)[7];
+static transform_func TAG(transform_tab_1)[7];
+static transform_func TAG(transform_tab_2)[7];
+static transform_func TAG(transform_tab_3)[7];
+static transform_func TAG(transform_tab_4)[7];
 
 /* Similar functions could be called several times, with more highly
  * optimized routines overwriting the arrays.  This only occurs during
  * startup.
  */
-static void _XFORMAPI TAG(init_c_transformations)( void )
+static void TAG(init_c_transformations)( void )
 {
-#define TAG_TAB   gl_transform_tab[IDX]
+#define TAG_TAB   _mesa_transform_tab
 #define TAG_TAB_1 TAG(transform_tab_1)
 #define TAG_TAB_2 TAG(transform_tab_2)
 #define TAG_TAB_3 TAG(transform_tab_3)
@@ -935,7 +770,7 @@ static void _XFORMAPI TAG(init_c_transformations)( void )
    TAG_TAB_1[MATRIX_GENERAL]     = TAG(transform_points1_general);
    TAG_TAB_1[MATRIX_IDENTITY]    = TAG(transform_points1_identity);
    TAG_TAB_1[MATRIX_3D_NO_ROT]   = TAG(transform_points1_3d_no_rot);
-   TAG_TAB_1[MATRIX_PERSPECTIVE] = TAG(transform_points1_perspective) ;
+   TAG_TAB_1[MATRIX_PERSPECTIVE] = TAG(transform_points1_perspective);
    TAG_TAB_1[MATRIX_2D]          = TAG(transform_points1_2d);
    TAG_TAB_1[MATRIX_2D_NO_ROT]   = TAG(transform_points1_2d_no_rot);
    TAG_TAB_1[MATRIX_3D]          = TAG(transform_points1_3d);
@@ -944,7 +779,7 @@ static void _XFORMAPI TAG(init_c_transformations)( void )
    TAG_TAB_2[MATRIX_GENERAL]     = TAG(transform_points2_general);
    TAG_TAB_2[MATRIX_IDENTITY]    = TAG(transform_points2_identity);
    TAG_TAB_2[MATRIX_3D_NO_ROT]   = TAG(transform_points2_3d_no_rot);
-   TAG_TAB_2[MATRIX_PERSPECTIVE] = TAG(transform_points2_perspective) ;
+   TAG_TAB_2[MATRIX_PERSPECTIVE] = TAG(transform_points2_perspective);
    TAG_TAB_2[MATRIX_2D]          = TAG(transform_points2_2d);
    TAG_TAB_2[MATRIX_2D_NO_ROT]   = TAG(transform_points2_2d_no_rot);
    TAG_TAB_2[MATRIX_3D]          = TAG(transform_points2_3d);
@@ -968,4 +803,8 @@ static void _XFORMAPI TAG(init_c_transformations)( void )
    TAG_TAB_4[MATRIX_3D]          = TAG(transform_points4_3d);
 
 #undef TAG_TAB
+#undef TAG_TAB_1
+#undef TAG_TAB_2
+#undef TAG_TAB_3
+#undef TAG_TAB_4
 }