--- a/src/mesa/drivers/dri/r128/r128_span.c 2009-01-22 18:38:33.000000000 +0100 +++ b/src/mesa/drivers/dri/r128/r128_span.c 2009-04-19 13:24:48.000000000 +0200 @@ -122,12 +122,6 @@ * Depth buffer */ -/* These functions require locking */ -#undef HW_LOCK -#undef HW_UNLOCK -#define HW_LOCK() LOCK_HARDWARE(R128_CONTEXT(ctx)); -#define HW_UNLOCK() UNLOCK_HARDWARE(R128_CONTEXT(ctx)); - /* 16-bit depth buffer functions */ #define VALUE_TYPE GLushort --- a/src/mesa/drivers/dri/r128/r128_tris.c 2009-01-22 18:38:33.000000000 +0100 +++ b/src/mesa/drivers/dri/r128/r128_tris.c 2009-04-18 19:31:36.000000000 +0200 @@ -48,6 +48,7 @@ #include "r128_state.h" #include "r128_tex.h" #include "r128_ioctl.h" +#include "r128_lock.h" static const GLuint hw_prim[GL_POLYGON+1] = { R128_CCE_VC_CNTL_PRIM_TYPE_POINT, @@ -349,7 +350,9 @@ _swsetup_Translate( ctx, v0, &v[0] ); _swsetup_Translate( ctx, v1, &v[1] ); _swsetup_Translate( ctx, v2, &v[2] ); + LOCK_HARDWARE( rmesa ); _swrast_Triangle( ctx, &v[0], &v[1], &v[2] ); + UNLOCK_HARDWARE( rmesa ); } @@ -362,7 +365,9 @@ SWvertex v[2]; _swsetup_Translate( ctx, v0, &v[0] ); _swsetup_Translate( ctx, v1, &v[1] ); + LOCK_HARDWARE( rmesa ); _swrast_Line( ctx, &v[0], &v[1] ); + UNLOCK_HARDWARE( rmesa ); } @@ -373,7 +378,9 @@ GLcontext *ctx = rmesa->glCtx; SWvertex v[1]; _swsetup_Translate( ctx, v0, &v[0] ); + LOCK_HARDWARE( rmesa ); _swrast_Point( ctx, &v[0] ); + UNLOCK_HARDWARE( rmesa ); } @@ -661,7 +668,12 @@ } /* projective textures are not supported by the hardware */ - FALLBACK( rmesa, R128_FALLBACK_PROJTEX, fallback_projtex ); + // FALLBACK( rmesa, R128_FALLBACK_PROJTEX, fallback_projtex ); + // + // if (fallback_projtex) { + // tnl->Driver.Render.Start(ctx); + // return; + // } /* Only need to change the vertex emit code if there has been a * statechange to a TNL index.