Mesa (master): util: Fix typo in u_upload_flush().
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Fri Mar 11 11:54:40 UTC 2011
Module: Mesa
Branch: master
Commit: f0ea6395b6ff26c426d50b982e9973a3c89fdc1c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f0ea6395b6ff26c426d50b982e9973a3c89fdc1c
Author: José Fonseca <jfonseca at vmware.com>
Date: Fri Mar 11 11:28:53 2011 +0000
util: Fix typo in u_upload_flush().
upload->offset is how much we used. upload->size is the whole buffer size.
---
src/gallium/auxiliary/util/u_upload_mgr.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c
index dcf800a..9562acb 100644
--- a/src/gallium/auxiliary/util/u_upload_mgr.c
+++ b/src/gallium/auxiliary/util/u_upload_mgr.c
@@ -85,9 +85,9 @@ void u_upload_flush( struct u_upload_mgr *upload )
{
/* Unmap and unreference the upload buffer. */
if (upload->transfer) {
- if (upload->size) {
+ if (upload->offset) {
pipe_buffer_flush_mapped_range(upload->pipe, upload->transfer,
- 0, upload->size);
+ 0, upload->offset);
}
pipe_transfer_unmap(upload->pipe, upload->transfer);
pipe_transfer_destroy(upload->pipe, upload->transfer);
More information about the mesa-commit
mailing list