summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/svga/svga_surface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c
index e5943cfd437..e2990630710 100644
--- a/src/gallium/drivers/svga/svga_surface.c
+++ b/src/gallium/drivers/svga/svga_surface.c
@@ -562,7 +562,7 @@ svga_mark_surfaces_dirty(struct svga_context *svga)
struct svga_screen *svgascreen = svga_screen(svga->pipe.screen);
unsigned i;
- for (i = 0; i < svgascreen->max_color_buffers; i++) {
+ for (i = 0; i < svga->curr.framebuffer.nr_cbufs; i++) {
if (svga->curr.framebuffer.cbufs[i])
svga_mark_surface_dirty(svga->curr.framebuffer.cbufs[i]);
}