From 911ce374caf03581038e49cf6edccf8d4953eeda Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 8 Sep 2020 09:12:23 -0700 Subject: [PATCH] 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 Part-of: --- 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