diff options
author | keithw <keithw@keithw-laptop.(none)> | 2007-11-19 20:05:38 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2007-12-09 14:03:33 +0000 |
commit | cd1eefee8404ae69ea5b604971b8be78abf588e6 (patch) | |
tree | 950682cc69a75c68b2a25ec432de1d2eb3787cc9 /src/mesa/pipe/p_winsys.h | |
parent | f83d4e7bde28d6f73a0de96781da506ddb338714 (diff) |
add fence interfaces and buffer create flags to pipe_winsys
Diffstat (limited to 'src/mesa/pipe/p_winsys.h')
-rw-r--r-- | src/mesa/pipe/p_winsys.h | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/src/mesa/pipe/p_winsys.h b/src/mesa/pipe/p_winsys.h index 438e8bdb63b..f46807995d8 100644 --- a/src/mesa/pipe/p_winsys.h +++ b/src/mesa/pipe/p_winsys.h @@ -59,6 +59,7 @@ struct pipe_surface; /** Opaque type */ struct pipe_buffer_handle; +struct pipe_fence_handle; struct pipe_winsys { @@ -104,8 +105,10 @@ struct pipe_winsys * systems must then implement that interface (rather than the * other way around...). */ - struct pipe_buffer_handle *(*buffer_create)(struct pipe_winsys *sws, - unsigned alignment ); + struct pipe_buffer_handle *(*buffer_create)( struct pipe_winsys *sws, + unsigned alignment, + unsigned flags, + unsigned hint ); /** Create a buffer that wraps user-space data */ struct pipe_buffer_handle *(*user_buffer_create)(struct pipe_winsys *sws, @@ -136,24 +139,39 @@ struct pipe_winsys * usage argument is only an optimization hint, not a guarantee, therefore * proper behavior must be observed in all circumstances. */ - void (*buffer_data)(struct pipe_winsys *sws, + int (*buffer_data)(struct pipe_winsys *sws, struct pipe_buffer_handle *buf, unsigned size, const void *data, unsigned usage); /** Modify some or all of the data contained in a buffer's data store */ - void (*buffer_subdata)(struct pipe_winsys *sws, - struct pipe_buffer_handle *buf, - unsigned long offset, - unsigned long size, - const void *data); + int (*buffer_subdata)(struct pipe_winsys *sws, + struct pipe_buffer_handle *buf, + unsigned long offset, + unsigned long size, + const void *data); /** Query some or all of the data contained in a buffer's data store */ - void (*buffer_get_subdata)(struct pipe_winsys *sws, - struct pipe_buffer_handle *buf, - unsigned long offset, - unsigned long size, - void *data); + int (*buffer_get_subdata)(struct pipe_winsys *sws, + struct pipe_buffer_handle *buf, + unsigned long offset, + unsigned long size, + void *data); + + + void (*fence_reference)( struct pipe_winsys *sws, + struct pipe_fence_handle **ptr, + struct pipe_fence_handle *fence ); + + int (*fence_signalled)( struct pipe_winsys *sws, + struct pipe_fence_handle *fence, + unsigned flag ); + + + int (*fence_finish)( struct pipe_winsys *sws, + struct pipe_fence_handle *fence, + unsigned flag ); + }; |