wgl: Wait for fence when not using winsys framebuffer
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>
Wed, 27 May 2020 05:50:20 +0000 (01:50 -0400)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 18 Nov 2020 10:17:43 +0000 (11:17 +0100)
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

src/gallium/frontends/wgl/stw_st.c

index 5a69901..6dabb2a 100644 (file)
@@ -286,6 +286,9 @@ stw_st_flush(struct st_context_iface *stctx,
    args.stwfb = stwfb;
    args.flags = flags;
 
+   if (flags & ST_FLUSH_END_OF_FRAME && !stwfb->fb->winsys_framebuffer)
+      flags |= ST_FLUSH_WAIT;
+
    if (flags & ST_FLUSH_WAIT)
       pfence = &fence;
    stctx->flush(stctx, flags, pfence, notify_before_flush_cb, &args);