From b46926c4beff4ac14ac0cf2e3bc52f8118ed4d2a Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Wed, 3 Oct 2007 10:31:42 -0400 Subject: Unify the definitions of the 4 component dot product into one location. --- src/mesa/pipe/draw/draw_clip.c | 14 -------------- src/mesa/pipe/draw/draw_private.h | 10 ++++++++++ src/mesa/pipe/draw/draw_vertex_shader.c | 11 ----------- 3 files changed, 10 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/mesa/pipe/draw/draw_clip.c b/src/mesa/pipe/draw/draw_clip.c index 4e1483f025..222022d6c1 100644 --- a/src/mesa/pipe/draw/draw_clip.c +++ b/src/mesa/pipe/draw/draw_clip.c @@ -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 ) diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h index ff38925fc0..b3f1c4d23e 100644 --- a/src/mesa/pipe/draw/draw_private.h +++ b/src/mesa/pipe/draw/draw_private.h @@ -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 */ diff --git a/src/mesa/pipe/draw/draw_vertex_shader.c b/src/mesa/pipe/draw/draw_vertex_shader.c index d17496a24f..49ff3b32ff 100644 --- a/src/mesa/pipe/draw/draw_vertex_shader.c +++ b/src/mesa/pipe/draw/draw_vertex_shader.c @@ -40,17 +40,6 @@ #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) { -- cgit v1.2.3