When st_context_flush() is called with ST_FLUSH_WAIT,
the function will return after the fence is completed.
Reviewed-by: Brian Paul <brianp@vmware.com>
*/
#define ST_FLUSH_FRONT (1 << 0)
#define ST_FLUSH_END_OF_FRAME (1 << 1)
+#define ST_FLUSH_WAIT (1 << 2)
/**
* Value to st_manager->get_param function.
}
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);
}