drisw: do an MSAA resolve when copying the backbuffer
When calling glXCopySubBuffer, we must resolve the backbuffer before copying it the frontbuffer. Fixes piglit's glx/glx-copy-sub-buffer on virgl. 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
6740f34568
commit
f0eb163ae0
1 changed files with 7 additions and 0 deletions
|
|
@ -285,6 +285,13 @@ drisw_copy_sub_buffer(__DRIdrawable *dPriv, int x, int y,
|
|||
|
||||
ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL, NULL, NULL);
|
||||
|
||||
if (drawable->stvis.samples > 1) {
|
||||
/* Resolve the back buffer. */
|
||||
dri_pipe_blit(ctx->st->pipe,
|
||||
drawable->textures[ST_ATTACHMENT_BACK_LEFT],
|
||||
drawable->msaa_textures[ST_ATTACHMENT_BACK_LEFT]);
|
||||
}
|
||||
|
||||
u_box_2d(x, dPriv->h - y - h, w, h, &box);
|
||||
drisw_present_texture(ctx->st->pipe, dPriv, ptex, &box);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue