diff options
Diffstat (limited to 'src/mesa')
-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 330c19d649d..1f8c4d40fab 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 26403fc8ef2..9f67c6cee73 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 0bccd17302b..7dbe5c06283 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 <[email protected]> */ -#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 |