diff options
author | Brian Paul <brianp@vmware.com> | 2009-02-11 13:52:17 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-02-11 13:52:17 -0700 |
commit | 2218592d47b963791105f5b8fa1a0b3f3a07f674 (patch) | |
tree | c7a10c524f2c2242e64cbe8f90697b6fae43fa8d /src | |
parent | c5bae14245192e83e7a91a6b72dc8451dd76f8ef (diff) |
mesa: get rid of _math_init()
Only VBO uses the evaluator code so call _math_init_eval() there.
Only TNL uses the transform/translate code so call _math_init_transformation()
and _math_init_translate9) there.
This is a step toward resolving some symbol collisions between Mesa's and
gallium's x86 codegen.
Have VBO and TNL modules call _math_init_transformation()
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/context.c | 7 | ||||
-rw-r--r-- | src/mesa/math/m_xform.c | 8 | ||||
-rw-r--r-- | src/mesa/math/mathmod.h | 2 | ||||
-rw-r--r-- | src/mesa/tnl/t_context.c | 5 | ||||
-rw-r--r-- | src/mesa/vbo/vbo_context.c | 3 |
5 files changed, 8 insertions, 17 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 39c7fa037e..c5b90d9cda 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -151,10 +151,7 @@ #include "shader/atifragshader.h" #endif #if _HAVE_FULL_GL -#include "math/m_translate.h" #include "math/m_matrix.h" -#include "math/m_xform.h" -#include "math/mathmod.h" #endif #ifdef USE_SPARC_ASM @@ -387,13 +384,9 @@ one_time_init( GLcontext *ctx ) _mesa_init_sqrt_table(); -#if _HAVE_FULL_GL - _math_init(); - for (i = 0; i < 256; i++) { _mesa_ubyte_to_float_color_tab[i] = (float) i / 255.0F; } -#endif #ifdef USE_SPARC_ASM _mesa_init_sparc_glapi_relocs(); 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 diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index 7bfc7b0061..f0d31fdac3 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -32,6 +32,8 @@ #include "main/macros.h" #include "main/mtypes.h" #include "main/light.h" +#include "math/m_translate.h" +#include "math/m_xform.h" #include "tnl.h" #include "t_context.h" @@ -81,6 +83,9 @@ _tnl_CreateContext( GLcontext *ctx ) /* plug in the VBO drawing function */ vbo_set_draw_func(ctx, _tnl_draw_prims); + _math_init_transformation(); + _math_init_translate(); + return GL_TRUE; } diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c index 467ab4e3e5..ca8190fd05 100644 --- a/src/mesa/vbo/vbo_context.c +++ b/src/mesa/vbo/vbo_context.c @@ -28,6 +28,7 @@ #include "main/imports.h" #include "main/mtypes.h" #include "main/api_arrayelt.h" +#include "math/m_eval.h" #include "vbo.h" #include "vbo_context.h" @@ -230,6 +231,8 @@ GLboolean _vbo_CreateContext( GLcontext *ctx ) vbo_save_init( ctx ); #endif + _math_init_eval(); + return GL_TRUE; } |