mesa/0001-llvmpipe-finish-rendering-before-flushing-frontbuffe.patch
2022-09-03 10:11:40 +00:00

40 lines
1.2 KiB
Diff

From 0db29ee48d4f4fd0858bcf7def39926e2ee19d63 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Thu, 1 Sep 2022 11:37:27 +1000
Subject: [PATCH] llvmpipe: finish rendering before flushing frontbuffer
resources.
Fixes misrendering on front with mesa demos
---
src/gallium/drivers/llvmpipe/lp_screen.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 333d7695ee7..0fcbcccedd2 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -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"
@@ -835,8 +836,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
--
2.31.1