From b4791424b361d297246fb1e477482cdad7e16488 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Fri, 1 Aug 2025 23:55:00 +0200 Subject: [PATCH] etnaviv: rs: Clear only requested color buffers Fixes: 1ad37d42be1 ("etnaviv: rs: Extend to support MRTs") Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach Part-of: --- src/gallium/drivers/etnaviv/etnaviv_rs.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_rs.c b/src/gallium/drivers/etnaviv/etnaviv_rs.c index 2d389b4a021..905823e6913 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_rs.c +++ b/src/gallium/drivers/etnaviv/etnaviv_rs.c @@ -487,6 +487,9 @@ etna_clear_rs(struct pipe_context *pctx, unsigned buffers, const struct pipe_sci if (!psurf->texture) continue; + if (!(buffers & (PIPE_CLEAR_COLOR0 << idx))) + continue; + if (etna_resource_get_render_compatible(pctx, psurf->texture)->levels[psurf->level].ts_size) need_ts_flush = true; } @@ -513,6 +516,9 @@ etna_clear_rs(struct pipe_context *pctx, unsigned buffers, const struct pipe_sci if (!psurf->texture) continue; + if (!(buffers & (PIPE_CLEAR_COLOR0 << idx))) + continue; + etna_blit_clear_color_rs(pctx, idx, color, use_ts); if (!etna_resource(psurf->texture)->explicit_flush)