From 87563e64c933aee9f201e115627b428f1a99df65 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 20 Nov 2022 09:21:43 -0800 Subject: [PATCH] freedreno/a6xx: Use fallback path for MSAA clear_texture() The trick for emulating MSAA clear by adjusting blit coords tends to fall over with tiled/ubwc, so just use the fallback path instead. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_blitter.c | 3 ++- src/gallium/drivers/freedreno/freedreno_resource.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c index 43b0f9ff0b2..6976e6c707f 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c @@ -239,7 +239,8 @@ can_do_clear(const struct pipe_resource *prsc, unsigned level, const struct pipe_box *box) { return ok_format(prsc->format) && - ok_dims(prsc, box, level); + ok_dims(prsc, box, level) && + (fd_resource_nr_samples(prsc) == 1); return true; } diff --git a/src/gallium/drivers/freedreno/freedreno_resource.h b/src/gallium/drivers/freedreno/freedreno_resource.h index b328cb41f41..ace24fb0d34 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.h +++ b/src/gallium/drivers/freedreno/freedreno_resource.h @@ -340,7 +340,7 @@ fd_resource_ubwc_enabled(struct fd_resource *rsc, int level) * most of the time) */ static inline unsigned -fd_resource_nr_samples(struct pipe_resource *prsc) +fd_resource_nr_samples(const struct pipe_resource *prsc) { return MAX2(1, prsc->nr_samples); }