2 #ifndef __NVC0_FENCE_H__
3 #define __NVC0_FENCE_H__
5 #include "util/u_inlines.h"
6 #include "util/u_double_list.h"
8 #define NVC0_FENCE_STATE_AVAILABLE 0
9 #define NVC0_FENCE_STATE_EMITTED 1
10 #define NVC0_FENCE_STATE_SIGNALLED 2
12 struct nvc0_mm_allocation
;
15 struct nvc0_fence
*next
;
16 struct nvc0_screen
*screen
;
20 struct nvc0_mm_allocation
*buffers
;
23 void nvc0_fence_emit(struct nvc0_fence
*);
24 void nvc0_fence_del(struct nvc0_fence
*);
26 boolean
nvc0_fence_wait(struct nvc0_fence
*);
27 boolean
nvc0_fence_signalled(struct nvc0_fence
*);
30 nvc0_fence_reference(struct nvc0_fence
**ref
, struct nvc0_fence
*fence
)
33 if (--(*ref
)->ref
== 0)
42 static INLINE
struct nvc0_fence
*
43 nvc0_fence(struct pipe_fence_handle
*fence
)
45 return (struct nvc0_fence
*)fence
;
48 #endif // __NVC0_FENCE_H__