r300g: inline winsys_buffer_destroy
authorMarek Olšák <maraeo@gmail.com>
Fri, 16 Jul 2010 10:54:11 +0000 (12:54 +0200)
committerMarek Olšák <maraeo@gmail.com>
Fri, 16 Jul 2010 19:13:21 +0000 (21:13 +0200)
src/gallium/drivers/r300/r300_screen_buffer.c

index 51d044af71eb7b2c4a7fc42245b5853766742374..bb5d4fac0657a92a9e3447933557d3df86b5ebb2 100644 (file)
@@ -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);
 }