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 <marek.olsak@amd.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
This commit is contained in:
Mathias Fröhlich 2018-11-01 19:03:26 +01:00 committed by Mathias Fröhlich
parent 927ce66b39
commit 65332aff29
1 changed files with 3 additions and 3 deletions

View File

@ -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;