summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/p_winsys.h
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-01-25 20:53:31 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2008-01-25 20:53:31 +0000
commit1e0d30a515e4cac891b6c590f12a33e0e8a8e295 (patch)
tree72ffec9e89bd0bd9202fcfc39f5e7bdf881adcf2 /src/mesa/pipe/p_winsys.h
parent756d52ec12c41ee90ee9598dc9028cc134806bd2 (diff)
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.
Diffstat (limited to 'src/mesa/pipe/p_winsys.h')
-rw-r--r--src/mesa/pipe/p_winsys.h17
1 files changed, 6 insertions, 11 deletions
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 */