From 94bc06b1965fb8ac8a03bbd6c20314beea76d91e Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Thu, 21 Jun 2018 17:06:30 -0400 Subject: [PATCH] freedreno: a2xx: fix clear color the format of the CLEAR_COLOR register doesn't depend on the target format this fixes clear color when rendering to 32-bit RGBA and 16-bit targets Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a2xx/fd2_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c b/src/gallium/drivers/freedreno/a2xx/fd2_draw.c index ca634d794ad..6f0535fa2bb 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_draw.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_draw.c @@ -135,7 +135,7 @@ fd2_clear(struct fd_context *ctx, unsigned buffers, uint32_t reg, colr = 0; if ((buffers & PIPE_CLEAR_COLOR) && fb->nr_cbufs) - colr = pack_rgba(fb->cbufs[0]->format, color->f); + colr = pack_rgba(PIPE_FORMAT_R8G8B8A8_UNORM, color->f); /* emit generic state now: */ fd2_emit_state(ctx, ctx->dirty & -- 2.30.2