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>
This commit is contained in:
Axel Davy
2021-03-12 21:28:39 +01:00
committed by Marge Bot
parent 062c4cc0b9
commit a2a95abb6c

View File

@@ -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,