aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2007-12-20 16:49:25 +0800
committerXiang, Haihao <[email protected]>2007-12-20 16:49:25 +0800
commite54329233522591bbe8aad8a3fd6bcdc1e430f03 (patch)
tree12c9edd321bd74df8ebf20fe52e12625d7645aa1 /src/mesa/drivers/dri/i915
parentda693b7c89392265944f7ba4c20c2455be101b85 (diff)
i915: avoid dead lock in intel_meta_draw_poly. fix #13696
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 4b45dc065c6..474113cd632 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -1074,8 +1074,10 @@ intel_meta_draw_poly(struct intel_context *intel,
{
union fi *vb;
GLint i;
+ GLboolean was_locked = intel->locked;
- LOCK_HARDWARE(intel);
+ if (!was_locked)
+ LOCK_HARDWARE(intel);
/* All 3d primitives should be emitted with INTEL_BATCH_CLIPRECTS,
* otherwise the drawing origin (DR4) might not be set correctly.
@@ -1094,7 +1096,9 @@ intel_meta_draw_poly(struct intel_context *intel,
}
INTEL_FIREVERTICES(intel);
- UNLOCK_HARDWARE(intel);
+
+ if (!was_locked)
+ UNLOCK_HARDWARE(intel);
}
void