From: Dave Airlie Date: Tue, 26 Mar 2019 05:25:18 +0000 (+1000) Subject: softpipe: fix clears to only clear specified color buffers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e77013fb7fd469bf39d54fd82f0f1e60b1b436a0;p=mesa.git softpipe: fix clears to only clear specified color buffers. This fixes piglit clearbuffer-mixed-format Reviewed-by: Brian Paul --- diff --git a/src/gallium/drivers/softpipe/sp_clear.c b/src/gallium/drivers/softpipe/sp_clear.c index ba04fd0aa87..d2626a24333 100644 --- a/src/gallium/drivers/softpipe/sp_clear.c +++ b/src/gallium/drivers/softpipe/sp_clear.c @@ -68,7 +68,8 @@ softpipe_clear(struct pipe_context *pipe, unsigned buffers, if (buffers & PIPE_CLEAR_COLOR) { for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++) { - sp_tile_cache_clear(softpipe->cbuf_cache[i], color, 0); + if (buffers & (PIPE_CLEAR_COLOR0 << i)) + sp_tile_cache_clear(softpipe->cbuf_cache[i], color, 0); } }