OSDN Git Service

gallium: give userbuffers some storage in the aub buffer pool
authorKeith Whitwell <keith@tungstengraphics.com>
Tue, 18 Dec 2007 16:57:17 +0000 (16:57 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Tue, 18 Dec 2007 16:57:17 +0000 (16:57 +0000)
src/mesa/pipe/xlib/xm_winsys_aub.c

index 0348c2a..ef3d975 100644 (file)
@@ -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);
 }