aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe/sp_flush.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_flush.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_flush.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mesa/pipe/softpipe/sp_flush.c b/src/mesa/pipe/softpipe/sp_flush.c
index d4eada82287..f2186dbb653 100644
--- a/src/mesa/pipe/softpipe/sp_flush.c
+++ b/src/mesa/pipe/softpipe/sp_flush.c
@@ -54,10 +54,14 @@ softpipe_flush( struct pipe_context *pipe,
* - flush the render cache
*/
- for (i = 0; i < softpipe->framebuffer.num_cbufs; i++) {
- struct softpipe_surface *sps = softpipe_surface(softpipe->framebuffer.cbufs[i]);
- if (sps)
- sp_flush_tile_cache(sps);
- }
+ for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
+ if (softpipe->cbuf_cache[i])
+ sp_flush_tile_cache(softpipe->cbuf_cache[i]);
+
+ if (softpipe->zbuf_cache)
+ sp_flush_tile_cache(softpipe->zbuf_cache);
+
+ if (softpipe->sbuf_cache)
+ sp_flush_tile_cache(softpipe->sbuf_cache);
}