diff options
author | Marek Olšák <[email protected]> | 2020-03-11 17:27:29 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-17 19:13:57 +0000 |
commit | 99a29a20d2e7b931c5ee6478665f0784eca2c0d8 (patch) | |
tree | 5f8726ac5ec105fd5364200479d72e3109e0ef2b | |
parent | 5960dadd1f2494da6ea8fa04a46271beb66dea49 (diff) |
gallium/u_threaded: don't sync the thread for all unsychronized mappings
This was missing for the READ case. This improves glBegin/End performance.
(vbo maps with WRITE | READ | UNSYCHRONIZED)
Acked-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Mathias Fröhlich <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4153>
-rw-r--r-- | src/gallium/auxiliary/util/u_threaded_context.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index 30790949336..63ca61bb249 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -1393,6 +1393,9 @@ tc_improve_map_buffer_flags(struct threaded_context *tc, /* Handle CPU reads trivially. */ if (usage & PIPE_TRANSFER_READ) { + if (usage & PIPE_TRANSFER_UNSYNCHRONIZED) + usage |= TC_TRANSFER_MAP_THREADED_UNSYNC; /* don't sync */ + /* Drivers aren't allowed to do buffer invalidations. */ return usage & ~PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE; } |