virgl: flush cmd buffer when flushing frontbuffer
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>
This commit is contained in:
parent
0577a142de
commit
6740f34568
|
@ -946,7 +946,7 @@ static void virgl_submit_cmd(struct virgl_winsys *vws,
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
|
|
|
@ -137,6 +137,6 @@ void
|
|||
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
|
||||
|
|
|
@ -801,10 +801,13 @@ static void virgl_flush_frontbuffer(struct pipe_screen *screen,
|
|||
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,
|
||||
|
|
Loading…
Reference in New Issue