From: Mathias Fröhlich Date: Thu, 1 Nov 2018 18:03:26 +0000 (+0100) Subject: mesa/st: Only care about the uploader if it was used. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=65332aff29b26ce2cf277e4c753eb53844038e1e;p=mesa.git mesa/st: Only care about the uploader if it was used. 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 --- 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;