summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2007-12-09 18:26:26 +0000
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2007-12-09 18:26:26 +0000
commitf8f9580a2a1c89af1dc0e169b62440053d9d7e81 (patch)
treebcc578854902e63c48dc4fbeb7f42ebe2d97c167 /src/mesa/drivers
parentde7e51ff9854605cd0bbbe5829d6d987ea0a5fca (diff)
Adapt for winsys interface changes.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c38
-rw-r--r--src/mesa/drivers/x11/xm_winsys.c7
2 files changed, 27 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c b/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c
index 1799e9b901..86ea86a58f 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c
@@ -105,42 +105,48 @@ intel_buffer_reference(struct pipe_winsys *winsys,
/* Grabs the hardware lock!
*/
-static void intel_buffer_data(struct pipe_winsys *winsys,
- struct pipe_buffer_handle *buf,
- unsigned size, const void *data,
- unsigned usage )
+static int intel_buffer_data(struct pipe_winsys *winsys,
+ struct pipe_buffer_handle *buf,
+ unsigned size, const void *data,
+ unsigned usage )
{
driBOData( dri_bo(buf), size, data, 0 );
+ return 0;
}
-static void intel_buffer_subdata(struct pipe_winsys *winsys,
- struct pipe_buffer_handle *buf,
- unsigned long offset,
- unsigned long size,
- const void *data)
+static int intel_buffer_subdata(struct pipe_winsys *winsys,
+ struct pipe_buffer_handle *buf,
+ unsigned long offset,
+ unsigned long size,
+ const void *data)
{
driBOSubData( dri_bo(buf), offset, size, data );
+ return 0;
}
-static void intel_buffer_get_subdata(struct pipe_winsys *winsys,
- struct pipe_buffer_handle *buf,
- unsigned long offset,
- unsigned long size,
- void *data)
+static int intel_buffer_get_subdata(struct pipe_winsys *winsys,
+ struct pipe_buffer_handle *buf,
+ unsigned long offset,
+ unsigned long size,
+ void *data)
{
driBOGetSubData( dri_bo(buf), offset, size, data );
+ return 0;
}
/* Pipe has no concept of pools. We choose the tex/region pool
* for all buffers.
*/
static struct pipe_buffer_handle *
-intel_buffer_create(struct pipe_winsys *winsys, unsigned flags)
+intel_buffer_create(struct pipe_winsys *winsys,
+ unsigned alignment,
+ unsigned flags,
+ unsigned hint )
{
struct _DriBufferObject *buffer;
struct intel_pipe_winsys *iws = intel_pipe_winsys(winsys);
driGenBuffers( iws->regionPool,
- "pipe buffer", 1, &buffer, 64, 0, 0 );
+ "pipe buffer", 1, &buffer, alignment, flags, hint );
return pipe_bo(buffer);
}
diff --git a/src/mesa/drivers/x11/xm_winsys.c b/src/mesa/drivers/x11/xm_winsys.c
index f863cdbc15..dafbe96a1e 100644
--- a/src/mesa/drivers/x11/xm_winsys.c
+++ b/src/mesa/drivers/x11/xm_winsys.c
@@ -210,7 +210,10 @@ xm_get_name(struct pipe_winsys *pws)
static struct pipe_buffer_handle *
-xm_buffer_create(struct pipe_winsys *pws, unsigned alignment)
+xm_buffer_create(struct pipe_winsys *pws,
+ unsigned alignment,
+ unsigned flags,
+ unsigned hint)
{
struct xm_buffer *buffer = CALLOC_STRUCT(xm_buffer);
buffer->refcount = 1;
@@ -258,7 +261,7 @@ xm_region_alloc(struct pipe_winsys *winsys,
assert(region->pitch > 0);
- region->buffer = winsys->buffer_create( winsys, alignment )
+ region->buffer = winsys->buffer_create( winsys, alignment, 0, 0 )
;
/* NULL data --> just allocate the space */