/** Opaque type for a buffer */
struct pipe_buffer_handle;
+/** Opaque type */
+struct pipe_fence_handle;
+
+struct pipe_region;
+struct pipe_surface;
+
+
/**
* Gallium3D drivers are (meant to be!) independent of both GL and the
* window system. The window system provides a buffer manager and a
* driver and the hardware driver about the format of command buffers,
* etc.
*/
-
-
-struct pipe_region;
-struct pipe_surface;
-
-/** Opaque type */
-struct pipe_buffer_handle;
-struct pipe_fence_handle;
-
struct pipe_winsys
{
/** Returns name of this winsys interface */
void (*surface_release)(struct pipe_winsys *ws, struct pipe_surface **s);
+
/**
* The buffer manager is modeled after the dri_bufmgr interface, which
* in turn is modeled after the ARB_vertex_buffer_object extension,
void *ptr,
unsigned bytes);
-
/**
* Map the entire data store of a buffer object into the client's address.
* flags is bitmask of PIPE_BUFFER_FLAG_READ/WRITE.
void *data);
+ /** Set ptr = buf, with reference counting */
void (*fence_reference)( struct pipe_winsys *sws,
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *fence );
+ /**
+ * Checks whether the fence has been signalled.
+ *
+ * The meaning of flag is pipe-driver specific.
+ *
+ * Returns zero if it has.
+ */
int (*fence_signalled)( struct pipe_winsys *sws,
struct pipe_fence_handle *fence,
unsigned flag );
-
+ /**
+ * Wait for the fence to finish.
+ *
+ * The meaning of flag is pipe-driver specific.
+ *
+ * Returns zero on success.
+ */
int (*fence_finish)( struct pipe_winsys *sws,
struct pipe_fence_handle *fence,
unsigned flag );