summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/p_winsys.h
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2007-11-05 18:04:35 +0000
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2007-11-06 14:49:38 +0000
commitfa1a66d7fc4fd7854de7958a48e4992edd154489 (patch)
treece48a896ebbef8b09ee363774cdfdf86dfb52da6 /src/mesa/pipe/p_winsys.h
parent4f79dbd5aa6b8a955ac9dcc43cf0852acd89a320 (diff)
Supply buffer usage hints to winsys.
Winsys driver needs some hints in order to allocate the appropriate kind of memory for the buffer.
Diffstat (limited to 'src/mesa/pipe/p_winsys.h')
-rw-r--r--src/mesa/pipe/p_winsys.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/pipe/p_winsys.h b/src/mesa/pipe/p_winsys.h
index 2d4432dbca..298b555651 100644
--- a/src/mesa/pipe/p_winsys.h
+++ b/src/mesa/pipe/p_winsys.h
@@ -116,10 +116,17 @@ struct pipe_winsys
struct pipe_buffer_handle **ptr,
struct pipe_buffer_handle *buf );
- /** Create the data store of a buffer and optionally initialize it */
+ /**
+ * Create the data store of a buffer and optionally initialize it.
+ *
+ * usage is a bitmask of PIPE_BUFFER_USAGE_PIXEL/VERTEX/INDEX/CONSTANT. This
+ * 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,
struct pipe_buffer_handle *buf,
- unsigned size, const void *data );
+ 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,