summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_upload_mgr.h
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2011-03-10 14:53:46 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2011-07-01 13:30:36 +0200
commitcf4cd8592ab54b9c959ea3b5f21437e8dca6bbcf (patch)
tree2629c10dfdd2423a9a1e94a4f84f361c35ab9fd1 /src/gallium/auxiliary/util/u_upload_mgr.h
parent6d58029bf0dbe5606f0bc4aea920767ddd3a06d5 (diff)
downloadexternal_mesa3d-cf4cd8592ab54b9c959ea3b5f21437e8dca6bbcf.zip
external_mesa3d-cf4cd8592ab54b9c959ea3b5f21437e8dca6bbcf.tar.gz
external_mesa3d-cf4cd8592ab54b9c959ea3b5f21437e8dca6bbcf.tar.bz2
gallium/util: Upload manager optimizations
Make sure that the upload manager doesn't upload data that's not dirty. This speeds up the viewperf test proe-04/1 a factor 5 or so on svga. Also introduce an u_upload_unmap() function that can be used instead of u_upload_flush() so that we can pack even more data in upload buffers. With this we can basically reuse the upload buffer across flushes. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/util/u_upload_mgr.h')
-rw-r--r--src/gallium/auxiliary/util/u_upload_mgr.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.h b/src/gallium/auxiliary/util/u_upload_mgr.h
index c9a2ffe..9891513 100644
--- a/src/gallium/auxiliary/util/u_upload_mgr.h
+++ b/src/gallium/auxiliary/util/u_upload_mgr.h
@@ -56,15 +56,27 @@ struct u_upload_mgr *u_upload_create( struct pipe_context *pipe,
*/
void u_upload_destroy( struct u_upload_mgr *upload );
-/* Unmap and release old buffer.
+/* Unmap and release old upload buffer.
*
+ * This is like u_upload_unmap() except the upload buffer is released for
+ * recycling. This should be called on real hardware flushes on systems
+ * that don't support the PIPE_TRANSFER_UNSYNCHRONIZED flag, as otherwise
+ * the next u_upload_buffer will cause a sync on the buffer.
+ */
+
+void u_upload_flush( struct u_upload_mgr *upload );
+
+/**
+ * Unmap upload buffer
+ *
+ * \param upload Upload manager
+ *
* This must usually be called prior to firing the command stream
* which references the upload buffer, as many memory managers either
* don't like firing a mapped buffer or cause subsequent maps of a
- * fired buffer to wait. For now, it's easiest just to grab a new
- * buffer.
+ * fired buffer to wait.
*/
-void u_upload_flush( struct u_upload_mgr *upload );
+void u_upload_unmap( struct u_upload_mgr *upload );
/**
* Sub-allocate new memory from the upload buffer.