Felix Kühling wrote:
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. ;-)

I've got a couple of comments, but basically things look ok.


------------------------------------------------------------------------

--- ./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;
}

This is how NotifyBegin() worked originally, and I guess I can live with it for now.


------------------------------------------------------------------------

--- ./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;

This is a change which looks like it should work but in fact doesn't in all circumstances, particularly when _tnl_DrawArrays ends up calling glBegin() in one of it's fallback paths and the radeon vtxfmt code decides that in fact it should fallback too. At least, that's where problems arose with the old tnl/ code.


I'd be happier to keep this the way it was.

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;


Keith



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to