summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/bufmgr_fake.c
diff options
context:
space:
mode:
authorZou Nan hai <nanhai.zou@intel.com>2006-12-13 15:27:17 +0800
committerKeith Packard <keithp@neko.keithp.com>2007-01-06 15:18:23 -0800
commitef02f8be10a9f95788fee48bb9e7801dea0c2ba6 (patch)
tree3e710c9bc81473e802870c34a5c491a7bbde1998 /src/mesa/drivers/dri/i965/bufmgr_fake.c
parent652ae2c3765a471f94ca7b7328a0d572182bb127 (diff)
i965: xdemos/glxthreads get: Assertion `block->fenced' failed (9201)
Signed-off-by: Keith Packard <keithp@neko.keithp.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/bufmgr_fake.c')
-rw-r--r--src/mesa/drivers/dri/i965/bufmgr_fake.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/bufmgr_fake.c b/src/mesa/drivers/dri/i965/bufmgr_fake.c
index ed88ab3797..205dc722c0 100644
--- a/src/mesa/drivers/dri/i965/bufmgr_fake.c
+++ b/src/mesa/drivers/dri/i965/bufmgr_fake.c
@@ -338,7 +338,6 @@ static int evict_mru( struct intel_context *intel, GLuint *pool )
}
-
static int check_fenced( struct intel_context *intel )
{
struct bufmgr *bm = intel->bm;
@@ -1328,11 +1327,19 @@ unsigned bmSetFence( struct intel_context *intel )
return intel->bm->last_fence;
}
+unsigned bmSetFenceLock( struct intel_context *intel )
+{
+ LOCK(intel->bm);
+ bmSetFence(intel);
+ UNLOCK(intel->bm);
+}
unsigned bmLockAndFence( struct intel_context *intel )
{
if (intel->bm->need_fence) {
LOCK_HARDWARE(intel);
+ LOCK(intel->bm);
bmSetFence(intel);
+ UNLOCK(intel->bm);
UNLOCK_HARDWARE(intel);
}
@@ -1350,7 +1357,12 @@ void bmFinishFence( struct intel_context *intel, unsigned fence )
check_fenced(intel);
}
-
+void bmFinishFenceLock( struct intel_context *intel, unsigned fence )
+{
+ LOCK(intel->bm);
+ bmFinishFence(intel, fence);
+ UNLOCK(intel->bm);
+}
/* Specifically ignore texture memory sharing.