u_index_modify: map buffers with PIPE_TRANSFER_UNSYNCHRONIZED
authorMarek Olšák <maraeo@gmail.com>
Mon, 14 Feb 2011 05:03:18 +0000 (06:03 +0100)
committerMarek Olšák <maraeo@gmail.com>
Mon, 14 Feb 2011 06:45:14 +0000 (07:45 +0100)
src/gallium/auxiliary/util/u_index_modify.c

index f2c9db3caf1f8a830772a78f39dd5b48b87c3b1a..fda396ba0945dc7b7378260b03a4d6f7c17fab9a 100644 (file)
@@ -38,7 +38,10 @@ void util_shorten_ubyte_elts_to_userptr(struct pipe_context *context,
     unsigned short *out_map = out;
     unsigned i;
 
-    in_map = pipe_buffer_map(context, elts, PIPE_TRANSFER_READ, &src_transfer);
+    in_map = pipe_buffer_map(context, elts,
+                             PIPE_TRANSFER_READ |
+                             PIPE_TRANSFER_UNSYNCHRONIZED,
+                             &src_transfer);
     in_map += start;
 
     for (i = 0; i < count; i++) {
@@ -87,7 +90,10 @@ void util_rebuild_ushort_elts_to_userptr(struct pipe_context *context,
     unsigned short *out_map = out;
     unsigned i;
 
-    in_map = pipe_buffer_map(context, elts, PIPE_TRANSFER_READ, &in_transfer);
+    in_map = pipe_buffer_map(context, elts,
+                             PIPE_TRANSFER_READ |
+                             PIPE_TRANSFER_UNSYNCHRONIZED,
+                             &in_transfer);
     in_map += start;
 
     for (i = 0; i < count; i++) {
@@ -135,7 +141,10 @@ void util_rebuild_uint_elts_to_userptr(struct pipe_context *context,
     unsigned int *out_map = out;
     unsigned i;
 
-    in_map = pipe_buffer_map(context, elts, PIPE_TRANSFER_READ, &in_transfer);
+    in_map = pipe_buffer_map(context, elts,
+                             PIPE_TRANSFER_READ |
+                             PIPE_TRANSFER_UNSYNCHRONIZED,
+                             &in_transfer);
     in_map += start;
 
     for (i = 0; i < count; i++) {