From: Jonathan Marek Date: Thu, 21 Jun 2018 21:06:30 +0000 (-0400) Subject: freedreno: a2xx: fix clear color X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=94bc06b1965fb8ac8a03bbd6c20314beea76d91e;p=mesa.git 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 --- 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 &