[Mesa-dev] [PATCH] r128: fix lockups (bug #9379)
Christopher Egert
cme3000 at gmail.com
Mon Apr 18 15:17:43 PDT 2011
Hi,
I found this patch by Andrew Péteri on the bugtracker (#9379), it seems
like it's still incomplete (projective textures were disabled), but it
fixes a lockup problems with r128 (like the game cube, some farbrausch
demos and gta vice city in wine (not very fast but meh) works now).
--- 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 @@
}
/* projectivetextur es 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.
More information about the mesa-dev
mailing list