summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2007-12-09 18:26:26 +0000
committerJosé Fonseca <[email protected]>2007-12-09 18:26:26 +0000
commitf8f9580a2a1c89af1dc0e169b62440053d9d7e81 (patch)
treebcc578854902e63c48dc4fbeb7f42ebe2d97c167 /src/mesa/pipe
parentde7e51ff9854605cd0bbbe5829d6d987ea0a5fca (diff)
Adapt for winsys interface changes.
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/draw/draw_vertex_fetch.c1
-rw-r--r--src/mesa/pipe/i915simple/i915_texture.c3
-rw-r--r--src/mesa/pipe/softpipe/sp_texture.c4
-rw-r--r--src/mesa/pipe/xlib/xm_winsys.c14
4 files changed, 15 insertions, 7 deletions
diff --git a/src/mesa/pipe/draw/draw_vertex_fetch.c b/src/mesa/pipe/draw/draw_vertex_fetch.c
index b51cff59f54..7d983ebd299 100644
--- a/src/mesa/pipe/draw/draw_vertex_fetch.c
+++ b/src/mesa/pipe/draw/draw_vertex_fetch.c
@@ -80,7 +80,6 @@ fetch_attrib4(const void *ptr, enum pipe_format format, float attrib[4])
break;
case PIPE_FORMAT_A8R8G8B8_UNORM:
- case PIPE_FORMAT_U_A8_R8_G8_B8:
case PIPE_FORMAT_R8G8B8A8_UNORM:
attrib[0] = (float) ((unsigned char *) ptr)[2] / 255.0f;
attrib[1] = (float) ((unsigned char *) ptr)[1] / 255.0f;
diff --git a/src/mesa/pipe/i915simple/i915_texture.c b/src/mesa/pipe/i915simple/i915_texture.c
index 1ca2815dfb9..59e8db8a951 100644
--- a/src/mesa/pipe/i915simple/i915_texture.c
+++ b/src/mesa/pipe/i915simple/i915_texture.c
@@ -496,7 +496,8 @@ i915_texture_create(struct pipe_context *pipe, struct pipe_texture **pt)
if (i915->flags.is_i945 ? i945_miptree_layout(pipe, tex) :
i915_miptree_layout(pipe, tex)) {
tex->buffer = pipe->winsys->buffer_create(pipe->winsys,
- PIPE_SURFACE_FLAG_TEXTURE);
+ PIPE_SURFACE_FLAG_TEXTURE,
+ 0, 0);
if (tex->buffer)
pipe->winsys->buffer_data(pipe->winsys, tex->buffer,
diff --git a/src/mesa/pipe/softpipe/sp_texture.c b/src/mesa/pipe/softpipe/sp_texture.c
index 2288c343bf1..cfe96281845 100644
--- a/src/mesa/pipe/softpipe/sp_texture.c
+++ b/src/mesa/pipe/softpipe/sp_texture.c
@@ -382,7 +382,9 @@ softpipe_texture_create(struct pipe_context *pipe, struct pipe_texture **pt)
if (softpipe_mipmap_tree_layout(pipe, spt)) {
spt->buffer = pipe->winsys->buffer_create(pipe->winsys,
- PIPE_SURFACE_FLAG_TEXTURE);
+ 32,
+ PIPE_SURFACE_FLAG_TEXTURE,
+ 0);
if (spt->buffer) {
pipe->winsys->buffer_data(pipe->winsys, spt->buffer,
diff --git a/src/mesa/pipe/xlib/xm_winsys.c b/src/mesa/pipe/xlib/xm_winsys.c
index 976884ad520..c347d1c2a31 100644
--- a/src/mesa/pipe/xlib/xm_winsys.c
+++ b/src/mesa/pipe/xlib/xm_winsys.c
@@ -155,7 +155,7 @@ xm_buffer_reference(struct pipe_winsys *pws,
}
}
-static void
+static int
xm_buffer_data(struct pipe_winsys *pws, struct pipe_buffer_handle *buf,
unsigned size, const void *data, unsigned usage )
{
@@ -169,9 +169,10 @@ xm_buffer_data(struct pipe_winsys *pws, struct pipe_buffer_handle *buf,
}
if (data)
memcpy(xm_buf->data, data, size);
+ return 0;
}
-static void
+static int
xm_buffer_subdata(struct pipe_winsys *pws, struct pipe_buffer_handle *buf,
unsigned long offset, unsigned long size, const void *data)
{
@@ -180,9 +181,10 @@ xm_buffer_subdata(struct pipe_winsys *pws, struct pipe_buffer_handle *buf,
assert(!xm_buf->userBuffer);
assert(b);
memcpy(b + offset, data, size);
+ return 0;
}
-static void
+static int
xm_buffer_get_subdata(struct pipe_winsys *pws, struct pipe_buffer_handle *buf,
unsigned long offset, unsigned long size, void *data)
{
@@ -191,6 +193,7 @@ xm_buffer_get_subdata(struct pipe_winsys *pws, struct pipe_buffer_handle *buf,
assert(!xm_buf->userBuffer);
assert(b);
memcpy(data, b + offset, size);
+ return 0;
}
@@ -255,7 +258,10 @@ xm_get_name(struct pipe_winsys *pws)
static struct pipe_buffer_handle *
-xm_buffer_create(struct pipe_winsys *pws, unsigned flags)
+xm_buffer_create(struct pipe_winsys *pws,
+ unsigned alignment,
+ unsigned flags,
+ unsigned hints)
{
struct xm_buffer *buffer = CALLOC_STRUCT(xm_buffer);
buffer->refcount = 1;