Mesa (staging/20.0): panfrost: Fix the damage box clamping logic
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Feb 3 17:01:08 UTC 2020
Module: Mesa
Branch: staging/20.0
Commit: 7bc056dd785cd8d3cb98feec856e90ef63f43dcd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7bc056dd785cd8d3cb98feec856e90ef63f43dcd
Author: Boris Brezillon <boris.brezillon at collabora.com>
Date: Fri Jan 31 13:42:19 2020 +0100
panfrost: Fix the damage box clamping logic
When the rendering are is not covering the whole FBO, and the biggest
damage rect is empty, we can have damage.max{x,y} > damage.min{x,y},
which leads to invalid reload boxes.
Fixes: 65ae86b85422 ("panfrost: Add support for KHR_partial_update()")
Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>
(cherry picked from commit b550b7ef3b8d12f533b67b1a03159a127a3ff34a)
---
.pick_status.json | 2 +-
src/gallium/drivers/panfrost/pan_job.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index 51c9153b370..9e75d26bd79 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -4,7 +4,7 @@
"description": "panfrost: Fix the damage box clamping logic",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "65ae86b85422ae0d41624dd56f935d85b0164a13"
},
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 8ec00022999..bdffa3cafa2 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -777,9 +777,11 @@ panfrost_batch_draw_wallpaper(struct panfrost_batch *batch)
damage.maxx = MIN2(batch->maxx,
rsrc->damage.biggest_rect.x +
rsrc->damage.biggest_rect.width);
+ damage.maxx = MAX2(damage.maxx, damage.minx);
damage.maxy = MIN2(batch->maxy,
rsrc->damage.biggest_rect.y +
rsrc->damage.biggest_rect.height);
+ damage.maxy = MAX2(damage.maxy, damage.miny);
/* One damage rectangle means we can end up with at most 4 reload
* regions:
More information about the mesa-commit
mailing list