summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorCharmaine Lee <[email protected]>2017-02-18 01:19:23 -0800
committerCharmaine Lee <[email protected]>2017-02-18 09:36:42 -0800
commitd793b54c4e921a8560a6aac6b9949f2784a5dc73 (patch)
tree053ee3d9b088ec30d676c22be525112cb193aab6 /src/mesa
parentb71e6538a8dcd51a8e9760df61764972020dfff7 (diff)
st: add ST_FLUSH_WAIT to st_context_flush()
When st_context_flush() is called with ST_FLUSH_WAIT, the function will return after the fence is completed. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_manager.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index c3d8286b5a7..e663b017174 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -504,6 +504,13 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags,
}
st_flush(st, fence, pipe_flags);
+
+ if ((flags & ST_FLUSH_WAIT) && fence) {
+ st->pipe->screen->fence_finish(st->pipe->screen, NULL, *fence,
+ PIPE_TIMEOUT_INFINITE);
+ st->pipe->screen->fence_reference(st->pipe->screen, fence, NULL);
+ }
+
if (flags & ST_FLUSH_FRONT)
st_manager_flush_frontbuffer(st);
}