summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/pipe/softpipe/sp_clear.c2
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c2
-rw-r--r--src/mesa/pipe/softpipe/sp_flush.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/pipe/softpipe/sp_clear.c b/src/mesa/pipe/softpipe/sp_clear.c
index f32e834ac0e..5b3857145d6 100644
--- a/src/mesa/pipe/softpipe/sp_clear.c
+++ b/src/mesa/pipe/softpipe/sp_clear.c
@@ -59,7 +59,7 @@ softpipe_clear(struct pipe_context *pipe, struct pipe_surface *ps,
return;
}
- for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
+ for (i = 0; i < softpipe->framebuffer.num_cbufs; i++) {
if (ps == sp_tile_cache_get_surface(softpipe->cbuf_cache[i])) {
sp_tile_cache_clear(softpipe->cbuf_cache[i], clearValue);
return;
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index bdfd6228ef8..df4e0cbd5ae 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -94,7 +94,7 @@ softpipe_unmap_surfaces(struct softpipe_context *sp)
struct pipe_surface *ps;
uint i;
- for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
+ for (i = 0; i < sp->framebuffer.num_cbufs; i++)
sp_flush_tile_cache(sp, sp->cbuf_cache[i]);
sp_flush_tile_cache(sp, sp->zbuf_cache);
sp_flush_tile_cache(sp, sp->sbuf_cache);
diff --git a/src/mesa/pipe/softpipe/sp_flush.c b/src/mesa/pipe/softpipe/sp_flush.c
index 1010924bf61..47b11803ce1 100644
--- a/src/mesa/pipe/softpipe/sp_flush.c
+++ b/src/mesa/pipe/softpipe/sp_flush.c
@@ -55,7 +55,7 @@ softpipe_flush( struct pipe_context *pipe,
* - flush the render cache
*/
- for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
+ for (i = 0; i < softpipe->framebuffer.num_cbufs; i++)
if (softpipe->cbuf_cache[i])
sp_flush_tile_cache(softpipe, softpipe->cbuf_cache[i]);