diff options
author | Dave Airlie <airlied@redhat.com> | 2009-02-13 01:11:25 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-02-13 01:11:25 +1000 |
commit | 53116910b10e3b8a05f42970eff311c21808699f (patch) | |
tree | 6831e50a56a02fed324f8cb119e05d837e00d7cf /src/mesa/math | |
parent | 7e104f9cde94279a902b408e8d1cf21779b393a8 (diff) | |
parent | 0ccbc3c905f0594a35d72887a1f115e148aaa596 (diff) |
Merge remote branch 'origin/master' into radeon-rewrite
Conflicts:
configure.ac
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r300/r300_render.c
Diffstat (limited to 'src/mesa/math')
-rw-r--r-- | src/mesa/math/m_debug_xform.c | 3 | ||||
-rw-r--r-- | src/mesa/math/m_matrix.h | 12 | ||||
-rw-r--r-- | src/mesa/math/m_xform.c | 8 | ||||
-rw-r--r-- | src/mesa/math/mathmod.h | 2 |
4 files changed, 14 insertions, 11 deletions
diff --git a/src/mesa/math/m_debug_xform.c b/src/mesa/math/m_debug_xform.c index ec22c7052d..df8cc066b6 100644 --- a/src/mesa/math/m_debug_xform.c +++ b/src/mesa/math/m_debug_xform.c @@ -206,7 +206,8 @@ static int test_transform_function( transform_func func, int psize, case VAR: break; default: - abort(); + ASSERT(0); + return 0; } } } diff --git a/src/mesa/math/m_matrix.h b/src/mesa/math/m_matrix.h index e8303f3ac5..a8d9000e89 100644 --- a/src/mesa/math/m_matrix.h +++ b/src/mesa/math/m_matrix.h @@ -189,6 +189,18 @@ do { \ } while (0) +/** + * Transform a direction by a matrix. + */ +#define TRANSFORM_DIRECTION( TO, DIR, MAT ) \ +do { \ + TO[0] = DIR[0] * MAT[0] + DIR[1] * MAT[4] + DIR[2] * MAT[8]; \ + TO[1] = DIR[0] * MAT[1] + DIR[1] * MAT[5] + DIR[2] * MAT[9]; \ + TO[2] = DIR[0] * MAT[2] + DIR[1] * MAT[6] + DIR[2] * MAT[10];\ +} while (0) + + + /*@}*/ diff --git a/src/mesa/math/m_xform.c b/src/mesa/math/m_xform.c index 901ae5b416..fdc8abd434 100644 --- a/src/mesa/math/m_xform.c +++ b/src/mesa/math/m_xform.c @@ -220,11 +220,3 @@ _math_init_transformation( void ) _mesa_init_all_x86_64_transform_asm(); #endif } - -void -_math_init( void ) -{ - _math_init_transformation(); - _math_init_translate(); - _math_init_eval(); -} diff --git a/src/mesa/math/mathmod.h b/src/mesa/math/mathmod.h index 6fbaaea94b..fb0862b5b1 100644 --- a/src/mesa/math/mathmod.h +++ b/src/mesa/math/mathmod.h @@ -36,6 +36,4 @@ #ifndef _MESA_MATH_H_ #define _MESA_MATH_H_ -extern void _math_init( void ); - #endif |