From: Mathias Fröhlich Date: Thu, 1 Nov 2018 18:03:26 +0000 (+0100) Subject: mesa/st: Only unmap the uploader that was actually used. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=774d585d492d9666fc5d6c09b7868064000c96d8;p=mesa.git mesa/st: Only unmap the uploader that was actually used. In st_atom_array, we only need to unmap the upload buffer that was actually used. 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 9831045b340..cd00529ddf3 100644 --- a/src/mesa/state_tracker/st_atom_array.c +++ b/src/mesa/state_tracker/st_atom_array.c @@ -499,7 +499,8 @@ st_update_array(struct st_context *st) &vbuffer[bufidx].buffer_offset, &vbuffer[bufidx].buffer.resource); - if (!ctx->Const.AllowMappedBuffersDuringExecution) { + if (!ctx->Const.AllowMappedBuffersDuringExecution && + !st->can_bind_const_buffer_as_vertex) { u_upload_unmap(st->pipe->stream_uploader); } }