softpipe: fix clears to only clear specified color buffers.

This fixes piglit clearbuffer-mixed-format

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Dave Airlie
2019-03-26 15:25:18 +10:00
parent 7f7c9425a8
commit e77013fb7f
+2 -1
View File
@@ -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);
}
}