summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h
diff options
context:
space:
mode:
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);
/**