diff options
author | Dave Airlie <[email protected]> | 2019-03-26 15:25:18 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2019-03-27 07:53:32 +1000 |
commit | e77013fb7fd469bf39d54fd82f0f1e60b1b436a0 (patch) | |
tree | 53e9b8c3101fb62758b684909d0cdfbb8ef7a6cd /src/gallium/drivers | |
parent | 7f7c9425a870af2bcb8b4c3149810bd1b32b8ddc (diff) |
softpipe: fix clears to only clear specified color buffers.
This fixes piglit clearbuffer-mixed-format
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_clear.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } } |