diff options
Diffstat (limited to 'src/gallium/drivers/r600/r600_buffer.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_buffer.c b/src/gallium/drivers/r600/r600_buffer.c index 2f7eb513d4e..3d7d1f04739 100644 --- a/src/gallium/drivers/r600/r600_buffer.c +++ b/src/gallium/drivers/r600/r600_buffer.c @@ -26,15 +26,15 @@ */ #include "r600_pipe.h" #include "util/u_upload_mgr.h" +#include "util/u_memory.h" static void r600_buffer_destroy(struct pipe_screen *screen, struct pipe_resource *buf) { - struct r600_screen *rscreen = (struct r600_screen*)screen; struct r600_resource *rbuffer = r600_resource(buf); pb_reference(&rbuffer->buf, NULL); - util_slab_free(&rscreen->pool_buffers, rbuffer); + FREE(rbuffer); } static struct pipe_transfer *r600_get_transfer(struct pipe_context *ctx, @@ -207,7 +207,7 @@ struct pipe_resource *r600_buffer_create(struct pipe_screen *screen, /* XXX We probably want a different alignment for buffers and textures. */ unsigned alignment = 4096; - rbuffer = util_slab_alloc(&rscreen->pool_buffers); + rbuffer = MALLOC_STRUCT(r600_resource); rbuffer->b.b = *templ; pipe_reference_init(&rbuffer->b.b.reference, 1); @@ -215,7 +215,7 @@ struct pipe_resource *r600_buffer_create(struct pipe_screen *screen, rbuffer->b.vtbl = &r600_buffer_vtbl; if (!r600_init_resource(rscreen, rbuffer, templ->width0, alignment, templ->bind, templ->usage)) { - util_slab_free(&rscreen->pool_buffers, rbuffer); + FREE(rbuffer); return NULL; } return &rbuffer->b.b; |