From 65332aff29b26ce2cf277e4c753eb53844038e1e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathias=20Fr=C3=B6hlich?= Date: Thu, 1 Nov 2018 19:03:26 +0100 Subject: [PATCH] mesa/st: Only care about the uploader if it was used. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In st_atom_array, we only need to care for unmapping the upload buffer if we actually used it. Reviewed-by: Marek Olšák Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_atom_array.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_array.c b/src/mesa/state_tracker/st_atom_array.c index 19a5ef29a98..9831045b340 100644 --- a/src/mesa/state_tracker/st_atom_array.c +++ b/src/mesa/state_tracker/st_atom_array.c @@ -498,10 +498,10 @@ st_update_array(struct st_context *st) 0, cursor - data, max_alignment, data, &vbuffer[bufidx].buffer_offset, &vbuffer[bufidx].buffer.resource); - } - if (!ctx->Const.AllowMappedBuffersDuringExecution) { - u_upload_unmap(st->pipe->stream_uploader); + if (!ctx->Const.AllowMappedBuffersDuringExecution) { + u_upload_unmap(st->pipe->stream_uploader); + } } const unsigned num_inputs = st->vp_variant->num_inputs; -- 2.30.2