summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellström <thomas@tungstengraphics.com>2006-12-01 12:41:43 +0000
committerThomas Hellström <thomas@tungstengraphics.com>2006-12-01 12:41:43 +0000
commit682393944c72ecfabe8df674af0b48975e90b98c (patch)
treefdfd3b9818282c21655d599dc850ea9e71d1e44d
parent40dc5902d39c875d014520a244d842189021d11a (diff)
Fix an infinite loop error that may occur when many contexts are bound
to the same drawable in a multithreading environment. This one slipped out of the texman merge.
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index e7f07569f4..ba251a8143 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -411,13 +411,18 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp)
if (!pcp
|| ((pdp != pcp->driDrawablePriv) && (pdp != pcp->driReadablePriv))) {
- /* ERROR!!! */
- return;
+ /* ERROR!!!
+ * ...but we must ignore it. There can be many contexts bound to a
+ * drawable.
+ */
}
psp = pdp->driScreenPriv;
if (!psp) {
/* ERROR!!! */
+ _mesa_problem("Warning! Possible infinite loop due to bug "
+ "in file %s, line %d\n",
+ __FILE__, __LINE__);
return;
}