aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel/intel_regions.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2007-12-15 12:47:23 -0800
committerEric Anholt <[email protected]>2007-12-15 12:47:23 -0800
commit3fe9d5cbb7c680c6fb88a2eba678b28a2a06949e (patch)
tree3484ffa02b2a3ff87d23660aec5027f9a643956b /src/mesa/drivers/dri/intel/intel_regions.c
parentf5b3cd46202517c21fcfcec0102732411df1af18 (diff)
[intel] Merge intel_buffer_objects to shared.
965 gains fixed TTM typing of the buffer object buffers and unused PBO functions, and 915 gains buffer size == 0 fixes from 965.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_regions.c')
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c
index d66cc641f53..a5de01a3a84 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.c
+++ b/src/mesa/drivers/dri/intel/intel_regions.c
@@ -178,6 +178,8 @@ intel_region_data(struct intel_context *intel,
const void *src, GLuint src_pitch,
GLuint srcx, GLuint srcy, GLuint width, GLuint height)
{
+ GLboolean locked = GL_FALSE;
+
DBG("%s\n", __FUNCTION__);
if (intel == NULL)
@@ -191,8 +193,10 @@ intel_region_data(struct intel_context *intel,
intel_region_cow(intel, dst);
}
-
- LOCK_HARDWARE(intel);
+ if (!intel->locked) {
+ LOCK_HARDWARE(intel);
+ locked = GL_TRUE;
+ }
_mesa_copy_rect(intel_region_map(intel, dst) + dst_offset,
dst->cpp,
@@ -201,7 +205,8 @@ intel_region_data(struct intel_context *intel,
intel_region_unmap(intel, dst);
- UNLOCK_HARDWARE(intel);
+ if (locked)
+ UNLOCK_HARDWARE(intel);
}