llvmpipe: finish rendering before flushing frontbuffer resources.

Fixes misrendering on front with mesa demos

Cc: mesa-stable
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18360>
(cherry picked from commit 91dcadf95690c658b34b20cf5dbf77f79c1cf297)
This commit is contained in:
Dave Airlie 2022-09-01 11:37:27 +10:00 committed by Dylan Baker
parent 726e9bbf60
commit c9d05409ae
2 changed files with 6 additions and 2 deletions

View File

@ -7213,7 +7213,7 @@
"description": "llvmpipe: finish rendering before flushing frontbuffer resources.",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View File

@ -51,6 +51,7 @@
#include "lp_limits.h"
#include "lp_rast.h"
#include "lp_cs_tpool.h"
#include "lp_flush.h"
#include "frontend/sw_winsys.h"
@ -832,8 +833,11 @@ llvmpipe_flush_frontbuffer(struct pipe_screen *_screen,
struct llvmpipe_resource *texture = llvmpipe_resource(resource);
assert(texture->dt);
if (texture->dt)
if (texture->dt) {
llvmpipe_flush_resource(_pipe, resource, 0, true, true, false, "frontbuffer");
winsys->displaytarget_display(winsys, texture->dt, context_private, sub_box);
}
}
static void