Hi, I believe I got it right this time. :) I attached three small patches that re-enabled the vtxfmt paths in the radeon and r200 drivers. One is for _tnl_Begin to call the driver's NotifyBegin callback again. Alternatively, if the drivers are supposed to work correctly without this callback, then the NotifyBegin callback should be removed from the respective struct and the drivers changed accordingly.
The other two patches install fallbacks for the VertexAttrib*NV functions in the radeon and r200 drivers and _tnl_DrawArrays instead of radeon/r200_fallback_DrawArrays. Also the drivers must not install their own ctx->Driver.NewList callback. This would override _tnl_NewList leading to the assertion failure in _save_NotifyBegin I reported earlier. I tested both, calling _tnl_NewList in radeon_NewList and not installing radeon_NewList at all. Both worked the same with the applications I tested (see below) so a fallback does not appear to be necessary with Keith's new display list compiler. I tested these patches on a Radeon 7500 with flightgear, torcs, tuxracer (and glxgears ;-) without noticing any problems. I can't test on R200 (yet). My CPU doesn't have a SSE unit, so the SSE codegen stuff may still be broken, though I believe this is unlikely. If these patches are ok I'd like to commit them. Keith, I think you should know best. ;-) Regards, Felix ------------ __\|/__ ___ ___ ------------------------- Felix ___\_e -_/___/ __\___/ __\_____ You can do anything, Kühling (_____\Ä/____/ /_____/ /________) just not everything [EMAIL PROTECTED] \___/ \___/ U at the same time.
--- ./t_vtx_api.c.~1.13.~ 2004-01-02 20:58:25.000000000 +0100 +++ ./t_vtx_api.c 2004-01-02 23:34:55.000000000 +0100 @@ -981,7 +981,8 @@ if (ctx->NewState) { _mesa_update_state( ctx ); - ctx->Exec->Begin(mode); + if (!(tnl->Driver.NotifyBegin && tnl->Driver.NotifyBegin( ctx, mode ))) + ctx->Exec->Begin(mode); return; }
--- ./radeon_vtxfmt.c.~1.4.~ 2003-11-24 16:21:16.000000000 +0100 +++ ./radeon_vtxfmt.c 2004-01-02 23:24:40.000000000 +0100 @@ -705,12 +705,6 @@ } -static void radeonNewList( GLcontext *ctx, GLuint list, GLenum mode ) -{ - VFMT_FALLBACK_OUTSIDE_BEGIN_END( __FUNCTION__ ); -} - - static void radeonVtxfmtValidate( GLcontext *ctx ) { radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); @@ -730,7 +724,6 @@ _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt ); ctx->Driver.FlushVertices = radeonVtxfmtFlushVertices; - ctx->Driver.NewList = radeonNewList; rmesa->vb.installed = GL_TRUE; } else if (RADEON_DEBUG & DEBUG_VFMT) @@ -962,7 +955,7 @@ * These should call NotifyBegin(), as should _tnl_EvalMesh, to allow * a driver-hook. */ - vfmt->DrawArrays = radeon_fallback_DrawArrays; + vfmt->DrawArrays = _tnl_DrawArrays; vfmt->DrawElements = radeon_fallback_DrawElements; vfmt->DrawRangeElements = radeon_fallback_DrawRangeElements; @@ -999,6 +992,14 @@ vfmt->MultiTexCoord4fvARB = radeon_fallback_MultiTexCoord4fvARB; vfmt->Vertex4f = radeon_fallback_Vertex4f; vfmt->Vertex4fv = radeon_fallback_Vertex4fv; + vfmt->VertexAttrib1fNV = radeon_fallback_VertexAttrib1fNV; + vfmt->VertexAttrib1fvNV = radeon_fallback_VertexAttrib1fvNV; + vfmt->VertexAttrib2fNV = radeon_fallback_VertexAttrib2fNV; + vfmt->VertexAttrib2fvNV = radeon_fallback_VertexAttrib2fvNV; + vfmt->VertexAttrib3fNV = radeon_fallback_VertexAttrib3fNV; + vfmt->VertexAttrib3fvNV = radeon_fallback_VertexAttrib3fvNV; + vfmt->VertexAttrib4fNV = radeon_fallback_VertexAttrib4fNV; + vfmt->VertexAttrib4fvNV = radeon_fallback_VertexAttrib4fvNV; (void)radeon_fallback_vtxfmt;
--- ./r200_vtxfmt.c.~1.5.~ 2003-12-09 15:18:41.000000000 +0100 +++ ./r200_vtxfmt.c 2004-01-02 23:49:22.000000000 +0100 @@ -744,12 +744,6 @@ } -static void r200NewList( GLcontext *ctx, GLuint list, GLenum mode ) -{ - VFMT_FALLBACK_OUTSIDE_BEGIN_END( __FUNCTION__ ); -} - - static void r200VtxfmtValidate( GLcontext *ctx ) { r200ContextPtr rmesa = R200_CONTEXT( ctx ); @@ -769,7 +763,6 @@ _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt ); ctx->Driver.FlushVertices = r200VtxFmtFlushVertices; - ctx->Driver.NewList = r200NewList; rmesa->vb.installed = GL_TRUE; } else if (R200_DEBUG & DEBUG_VFMT) @@ -1000,7 +993,7 @@ * These should call NotifyBegin(), as should _tnl_EvalMesh, to allow * a driver-hook. */ - vfmt->DrawArrays = r200_fallback_DrawArrays; + vfmt->DrawArrays = _tnl_DrawArrays; vfmt->DrawElements = r200_fallback_DrawElements; vfmt->DrawRangeElements = r200_fallback_DrawRangeElements; @@ -1037,6 +1030,14 @@ vfmt->MultiTexCoord4fvARB = r200_fallback_MultiTexCoord4fvARB; vfmt->Vertex4f = r200_fallback_Vertex4f; vfmt->Vertex4fv = r200_fallback_Vertex4fv; + vfmt->VertexAttrib1fNV = r200_fallback_VertexAttrib1fNV; + vfmt->VertexAttrib1fvNV = r200_fallback_VertexAttrib1fvNV; + vfmt->VertexAttrib2fNV = r200_fallback_VertexAttrib2fNV; + vfmt->VertexAttrib2fvNV = r200_fallback_VertexAttrib2fvNV; + vfmt->VertexAttrib3fNV = r200_fallback_VertexAttrib3fNV; + vfmt->VertexAttrib3fvNV = r200_fallback_VertexAttrib3fvNV; + vfmt->VertexAttrib4fNV = r200_fallback_VertexAttrib4fNV; + vfmt->VertexAttrib4fvNV = r200_fallback_VertexAttrib4fvNV; (void)r200_fallback_vtxfmt;