Unify the definitions of the 4 component dot product into one
authorZack Rusin <zack@tungstengraphics.com>
Wed, 3 Oct 2007 14:31:42 +0000 (10:31 -0400)
committerZack Rusin <zack@tungstengraphics.com>
Wed, 3 Oct 2007 14:33:38 +0000 (10:33 -0400)
location.

src/mesa/pipe/draw/draw_clip.c
src/mesa/pipe/draw/draw_private.h
src/mesa/pipe/draw/draw_vertex_shader.c

index 4e1483f02526fe44349fc977f7cf30b9dc93492c..222022d6c10e6ed42e770ad7080da30fbb8a49ce 100644 (file)
@@ -138,20 +138,6 @@ static void interp( const struct clipper *clip,
    }
 }
 
-
-
-static INLINE float dot4( const float *a,
-                           const float *b )
-{
-   float result = (a[0]*b[0] +
-                    a[1]*b[1] +
-                    a[2]*b[2] +
-                    a[3]*b[3]);
-
-   return result;
-}
-
-
 #if 0   
 static INLINE void do_tri( struct draw_stage *next,
                           struct prim_header *header )
index ff38925fc076990598e52e53e84537974a849286..b3f1c4d23ea770c0ca12612b01e3b8e9fd5956d1 100644 (file)
@@ -290,5 +290,15 @@ dup_vert( struct draw_stage *stage,
    return tmp;
 }
 
+static INLINE float
+dot4(const float *a, const float *b)
+{
+   float result = (a[0]*b[0] +
+                   a[1]*b[1] +
+                   a[2]*b[2] +
+                   a[3]*b[3]);
+
+   return result;
+}
 
 #endif /* DRAW_PRIVATE_H */
index d17496a24f0e1272db9d683df18a4aec818ff572..49ff3b32ff4a8a4a5d92eb43a6d80f6151733f05 100644 (file)
 
 #include "pipe/tgsi/exec/tgsi_core.h"
 
-
-static INLINE float dot4(const float *a, const float *b)
-{
-   float result = (a[0]*b[0] +
-                   a[1]*b[1] +
-                   a[2]*b[2] +
-                   a[3]*b[3]);
-
-   return result;
-}
-
 static INLINE unsigned
 compute_clipmask(const float *clip, const float (*plane)[4], unsigned nr)
 {