util: Set DISCARD & UNSYNCHRONIZED when uploading vertices sequentially.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 21 Jan 2010 17:38:47 +0000 (09:38 -0800)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 21 Jan 2010 23:18:40 +0000 (15:18 -0800)
src/gallium/auxiliary/util/u_upload_mgr.c

index 975ee89c4551df262de09cc2b3ad613c4816edeb..55a65375c81d1f9b619874ed3b5d94e1d295e802 100644 (file)
@@ -85,7 +85,9 @@ my_buffer_write(struct pipe_screen *screen,
 
    map = pipe_buffer_map_range(screen, buf, offset, size, 
                                PIPE_BUFFER_USAGE_CPU_WRITE |
-                               PIPE_BUFFER_USAGE_FLUSH_EXPLICIT);
+                               PIPE_BUFFER_USAGE_FLUSH_EXPLICIT |
+                               PIPE_BUFFER_USAGE_DISCARD |
+                               PIPE_BUFFER_USAGE_UNSYNCHRONIZED);
    if (map == NULL) 
       return PIPE_ERROR_OUT_OF_MEMORY;