aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_screen_buffer.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-05-11 22:56:08 +0200
committerMarek Olšák <[email protected]>2012-05-12 00:50:52 +0200
commitf808984f438b827afff6fdbe52ac52dee8781d03 (patch)
treeecdb7ae2845cb3f864b81afe8e67e60e462c36b1 /src/gallium/drivers/r300/r300_screen_buffer.c
parent4fd60ad6dae7e5cf3eb0ab4f49bf86378230b65f (diff)
r300g: remove slab allocator for pipe_resource (used mainly for user buffers)
Diffstat (limited to 'src/gallium/drivers/r300/r300_screen_buffer.c')
-rw-r--r--src/gallium/drivers/r300/r300_screen_buffer.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c
index 0c3f8702c4a..9ab2acd671f 100644
--- a/src/gallium/drivers/r300/r300_screen_buffer.c
+++ b/src/gallium/drivers/r300/r300_screen_buffer.c
@@ -53,7 +53,6 @@ void r300_upload_index_buffer(struct r300_context *r300,
static void r300_buffer_destroy(struct pipe_screen *screen,
struct pipe_resource *buf)
{
- struct r300_screen *r300screen = r300_screen(screen);
struct r300_resource *rbuf = r300_resource(buf);
if (rbuf->constant_buffer)
@@ -62,7 +61,7 @@ static void r300_buffer_destroy(struct pipe_screen *screen,
if (rbuf->buf)
pb_reference(&rbuf->buf, NULL);
- util_slab_free(&r300screen->pool_buffers, rbuf);
+ FREE(rbuf);
}
static struct pipe_transfer*
@@ -151,7 +150,7 @@ struct pipe_resource *r300_buffer_create(struct pipe_screen *screen,
struct r300_resource *rbuf;
unsigned alignment = 16;
- rbuf = util_slab_alloc(&r300screen->pool_buffers);
+ rbuf = MALLOC_STRUCT(r300_resource);
rbuf->b.b = *templ;
rbuf->b.vtbl = &r300_buffer_vtbl;
@@ -172,7 +171,7 @@ struct pipe_resource *r300_buffer_create(struct pipe_screen *screen,
rbuf->b.b.width0, alignment,
rbuf->b.b.bind, rbuf->domain);
if (!rbuf->buf) {
- util_slab_free(&r300screen->pool_buffers, rbuf);
+ FREE(rbuf);
return NULL;
}