From 208b2ad8ab51c472886388fdd872e3a86e2c1c5c Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 18 Dec 2007 16:57:17 +0000 Subject: gallium: give userbuffers some storage in the aub buffer pool --- src/mesa/pipe/xlib/xm_winsys_aub.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/mesa/pipe') diff --git a/src/mesa/pipe/xlib/xm_winsys_aub.c b/src/mesa/pipe/xlib/xm_winsys_aub.c index 0348c2ad40..ef3d975afb 100644 --- a/src/mesa/pipe/xlib/xm_winsys_aub.c +++ b/src/mesa/pipe/xlib/xm_winsys_aub.c @@ -51,7 +51,6 @@ struct aub_buffer { unsigned refcount; unsigned map_count; boolean dump_on_unmap; - boolean userbuffer; }; @@ -276,9 +275,15 @@ static struct pipe_buffer_handle * aub_user_buffer_create(struct pipe_winsys *winsys, void *ptr, unsigned bytes) { struct aub_buffer *sbo = CALLOC_STRUCT(aub_buffer); - sbo->size = bytes; - sbo->userbuffer = 1; - sbo->data = ptr; + + /* Lets hope this is meant for upload, not as a result! + */ + aub_buffer_data( winsys, + pipe_bo(sbo), + bytes, + ptr, + 0 ); + return pipe_bo(sbo); } -- cgit v1.2.3