summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);