protected all codegen behind AllowCodegen

This commit is contained in:
Daniel Borca 2004-04-05 06:49:36 +00:00
parent 8ef874f1a5
commit 8cc059ea64
3 changed files with 9 additions and 10 deletions

View file

@ -81,6 +81,9 @@ _tnl_CreateContext( GLcontext *ctx )
return GL_FALSE;
}
if (getenv("MESA_CODEGEN"))
tnl->AllowCodegen = GL_TRUE;
/* Initialize the VB.
*/
tnl->vb.Size = ctx->Const.MaxArrayLockSize + MAX_CLIPPED_VERTICES;
@ -121,10 +124,6 @@ _tnl_CreateContext( GLcontext *ctx )
tnl->Driver.Render.PrimTabVerts = _tnl_render_tab_verts;
tnl->Driver.NotifyMaterialChange = _mesa_validate_all_lighting_tables;
if (getenv("MESA_CODEGEN"))
tnl->AllowCodegen = GL_TRUE;
return GL_TRUE;
}

View file

@ -905,7 +905,9 @@ void _tnl_vtx_init( GLcontext *ctx )
_tnl_current_init( ctx );
_tnl_exec_vtxfmt_init( ctx );
_tnl_generic_exec_vtxfmt_init( ctx );
_tnl_x86_exec_vtxfmt_init( ctx ); /* x86 DISPATCH_ATTRFV */
if (tnl->AllowCodegen) {
_tnl_x86_exec_vtxfmt_init( ctx ); /* x86 DISPATCH_ATTRFV */
}
_mesa_install_exec_vtxfmt( ctx, &tnl->exec_vtxfmt );

View file

@ -30,7 +30,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
* Keith Whitwell <keith@tungstengraphics.com>
*/
#if !defined (__DJGPP__)
#if !defined (__DJGPP__) && !defined (__MINGW32__)
#define GLOBL( x ) \
.globl x; \
@ -58,12 +58,10 @@ _##x:
// [dBorca] TODO
// Unfold functions for each vertex size?
// Build super-specialized MMX/SSE versions?
// Build super-specialized SSE versions?
// STDCALL woes (HAVE_NONSTANDARD_GLAPIENTRY):
// need separate routine for the non "fv" case,
// to clean up the stack (I guess we could codegen
// 'ret nn' insn)! Also we need to call notify, then
// return, instead of jump!
// to clean up the stack!
GLOBL ( _tnl_x86_Vertex1fv )
movl 4(%esp), %ecx