From: Erik Faye-Lund Date: Tue, 26 Mar 2019 18:10:43 +0000 (+0100) Subject: zink: return old fence from zink_flush X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a27b84dd2e75d681a8be3511eb1020ca22ed4d02;p=mesa.git zink: return old fence from zink_flush Acked-by: Jordan Justen --- diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index af9fc3c5fe9..b364a12b538 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -25,6 +25,7 @@ #include "zink_cmdbuf.h" #include "zink_compiler.h" +#include "zink_fence.h" #include "zink_framebuffer.h" #include "zink_pipeline.h" #include "zink_program.h" @@ -979,6 +980,11 @@ zink_flush(struct pipe_context *pctx, struct pipe_fence_handle **pfence, enum pipe_flush_flags flags) { + struct zink_context *ctx = zink_context(pctx); + + if (pfence) + zink_fence_reference(zink_screen(pctx->screen), (struct zink_fence **)pfence, + ctx->cmdbufs[0].fence); } static void