Ejemplo n.º 1
0
/*
 * This is called only once.  It initializes several tables with pointers
 * to optimized transformation functions.  This is where we can test for
 * AMD 3Dnow! capability, Intel SSE, etc. and hook in the right code.
 */
void
_math_init_transformation( void )
{
   init_c_transformations();
   init_c_norm_transform();
   init_c_cliptest();
   init_copy0();
   init_dotprod();

#ifdef DEBUG
   _math_test_all_transform_functions( "default" );
   _math_test_all_normal_transform_functions( "default" );
   _math_test_all_cliptest_functions( "default" );
#endif

#ifdef USE_X86_ASM
   _mesa_init_all_x86_transform_asm();
#elif defined( USE_SPARC_ASM )
   _mesa_init_all_sparc_transform_asm();
#elif defined( USE_PPC_ASM )
   _mesa_init_all_ppc_transform_asm();
#elif defined( USE_X86_64_ASM )
   _mesa_init_all_x86_64_transform_asm();
#endif
}
Ejemplo n.º 2
0
void
tnl_clip_prepare(struct gl_context *ctx)
{
   /* Neither the x86 nor sparc asm cliptest functions have been updated
    * for ARB_depth_clamp, so force the C paths.
    */
   if (ctx->Transform.DepthClamp) {
      static GLboolean c_funcs_installed = GL_FALSE;
      if (!c_funcs_installed) {
         init_c_cliptest();
         c_funcs_installed = GL_TRUE;
      }
   }
}