From a27b84dd2e75d681a8be3511eb1020ca22ed4d02 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 26 Mar 2019 19:10:43 +0100 Subject: [PATCH] zink: return old fence from zink_flush Acked-by: Jordan Justen --- src/gallium/drivers/zink/zink_context.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index af9fc3c..b364a12 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 -- 2.7.4