summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2011-03-11 11:28:53 +0000
committerJosé Fonseca <[email protected]>2011-03-11 11:54:26 +0000
commitf0ea6395b6ff26c426d50b982e9973a3c89fdc1c (patch)
tree7dead0264236639a7e190a0cfa462ccfec8a7b27 /src/gallium/auxiliary/util
parentb6c9c78bffe35d0ca9af100a1595412a1e06bd33 (diff)
util: Fix typo in u_upload_flush().
upload->offset is how much we used. upload->size is the whole buffer size.
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_upload_mgr.c4
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 dcf800a1e8e..9562acb8210 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);