diff options
author | Rob Clark <[email protected]> | 2015-02-15 00:04:57 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-02-21 17:11:02 -0500 |
commit | e17437386c1bf715b6b241bd9de3a583103f851b (patch) | |
tree | aa7a3c48f16afd40923278109d480d564479bf0c /src/gallium/drivers/freedreno/freedreno_fence.h | |
parent | 68552266535747bad1eff34d856c43158398b9bf (diff) |
freedreno: implement fence
I never actually implemented the stubbed out fence stuff back in the
early days. Fix that.
We'll need a few libdrm_freedreno changes to handle timeout properly,
so ignore that for now to avoid a libdrm_freedreno dependency bump.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_fence.h')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_fence.h | 43 |
1 files changed, 11 insertions, 32 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_fence.h b/src/gallium/drivers/freedreno/freedreno_fence.h index 7e8bee322dc..e36bcc4d1f2 100644 --- a/src/gallium/drivers/freedreno/freedreno_fence.h +++ b/src/gallium/drivers/freedreno/freedreno_fence.h @@ -29,37 +29,16 @@ #ifndef FREEDRENO_FENCE_H_ #define FREEDRENO_FENCE_H_ -#include "util/u_inlines.h" -#include "util/u_double_list.h" - - -struct fd_fence { - int ref; -}; - -boolean fd_fence_wait(struct fd_fence *fence); -boolean fd_fence_signalled(struct fd_fence *fence); -void fd_fence_del(struct fd_fence *fence); - -static INLINE void -fd_fence_ref(struct fd_fence *fence, struct fd_fence **ref) -{ - if (fence) - ++fence->ref; - - if (*ref) { - if (--(*ref)->ref == 0) - fd_fence_del(*ref); - } - - *ref = fence; -} - -static INLINE struct fd_fence * -fd_fence(struct pipe_fence_handle *fence) -{ - return (struct fd_fence *)fence; -} - +#include "pipe/p_context.h" + +void fd_screen_fence_ref(struct pipe_screen *pscreen, + struct pipe_fence_handle **ptr, + struct pipe_fence_handle *pfence); +boolean fd_screen_fence_signalled(struct pipe_screen *screen, + struct pipe_fence_handle *pfence); +boolean fd_screen_fence_finish(struct pipe_screen *screen, + struct pipe_fence_handle *pfence, + uint64_t timeout); +struct pipe_fence_handle * fd_fence_create(struct pipe_context *pctx); #endif /* FREEDRENO_FENCE_H_ */ |