fix frontbuffer misrendering

Resolves: rhbz#2122885
This commit is contained in:
Dave Airlie 2022-09-01 13:41:19 +10:00
parent 1b174f4c91
commit 59b3409b97
2 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,39 @@
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

View File

@ -54,7 +54,7 @@ Name: mesa
Summary: Mesa graphics libraries
%global ver 22.1.5
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
Release: 1%{?dist}
Release: 2%{?dist}
License: MIT
URL: http://www.mesa3d.org
@ -67,6 +67,8 @@ Source1: Mesa-MLAA-License-Clarification-Email.txt
# two llvmpipe multi-context fixes
Patch10: 0001-llvmpipe-make-last_fence-a-screen-rast-object-not-a-.patch
Patch11: 0002-llvmpipe-keep-context-list-and-use-to-track-resource.patch
# a frontbuffer misrendering fix
Patch12: 0001-llvmpipe-finish-rendering-before-flushing-frontbuffe.patch
BuildRequires: meson >= 0.45
BuildRequires: gcc
@ -597,6 +599,9 @@ popd
%endif
%changelog
* Thu Sep 01 2022 Dave Airlie <airlied@redhat.com> - 22.1.5-2
- fix frontbuffer misrendering
* Wed Aug 10 2022 Dave Airlie <airlied@redhat.com> - 22.1.5-1
- rebase to 22.1.5 + llvmpipe fixes