etnaviv: blt/rs: Just pass the color to the callee

Accessing the color with an index that will be in range of
[0..nr_cbus) is wrong. Just pass the clear color down to
the callee.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26565>
This commit is contained in:
Christian Gmeiner 2023-11-28 14:19:32 +01:00 committed by Marge Bot
parent 07cd0f2306
commit 54e841bfe4
2 changed files with 2 additions and 2 deletions

View file

@ -371,7 +371,7 @@ etna_clear_blt(struct pipe_context *pctx, unsigned buffers, const struct pipe_sc
struct etna_surface *surf = etna_surface(ctx->framebuffer_s.cbufs[idx]);
etna_blit_clear_color_blt(pctx, ctx->framebuffer_s.cbufs[idx],
&color[idx]);
color);
if (!etna_resource(surf->prsc)->explicit_flush)
etna_context_add_flush_resource(ctx, surf->prsc);

View file

@ -481,7 +481,7 @@ etna_clear_rs(struct pipe_context *pctx, unsigned buffers, const struct pipe_sci
struct etna_surface *surf = etna_surface(ctx->framebuffer_s.cbufs[idx]);
etna_blit_clear_color_rs(pctx, ctx->framebuffer_s.cbufs[idx],
&color[idx]);
color);
if (!etna_resource(surf->prsc)->explicit_flush)
etna_context_add_flush_resource(ctx, surf->prsc);