Hi, I found the source of some vertex data corruption with software TCL. In radeon_run_render tnl->Driver.Render.Start (points to radeonRenderStart) is called after indexed vertices are emitted. However, radeonRenderStart can change the vertex format if projective textures are involved. So the indices emitted later refer do vertices of a different size.
The attached patch calls tnl->Driver.Render.Start before indexed vertices are emitted. Felix __\|/__ ___ ___ ___ __Tschüß_______\_6 6_/___/__ \___/__ \___/___\___You can do anything,___ _____Felix_______\Ä/\ \_____\ \_____\ \______U___just not everything____ [EMAIL PROTECTED] >o<__/ \___/ \___/ at the same time!
Index: radeon_swtcl.c =================================================================== RCS file: /cvsroot/dri/xc/xc/lib/GL/mesa/src/drv/radeon/radeon_swtcl.c,v retrieving revision 1.10 diff -u -r1.10 radeon_swtcl.c --- radeon_swtcl.c 25 Nov 2002 19:58:29 -0000 1.10 +++ radeon_swtcl.c 10 Feb 2003 09:35:45 -0000 @@ -690,6 +690,8 @@ return GL_TRUE; } + tnl->Driver.Render.Start( ctx ); + if (VB->Elts) { tab = TAG(render_tab_elts); if (!rmesa->swtcl.indexed_verts.buf) @@ -697,8 +699,6 @@ return GL_TRUE; /* too many vertices */ } - tnl->Driver.Render.Start( ctx ); - for (i = 0 ; !(flags & PRIM_LAST) ; i += length) { flags = VB->Primitive[i];