Mesa (master): softpipe: fix clears to only clear specified color buffers.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Mar 26 21:54:06 UTC 2019
Module: Mesa
Branch: master
Commit: e77013fb7fd469bf39d54fd82f0f1e60b1b436a0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e77013fb7fd469bf39d54fd82f0f1e60b1b436a0
Author: Dave Airlie <airlied at redhat.com>
Date: Tue Mar 26 15:25:18 2019 +1000
softpipe: fix clears to only clear specified color buffers.
This fixes piglit clearbuffer-mixed-format
Reviewed-by: Brian Paul <brianp at vmware.com>
---
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);
}
}
More information about the mesa-commit
mailing list