[Mesa-dev] [PATCH] softpipe: fix clears to only clear specified color buffers.
Dave Airlie
airlied at gmail.com
Tue Mar 26 06:44:30 UTC 2019
From: Dave Airlie <airlied at redhat.com>
This fixes piglit clearbuffer-mixed-format
---
src/gallium/drivers/softpipe/sp_clear.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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);
}
}
--
2.20.1
More information about the mesa-dev
mailing list