diff options
author | Pierre-Eric Pelloux-Prayer <[email protected]> | 2019-11-27 11:22:11 +0100 |
---|---|---|
committer | Pierre-Eric Pelloux-Prayer <[email protected]> | 2019-12-10 09:25:28 +0100 |
commit | cc0d0afe3b06e628fdd5576da07c50a15f859e98 (patch) | |
tree | 9393076330ae786fd17e704734311851e209e97b /src/mesa | |
parent | f5c1cb23835d79faafc1819069c28b82cfcb5fc2 (diff) |
st/mesa: add a notify_before_flush callback param to flush
The new callback is called right before the flush is done to allow
users of st->flush to do some work after all the previous work has
been flushed.
This will be used by dri_flush in the next commit.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index a194f529a29..d1c5a0b52ad 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -649,7 +649,9 @@ st_framebuffers_purge(struct st_context *st) static void st_context_flush(struct st_context_iface *stctxi, unsigned flags, - struct pipe_fence_handle **fence) + struct pipe_fence_handle **fence, + void (*before_flush_cb) (void*), + void* args) { struct st_context *st = (struct st_context *) stctxi; unsigned pipe_flags = 0; @@ -661,6 +663,9 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags, FLUSH_VERTICES(st->ctx, 0); FLUSH_CURRENT(st->ctx, 0); + /* Notify the caller that we're ready to flush */ + if (before_flush_cb) + before_flush_cb(args); st_flush(st, fence, pipe_flags); if ((flags & ST_FLUSH_WAIT) && fence && *fence) { |