diff options
author | Daniel Borca <dborca@users.sourceforge.net> | 2004-04-05 06:49:36 +0000 |
---|---|---|
committer | Daniel Borca <dborca@users.sourceforge.net> | 2004-04-05 06:49:36 +0000 |
commit | 8cc059ea6474c13bbba4f520ea1a63fd97a32450 (patch) | |
tree | faf0b5cecca27df7674da58b303c364c7ff011c3 /src | |
parent | 8ef874f1a543c693cfef9c935bed05903800fbfe (diff) |
protected all codegen behind AllowCodegen
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/tnl/t_context.c | 7 | ||||
-rw-r--r-- | src/mesa/tnl/t_vtx_api.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_vtx_x86_gcc.S | 8 |
3 files changed, 9 insertions, 10 deletions
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index 330c19d649..1f8c4d40fa 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -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; } diff --git a/src/mesa/tnl/t_vtx_api.c b/src/mesa/tnl/t_vtx_api.c index 26403fc8ef..9f67c6cee7 100644 --- a/src/mesa/tnl/t_vtx_api.c +++ b/src/mesa/tnl/t_vtx_api.c @@ -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 ); diff --git a/src/mesa/tnl/t_vtx_x86_gcc.S b/src/mesa/tnl/t_vtx_x86_gcc.S index 0bccd17302..7dbe5c0628 100644 --- a/src/mesa/tnl/t_vtx_x86_gcc.S +++ b/src/mesa/tnl/t_vtx_x86_gcc.S @@ -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 |