From: Marek Olšák Date: Fri, 16 Jul 2010 10:54:11 +0000 (+0200) Subject: r300g: inline winsys_buffer_destroy X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5862b6ed6196572be0462da913d9e45b4d05f240;p=mesa.git r300g: inline winsys_buffer_destroy --- diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c index 51d044af71e..bb5d4fac065 100644 --- a/src/gallium/drivers/r300/r300_screen_buffer.c +++ b/src/gallium/drivers/r300/r300_screen_buffer.c @@ -119,27 +119,19 @@ int r300_upload_user_buffers(struct r300_context *r300) return ret; } -static void r300_winsys_buffer_destroy(struct r300_screen *r300screen, - struct r300_buffer *rbuf) -{ - struct r300_winsys_screen *rws = r300screen->rws; - - if (rbuf->buf) { - rws->buffer_reference(rws, &rbuf->buf, NULL); - rbuf->buf = NULL; - } -} - static void r300_buffer_destroy(struct pipe_screen *screen, struct pipe_resource *buf) { struct r300_screen *r300screen = r300_screen(screen); struct r300_buffer *rbuf = r300_buffer(buf); + struct r300_winsys_screen *rws = r300screen->rws; if (rbuf->constant_buffer) FREE(rbuf->constant_buffer); - r300_winsys_buffer_destroy(r300screen, rbuf); + if (rbuf->buf) + rws->buffer_reference(rws, &rbuf->buf, NULL); + FREE(rbuf); }