When a resource is multisampled, we usually submit a multisampling
resolving blit before we present it or use it in some other way, but
currently we don't always flush the cmd buffer before flushing the
frontbuffer, this commit fixes that.
Fixes piglit's glx/glx-copy-sub-buffer MSAA cases on vtest, in
conjunction with other commits of this series.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11714>
}
void virgl_flush_eq(struct virgl_context *ctx, void *closure,
- struct pipe_fence_handle **fence)
+ struct pipe_fence_handle **fence)
{
struct virgl_screen *rs = virgl_screen(ctx->base.screen);
virgl_rebind_resource(struct virgl_context *vctx,
struct pipe_resource *res);
-void virgl_flush_eq(struct virgl_context *ctx, void *closure,
- struct pipe_fence_handle **fence);
+void virgl_flush_eq(struct virgl_context *ctx, void *closure, struct pipe_fence_handle **fence);
+
#endif
struct virgl_screen *vscreen = virgl_screen(screen);
struct virgl_winsys *vws = vscreen->vws;
struct virgl_resource *vres = virgl_resource(res);
+ struct virgl_context *vctx = virgl_context(ctx);
- if (vws->flush_frontbuffer)
+ if (vws->flush_frontbuffer) {
+ virgl_flush_eq(vctx, vctx, NULL);
vws->flush_frontbuffer(vws, vres->hw_res, level, layer, winsys_drawable_handle,
sub_box);
+ }
}
static void virgl_fence_reference(struct pipe_screen *screen,