#include "pipe/p_state.h"
#include "util/u_inlines.h"
+#include "swr_fence_work.h"
+
struct pipe_screen;
struct swr_fence {
unsigned pending;
unsigned id; /* Just for reference */
+
+ struct {
+ uint32_t count;
+ struct swr_fence_work head;
+ struct swr_fence_work *tail;
+ } work;
};
}
-static INLINE boolean
+static INLINE bool
swr_is_fence_done(struct pipe_fence_handle *fence_handle)
{
struct swr_fence *fence = swr_fence(fence_handle);
return (fence->read == fence->write);
}
-static INLINE boolean
+static INLINE bool
swr_is_fence_pending(struct pipe_fence_handle *fence_handle)
{
return swr_fence(fence_handle)->pending;
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *f);
-boolean swr_fence_finish(struct pipe_screen *screen,
- struct pipe_context *ctx,
- struct pipe_fence_handle *fence_handle,
- uint64_t timeout);
+bool swr_fence_finish(struct pipe_screen *screen,
+ struct pipe_context *ctx,
+ struct pipe_fence_handle *fence_handle,
+ uint64_t timeout);
void
swr_fence_submit(struct swr_context *ctx, struct pipe_fence_handle *fence);