summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-02-10 16:18:22 +0000
committerJosé Fonseca <jfonseca@vmware.com>2009-02-10 17:37:53 +0000
commit00ee308ab3e7da2a2939845e0f0a24b8a0925025 (patch)
tree4d9c3118d568c884b7a7e76ab0990d96ae20e588 /src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h
parentb20a1b28b7e581304701c5802e8627003e461e45 (diff)
pipebuffer: Drop reliance on pipe_winsys.
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);
/**