diff --git a/src/gallium/frontends/wgl/stw_framebuffer.c b/src/gallium/frontends/wgl/stw_framebuffer.c index 17f4dac0d9d..8ed1e38e363 100644 --- a/src/gallium/frontends/wgl/stw_framebuffer.c +++ b/src/gallium/frontends/wgl/stw_framebuffer.c @@ -730,13 +730,13 @@ wait_swap_interval(struct stw_framebuffer *fb, int interval) BOOL stw_framebuffer_swap_locked(HDC hdc, struct stw_framebuffer *fb) { - struct stw_context *ctx; + struct stw_context *ctx = stw_current_context(); if (!(fb->pfi->pfd.dwFlags & PFD_DOUBLEBUFFER)) { stw_framebuffer_unlock(fb); + stw_st_flush(ctx->st, fb->drawable, ST_FLUSH_END_OF_FRAME | ST_FLUSH_FRONT); return true; } - ctx = stw_current_context(); if (ctx) { if (ctx->hud) { /* Display the HUD */