From 5862b6ed6196572be0462da913d9e45b4d05f240 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 16 Jul 2010 12:54:11 +0200 Subject: [PATCH] r300g: inline winsys_buffer_destroy --- src/gallium/drivers/r300/r300_screen_buffer.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) 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); } -- 2.30.2