This enables us to pack more data into single upload buffers.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
svga->curr.nr_fbs = 0;
+ /* Flush the upload managers to ensure recycling of upload buffers
+ * without throttling. This should really be conditioned on
+ * pipe_buffer_map_range not supporting PIPE_TRANSFER_UNSYNCHRONIZED.
+ */
+
+ u_upload_flush(svga->upload_vb);
+ u_upload_flush(svga->upload_ib);
+
/* Ensure that texture dma uploads are processed
* before submitting commands.
*/
unsigned i;
/* Unmap upload manager vertex buffers */
- u_upload_flush(svga->upload_vb);
+ u_upload_unmap(svga->upload_vb);
for (i = 0; i < hwtnl->cmd.vdecl_count; i++) {
handle = svga_buffer_handle(svga, hwtnl->cmd.vdecl_vb[i]);
}
/* Unmap upload manager index buffers */
- u_upload_flush(svga->upload_ib);
+ u_upload_unmap(svga->upload_ib);
for (i = 0; i < hwtnl->cmd.prim_count; i++) {
if (hwtnl->cmd.prim_ib[i]) {