From: Keith Whitwell Date: Tue, 18 Dec 2007 16:57:17 +0000 (+0000) Subject: gallium: give userbuffers some storage in the aub buffer pool X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=208b2ad8ab51c472886388fdd872e3a86e2c1c5c;p=mesa.git gallium: give userbuffers some storage in the aub buffer pool --- diff --git a/src/mesa/pipe/xlib/xm_winsys_aub.c b/src/mesa/pipe/xlib/xm_winsys_aub.c index 0348c2ad405..ef3d975afbd 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); }