summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_upload_mgr.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-01-13 13:03:25 +0100
committerMarek Olšák <[email protected]>2014-01-23 01:47:14 +0100
commitee0dc659c849ca9a552edd88d062035cae189068 (patch)
tree5454254a89a3402fb0e7bc8c39a86d446984d240 /src/gallium/auxiliary/util/u_upload_mgr.c
parent0c20bff4b626413804486444ad239af620722e2f (diff)
gallium/u_upload_mgr: don't expose u_upload_flush
It's unused and shouldn't be used at all in my opinion. If some driver doesn't support the unsynchronized flag, u_upload_mgr should avoid the synchronization by other means, e.g. by using the DONTBLOCK flag.
Diffstat (limited to 'src/gallium/auxiliary/util/u_upload_mgr.c')
-rw-r--r--src/gallium/auxiliary/util/u_upload_mgr.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c
index 6859751c591..7349d0068d8 100644
--- a/src/gallium/auxiliary/util/u_upload_mgr.c
+++ b/src/gallium/auxiliary/util/u_upload_mgr.c
@@ -87,16 +87,8 @@ void u_upload_unmap( struct u_upload_mgr *upload )
}
}
-/* Release old buffer.
- *
- * This must usually be called prior to firing the command stream
- * which references the upload buffer, as many memory managers will
- * cause subsequent maps of a fired buffer to wait.
- *
- * Can improve this with a change to pipe_buffer_write to use the
- * DONT_WAIT bit, but for now, it's easiest just to grab a new buffer.
- */
-void u_upload_flush( struct u_upload_mgr *upload )
+
+static void u_upload_release_buffer(struct u_upload_mgr *upload)
{
/* Unmap and unreference the upload buffer. */
u_upload_unmap(upload);
@@ -107,7 +99,7 @@ void u_upload_flush( struct u_upload_mgr *upload )
void u_upload_destroy( struct u_upload_mgr *upload )
{
- u_upload_flush( upload );
+ u_upload_release_buffer( upload );
FREE( upload );
}
@@ -120,7 +112,7 @@ u_upload_alloc_buffer( struct u_upload_mgr *upload,
/* Release the old buffer, if present:
*/
- u_upload_flush( upload );
+ u_upload_release_buffer( upload );
/* Allocate a new one:
*/