[Mesa-dev] [PATCH 2/6] mesa/st: Only unmap the uploader that was actually used.

Mathias.Froehlich at gmx.net Mathias.Froehlich at gmx.net
Fri Nov 23 08:07:28 UTC 2018


From: Mathias Fröhlich <mathias.froehlich at web.de>

In st_atom_array, we only need to unmap the upload buffer that
was actually used.

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich at web.de>
---
 src/mesa/state_tracker/st_atom_array.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_atom_array.c b/src/mesa/state_tracker/st_atom_array.c
index 9831045b34..cd00529ddf 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);
       }
    }
-- 
2.17.2



More information about the mesa-dev mailing list