wgl: Wait for fence when not using winsys framebuffer

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>
This commit is contained in:
Louis-Francis Ratté-Boulianne 2020-05-27 01:50:20 -04:00 committed by Erik Faye-Lund
parent f49ff1548b
commit ece2cc3352
1 changed files with 3 additions and 0 deletions

View 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);