llvmpipe: added lp_fence_signal()
authorBrian Paul <brianp@vmware.com>
Thu, 25 Mar 2010 01:30:27 +0000 (19:30 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 25 Mar 2010 01:30:27 +0000 (19:30 -0600)
src/gallium/drivers/llvmpipe/lp_fence.c
src/gallium/drivers/llvmpipe/lp_fence.h

index 525c117f316592690bc89f515641ac34ab21852a..00dc3eab6b1e838b6e7a9c0a2040c1eb25ce4047 100644 (file)
@@ -29,6 +29,7 @@
 #include "pipe/p_screen.h"
 #include "util/u_memory.h"
 #include "util/u_inlines.h"
+#include "lp_debug.h"
 #include "lp_fence.h"
 
 
@@ -99,6 +100,21 @@ llvmpipe_fence_finish(struct pipe_screen *screen,
 }
 
 
+void
+lp_fence_signal(struct lp_fence *fence)
+{
+   pipe_mutex_lock(fence->mutex);
+
+   fence->count++;
+   assert(fence->count <= fence->rank);
+
+   LP_DBG(DEBUG_RAST, "%s count=%u rank=%u\n", __FUNCTION__,
+          fence->count, fence->rank);
+
+   pipe_condvar_signal(fence->signalled);
+
+   pipe_mutex_unlock(fence->mutex);
+}
 
 
 void
index c90e6de423ba41d73d0003be98ab41f7ed2fb94d..d9270f5784acb7ed5c5b61471d4ea52d9a7b3dca 100644 (file)
@@ -53,6 +53,10 @@ struct lp_fence *
 lp_fence_create(unsigned rank);
 
 
+void
+lp_fence_signal(struct lp_fence *fence);
+
+
 void
 llvmpipe_init_screen_fence_funcs(struct pipe_screen *screen);