diff options
author | Marek Olšák <[email protected]> | 2019-01-30 20:45:39 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-02-20 21:04:29 -0500 |
commit | 8ef6f68fa5f0e1e91ff88706e73a8c62463dcf69 (patch) | |
tree | 2fbeda5b9c8a290d5c300ecad2ff823a1d22c7b6 /src/mesa | |
parent | 1a93fc382b18ee6d1135952d23f0b6a8aa8cd31f (diff) |
st/mesa: always unmap the uploader in st_atom_array.c
This is a no-op for drivers supporting persistent mappings.
Reviewed-by: Nicolai Hähnle <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_atom_array.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_atom_array.c b/src/mesa/state_tracker/st_atom_array.c index 7a63d7504f3..c5e0792cc1d 100644 --- a/src/mesa/state_tracker/st_atom_array.c +++ b/src/mesa/state_tracker/st_atom_array.c @@ -496,17 +496,15 @@ st_setup_current(struct st_context *st, * times (thousands of times), so a better placement is going to * perform better. */ - u_upload_data(st->can_bind_const_buffer_as_vertex ? - st->pipe->const_uploader : - st->pipe->stream_uploader, + struct u_upload_mgr *uploader = st->can_bind_const_buffer_as_vertex ? + st->pipe->const_uploader : + st->pipe->stream_uploader; + u_upload_data(uploader, 0, cursor - data, max_alignment, data, &vbuffer[bufidx].buffer_offset, &vbuffer[bufidx].buffer.resource); - - if (!ctx->Const.AllowMappedBuffersDuringExecution && - !st->can_bind_const_buffer_as_vertex) { - u_upload_unmap(st->pipe->stream_uploader); - } + /* Always unmap. The uploader might use explicit flushes. */ + u_upload_unmap(uploader); } } |