From 1e0d30a515e4cac891b6c590f12a33e0e8a8e295 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 25 Jan 2008 20:53:31 +0000 Subject: gallium: rename pipe_buffer_handle to pipe_buffer, rework pipebuffer/ code Provide an actual definition of the pipe_buffer struct, containing the parameters used to create the buffer, and its refcount. Shift refcounting buffers out of the winsys interface, similar to surfaces & textures. Rework pipebuffer/ to reflect the fact these changes, and also Michel's reworking of the buffer interface. --- src/mesa/pipe/p_winsys.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/mesa/pipe/p_winsys.h') diff --git a/src/mesa/pipe/p_winsys.h b/src/mesa/pipe/p_winsys.h index 9742f59a4d..95e3684008 100644 --- a/src/mesa/pipe/p_winsys.h +++ b/src/mesa/pipe/p_winsys.h @@ -39,9 +39,6 @@ */ -/** Opaque type for a buffer */ -struct pipe_buffer_handle; - /** Opaque type */ struct pipe_fence_handle; @@ -103,13 +100,13 @@ struct pipe_winsys * usage argument is only an optimization hint, not a guarantee, therefore * proper behavior must be observed in all circumstances. */ - struct pipe_buffer_handle *(*buffer_create)( struct pipe_winsys *sws, + struct pipe_buffer *(*buffer_create)( struct pipe_winsys *sws, unsigned alignment, unsigned usage, unsigned size ); /** Create a buffer that wraps user-space data */ - struct pipe_buffer_handle *(*user_buffer_create)(struct pipe_winsys *sws, + struct pipe_buffer *(*user_buffer_create)(struct pipe_winsys *sws, void *ptr, unsigned bytes); @@ -118,16 +115,14 @@ struct pipe_winsys * flags is bitmask of PIPE_BUFFER_FLAG_READ/WRITE. */ void *(*buffer_map)( struct pipe_winsys *sws, - struct pipe_buffer_handle *buf, + struct pipe_buffer *buf, unsigned usage ); void (*buffer_unmap)( struct pipe_winsys *sws, - struct pipe_buffer_handle *buf ); + struct pipe_buffer *buf ); - /** Set ptr = buf, with reference counting */ - void (*buffer_reference)( struct pipe_winsys *sws, - struct pipe_buffer_handle **ptr, - struct pipe_buffer_handle *buf ); + void (*buffer_destroy)( struct pipe_winsys *sws, + struct pipe_buffer *buf ); /** Set ptr = fence, with reference counting */ -- cgit v1.2.3