Mesa (master): mesa/st: Only care about the uploader if it was used.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 26 07:00:50 UTC 2018


Module: Mesa
Branch: master
Commit: 65332aff29b26ce2cf277e4c753eb53844038e1e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=65332aff29b26ce2cf277e4c753eb53844038e1e

Author: Mathias Fröhlich <mathias.froehlich at web.de>
Date:   Thu Nov  1 19:03:26 2018 +0100

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 at amd.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich at web.de>

---

 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 19a5ef29a9..9831045b34 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;




More information about the mesa-commit mailing list