From f0ea6395b6ff26c426d50b982e9973a3c89fdc1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Fri, 11 Mar 2011 11:28:53 +0000 Subject: [PATCH] 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 file 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); -- 2.30.2