summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/p_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/p_context.h')
-rw-r--r--src/mesa/pipe/p_context.h41
1 files changed, 38 insertions, 3 deletions
diff --git a/src/mesa/pipe/p_context.h b/src/mesa/pipe/p_context.h
index 92670c77337..76a25935672 100644
--- a/src/mesa/pipe/p_context.h
+++ b/src/mesa/pipe/p_context.h
@@ -169,9 +169,44 @@ struct pipe_context {
GLuint width, GLuint height,
GLuint value);
- struct _DriBufferObject *(*region_buffer)(struct pipe_context *pipe,
- struct pipe_region *region,
- GLuint flag);
+
+ /* Buffer management functions need to be exposed as well. A pipe
+ * buffer may be used as a texture, render target or vertex/index
+ * buffer, or some combination according to flags.
+ */
+
+ struct pipe_buffer_handle *(*create_buffer)(struct pipe_context *pipe,
+ unsigned alignment,
+ unsigned flags );
+
+ void *(*buffer_map)( struct pipe_context *pipe,
+ struct pipe_buffer_handle *buf,
+ unsigned flags );
+
+ void (*buffer_unmap)( struct pipe_context *pipe,
+ struct pipe_buffer_handle *buf );
+
+ struct pipe_buffer_handle *(*buffer_reference)( struct pipe_context *pipe,
+ struct pipe_buffer_handle *buf );
+
+ void (*buffer_unreference)( struct pipe_context *pipe,
+ struct pipe_buffer_handle **buf );
+
+ void (*buffer_data)(struct pipe_context *pipe,
+ struct pipe_buffer_handle *buf,
+ unsigned size, const void *data );
+
+ void (*buffer_subdata)(struct pipe_context *pipe,
+ struct pipe_buffer_handle *buf,
+ unsigned long offset,
+ unsigned long size,
+ const void *data);
+
+ void (*buffer_get_subdata)(struct pipe_context *pipe,
+ struct pipe_buffer_handle *buf,
+ unsigned long offset,
+ unsigned long size,
+ void *data);
};