Mesa (master): freedreno/a6xx: Fix MSAA clear

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Sep 10 02:53:12 UTC 2020


Module: Mesa
Branch: master
Commit: 911ce374caf03581038e49cf6edccf8d4953eeda
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=911ce374caf03581038e49cf6edccf8d4953eeda

Author: Rob Clark <robdclark at chromium.org>
Date:   Tue Sep  8 09:12:23 2020 -0700

freedreno/a6xx: Fix MSAA clear

We need to do MSAA clear on the 3d pipe, it seems to not work out
properly on 2d pipe (at least for 4x MSAA and heights that are not
multiple of 16).

This matches what blob and tu seem to do.  Fixes the following with
DEQP_CONFIG=rgba8888d24s8ms4

dEQP-GLES31.functional.primitive_bounding_box.depth.builtin_depth.per_primitive_bbox_equal
dEQP-GLES31.functional.primitive_bounding_box.depth.builtin_depth.per_primitive_bbox_larger
dEQP-GLES31.functional.primitive_bounding_box.depth.user_defined_depth.per_primitive_bbox_equal
dEQP-GLES31.functional.primitive_bounding_box.depth.user_defined_depth.per_primitive_bbox_larger

Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649>

---

 src/gallium/drivers/freedreno/a6xx/fd6_draw.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
index 284569f6128..c9630f21838 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
@@ -480,6 +480,10 @@ fd6_clear(struct fd_context *ctx, unsigned buffers,
 	const bool has_depth = pfb->zsbuf;
 	unsigned color_buffers = buffers >> 2;
 
+	/* we need to do multisample clear on 3d pipe, so fallback to u_blitter: */
+	if (pfb->samples > 1)
+		return false;
+
 	/* If we're clearing after draws, fallback to 3D pipe clears.  We could
 	 * use blitter clears in the draw batch but then we'd have to patch up the
 	 * gmem offsets. This doesn't seem like a useful thing to optimize for



More information about the mesa-commit mailing list