summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2008-06-26 15:34:27 -0700
committerEric Anholt <[email protected]>2008-06-26 15:34:27 -0700
commitf059a3302260075e9cfd35649dc3877726291d8d (patch)
tree06651f294e4a6d6d9e974f7cc5805e728e0593aa /src/mesa/drivers
parent93f701bc3619864ac6f067d37212e96545a57e16 (diff)
intel: Fix locking when doing intel_region_cow().
This was broken in the merge of 965 blit support. It tried to lock only when things were already locked.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c
index ddeffc8ae46..5d23c725047 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.c
+++ b/src/mesa/drivers/dri/intel/intel_regions.c
@@ -377,7 +377,7 @@ intel_region_cow(struct intel_context *intel, struct intel_region *region)
*/
was_locked = intel->locked;
- if (intel->locked)
+ if (!was_locked)
LOCK_HARDWARE(intel);
intelEmitCopyBlit(intel,
@@ -388,7 +388,7 @@ intel_region_cow(struct intel_context *intel, struct intel_region *region)
region->pitch, region->height,
GL_COPY);
- if (was_locked)
+ if (!was_locked)
UNLOCK_HARDWARE(intel);
}