Mesa (master): st/mesa: use asynchronous flushes in st_finish

Nicolai Hähnle nh at kemper.freedesktop.org
Mon Nov 20 17:17:02 UTC 2017


Module: Mesa
Branch: master
Commit: 764bd6ef96d5a3247f18c0016d57c95edd9d4102
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=764bd6ef96d5a3247f18c0016d57c95edd9d4102

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Thu Nov  9 14:34:20 2017 +0100

st/mesa: use asynchronous flushes in st_finish

With threaded gallium, the driver may currently be running in another
thread. In that case, we will execute all remaining commands in that
thread instead of syncing, which should be better for cache locality.

Reviewed-by: Andres Rodriguez <andresx7 at gmail.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/mesa/state_tracker/st_cb_flush.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c
index c8452d0e6f..14bfd5a468 100644
--- a/src/mesa/state_tracker/st_cb_flush.c
+++ b/src/mesa/state_tracker/st_cb_flush.c
@@ -63,7 +63,7 @@ void st_finish( struct st_context *st )
 {
    struct pipe_fence_handle *fence = NULL;
 
-   st_flush(st, &fence, 0);
+   st_flush(st, &fence, PIPE_FLUSH_ASYNC | PIPE_FLUSH_HINT_FINISH);
 
    if(fence) {
       st->pipe->screen->fence_finish(st->pipe->screen, NULL, fence,




More information about the mesa-commit mailing list