summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-02-10 16:34:51 -0700
committerBrian Paul <brianp@vmware.com>2009-02-10 16:34:51 -0700
commitee4c921b65fb76998711f3c40330505cbc49a0e0 (patch)
treeb4c702af3d93a76e204a3aad012541d4fbcb2101 /src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h
parent767b1acbb757186bde30973394f256ab7498a075 (diff)
parent14d808f8fdc41a26cea5264e47a24c903e54ce93 (diff)
Merge commit 'origin/gallium-0.2' into gallium-master-merge
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h
index b15c676194..d1c9d4c17d 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h
@@ -59,7 +59,6 @@ extern "C" {
#endif
-struct pipe_winsys;
struct pipe_buffer;
struct pipe_fence_handle;
@@ -70,13 +69,42 @@ struct pipe_fence_handle;
struct fenced_buffer_list;
+struct pb_fence_ops
+{
+ void (*destroy)( struct pb_fence_ops *ops );
+
+ /** Set ptr = fence, with reference counting */
+ void (*fence_reference)( struct pb_fence_ops *ops,
+ struct pipe_fence_handle **ptr,
+ struct pipe_fence_handle *fence );
+
+ /**
+ * Checks whether the fence has been signalled.
+ * \param flags driver-specific meaning
+ * \return zero on success.
+ */
+ int (*fence_signalled)( struct pb_fence_ops *ops,
+ struct pipe_fence_handle *fence,
+ unsigned flag );
+
+ /**
+ * Wait for the fence to finish.
+ * \param flags driver-specific meaning
+ * \return zero on success.
+ */
+ int (*fence_finish)( struct pb_fence_ops *ops,
+ struct pipe_fence_handle *fence,
+ unsigned flag );
+};
+
+
/**
* Create a fenced buffer list.
*
* See also fenced_bufmgr_create for a more convenient way to use this.
*/
struct fenced_buffer_list *
-fenced_buffer_list_create(struct pipe_winsys *winsys);
+fenced_buffer_list_create(struct pb_fence_ops *ops);
/**