summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_fence.h
diff options
context:
space:
mode:
authorChristian König <[email protected]>2010-10-12 23:05:25 +0200
committerChristian König <[email protected]>2010-10-12 23:07:29 +0200
commit695cc370a280a637f411f5ff3877b3fd1c05e424 (patch)
tree69ae2a8fbecfa553faba59274688ffe11ee1a612 /src/gallium/drivers/llvmpipe/lp_fence.h
parentf3e34ba6fba76870b1c91a27adb706d1b87aeec8 (diff)
parent48156b87bc9d3e09ec34372d69504a787332ea0b (diff)
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into pipe-video
Conflicts: configure.ac src/gallium/drivers/nvfx/Makefile src/gallium/include/pipe/p_defines.h src/gallium/include/pipe/p_screen.h src/gallium/include/state_tracker/dri1_api.h src/gallium/include/state_tracker/drm_api.h src/gallium/winsys/nouveau/drm/nouveau_drm_api.c
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_fence.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_fence.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_fence.h b/src/gallium/drivers/llvmpipe/lp_fence.h
index d9270f5784a..3c591187801 100644
--- a/src/gallium/drivers/llvmpipe/lp_fence.h
+++ b/src/gallium/drivers/llvmpipe/lp_fence.h
@@ -32,6 +32,7 @@
#include "os/os_thread.h"
#include "pipe/p_state.h"
+#include "util/u_inlines.h"
struct pipe_screen;
@@ -40,10 +41,12 @@ struct pipe_screen;
struct lp_fence
{
struct pipe_reference reference;
+ unsigned id;
pipe_mutex mutex;
pipe_condvar signalled;
+ boolean issued;
unsigned rank;
unsigned count;
};
@@ -56,9 +59,37 @@ lp_fence_create(unsigned rank);
void
lp_fence_signal(struct lp_fence *fence);
+boolean
+lp_fence_signalled(struct lp_fence *fence);
+
+void
+lp_fence_wait(struct lp_fence *fence);
void
llvmpipe_init_screen_fence_funcs(struct pipe_screen *screen);
+void
+lp_fence_destroy(struct lp_fence *fence);
+
+static INLINE void
+lp_fence_reference(struct lp_fence **ptr,
+ struct lp_fence *f)
+{
+ struct lp_fence *old = *ptr;
+
+ if (pipe_reference(&old->reference, &f->reference)) {
+ lp_fence_destroy(old);
+ }
+
+ *ptr = f;
+}
+
+static INLINE boolean
+lp_fence_issued(const struct lp_fence *fence)
+{
+ return fence->issued;
+}
+
+
#endif /* LP_FENCE_H */