From: Brian Paul Date: Thu, 25 Mar 2010 01:30:27 +0000 (-0600) Subject: llvmpipe: added lp_fence_signal() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=331729c8c877fd8ddde0a83cbe0fcdd5df4b1f1f;p=mesa.git llvmpipe: added lp_fence_signal() --- diff --git a/src/gallium/drivers/llvmpipe/lp_fence.c b/src/gallium/drivers/llvmpipe/lp_fence.c index 525c117f316..00dc3eab6b1 100644 --- a/src/gallium/drivers/llvmpipe/lp_fence.c +++ b/src/gallium/drivers/llvmpipe/lp_fence.c @@ -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 diff --git a/src/gallium/drivers/llvmpipe/lp_fence.h b/src/gallium/drivers/llvmpipe/lp_fence.h index c90e6de423b..d9270f5784a 100644 --- a/src/gallium/drivers/llvmpipe/lp_fence.h +++ b/src/gallium/drivers/llvmpipe/lp_fence.h @@ -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);