zink: return old fence from zink_flush
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 26 Mar 2019 18:10:43 +0000 (19:10 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 28 Oct 2019 08:51:44 +0000 (08:51 +0000)
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
src/gallium/drivers/zink/zink_context.c

index af9fc3c5fe991aaa89f49046b30abe85e53c62b2..b364a12b5384832b59bb2a4b574b30980cd173bf 100644 (file)
@@ -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