diff --git a/src/gallium/frontends/wgl/stw_context.c b/src/gallium/frontends/wgl/stw_context.c index 7297d3f1e51..14fab3d9cec 100644 --- a/src/gallium/frontends/wgl/stw_context.c +++ b/src/gallium/frontends/wgl/stw_context.c @@ -443,7 +443,10 @@ stw_make_current(struct stw_framebuffer *fb, struct stw_framebuffer *fbRead, str return true; } } else { - if (old_ctx->shared) { + if (old_ctx->shared || + /* Using a winsys framebuffer effectively means that there's sharing since another + * context might end up using the same resources. */ + (old_ctx->current_framebuffer && old_ctx->current_framebuffer->winsys_framebuffer)) { if (old_ctx->current_framebuffer) { stw_st_flush(old_ctx->st, old_ctx->current_framebuffer->drawable, ST_FLUSH_FRONT | ST_FLUSH_WAIT);