From 774d585d492d9666fc5d6c09b7868064000c96d8 Mon Sep 17 00:00:00 2001 From: Mathias Fröhlich Date: Thu, 1 Nov 2018 19:03:26 +0100 Subject: mesa/st: Only unmap the uploader that was actually used. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/mesa/state_tracker/st_atom_array.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa') 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); } } -- cgit v1.2.3