Module: Mesa Branch: main Commit: 1c6e77bd0484df5f131ca5f1f51b763978147397 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1c6e77bd0484df5f131ca5f1f51b763978147397
Author: Alyssa Rosenzweig <[email protected]> Date: Mon Feb 21 20:22:49 2022 -0500 asahi: Don't clobber clear colours Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15482> --- 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 7f82eeace24..0dfe4216ef7 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)); }
