Mesa (mesa_7_7_branch): util: Set DISCARD & UNSYNCHRONIZED when uploading vertices sequentially.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Thu Jan 21 23:27:44 UTC 2010
Module: Mesa
Branch: mesa_7_7_branch
Commit: 37246f854b49101b5a112cd5a0bd93bab1b78f7a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=37246f854b49101b5a112cd5a0bd93bab1b78f7a
Author: José Fonseca <jfonseca at vmware.com>
Date: Thu Jan 21 09:38:47 2010 -0800
util: Set DISCARD & UNSYNCHRONIZED when uploading vertices sequentially.
---
src/gallium/auxiliary/util/u_upload_mgr.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c
index 975ee89..55a6537 100644
--- a/src/gallium/auxiliary/util/u_upload_mgr.c
+++ b/src/gallium/auxiliary/util/u_upload_mgr.c
@@ -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;
More information about the mesa-commit
mailing list