summaryrefslogtreecommitdiff
path: root/src/mesa/pipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/i915simple/i915_prim_vbuf.c2
-rw-r--r--src/mesa/pipe/p_defines.h8
-rw-r--r--src/mesa/pipe/p_winsys.h44
3 files changed, 38 insertions, 16 deletions
diff --git a/src/mesa/pipe/i915simple/i915_prim_vbuf.c b/src/mesa/pipe/i915simple/i915_prim_vbuf.c
index 08ac5b672c..571ad40595 100644
--- a/src/mesa/pipe/i915simple/i915_prim_vbuf.c
+++ b/src/mesa/pipe/i915simple/i915_prim_vbuf.c
@@ -99,7 +99,7 @@ i915_vbuf_render_allocate_vertices( struct vbuf_render *render,
/* FIXME: handle failure */
assert(!i915->vbo);
- i915->vbo = winsys->buffer_create(winsys, 64);
+ i915->vbo = winsys->buffer_create(winsys, 64, 0, 0);
winsys->buffer_data( winsys, i915->vbo,
size, NULL,
I915_BUFFER_USAGE_LIT_VERTEX );
diff --git a/src/mesa/pipe/p_defines.h b/src/mesa/pipe/p_defines.h
index a853605486..8dce3aba90 100644
--- a/src/mesa/pipe/p_defines.h
+++ b/src/mesa/pipe/p_defines.h
@@ -170,8 +170,12 @@
/**
* Buffer access flags
*/
-#define PIPE_BUFFER_FLAG_READ 0x1
-#define PIPE_BUFFER_FLAG_WRITE 0x2
+#define PIPE_BUFFER_FLAG_READ 0x1
+#define PIPE_BUFFER_FLAG_WRITE 0x2
+#define PIPE_BUFFER_FLAG_MEM_LOCAL 0x4
+#define PIPE_BUFFER_FLAG_CACHED 0x8
+#define PIPE_BUFFER_FLAG_CUSTOM (1<<16)
+
/**
diff --git a/src/mesa/pipe/p_winsys.h b/src/mesa/pipe/p_winsys.h
index 438e8bdb63..f46807995d 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 );
+
};