From 1c6e77bd0484df5f131ca5f1f51b763978147397 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 21 Feb 2022 20:22:49 -0500 Subject: [PATCH] asahi: Don't clobber clear colours Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_pipe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 7f82eea..0dfe421 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -389,7 +389,9 @@ agx_clear(struct pipe_context *pctx, unsigned buffers, const struct pipe_scissor { struct agx_context *ctx = agx_context(pctx); ctx->batch->clear |= buffers; - memcpy(ctx->batch->clear_color, color->f, sizeof(color->f)); + + if (buffers & PIPE_CLEAR_COLOR0) + memcpy(ctx->batch->clear_color, color->f, sizeof(color->f)); } -- 2.7.4