diff options
author | Axel Davy <davyaxel0@gmail.com> | 2021-03-12 21:28:39 +0100 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-04-14 08:33:14 +0000 |
commit | a2a95abb6c32529e16359dc75f77caa32df489f2 (patch) | |
tree | cc262225ddee4ea31dfc76d38003498b4904f8f0 | |
parent | 062c4cc0b9bb9dce6c1e79d0f722ba1ac50462fd (diff) |
st/nine: Improve performance with thread_submit
Use the Async flush flag to return faster during
Present() when thread_submit is used.
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160>
-rw-r--r-- | src/gallium/frontends/nine/swapchain9.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/frontends/nine/swapchain9.c b/src/gallium/frontends/nine/swapchain9.c index 7c844bf50ac..1376ed99454 100644 --- a/src/gallium/frontends/nine/swapchain9.c +++ b/src/gallium/frontends/nine/swapchain9.c @@ -886,7 +886,9 @@ present( struct NineSwapChain9 *This, handle_draw_cursor_and_hud(This, resource); fence = NULL; - pipe->flush(pipe, &fence, PIPE_FLUSH_END_OF_FRAME); + /* When threadpool is enabled, we don't submit before the fence + * tells us rendering was finished, thus we can flush async there */ + pipe->flush(pipe, &fence, PIPE_FLUSH_END_OF_FRAME | (This->enable_threadpool ? PIPE_FLUSH_ASYNC : 0)); /* Present now for thread_submit, because we have the fence. * It's possible we return WASSTILLDRAWING and still Present, |