svga: reduce looping in svga_mark_surfaces_dirty()

We don't need to loop over the max number of color buffers, just the
current number (which is usually one).

Tested with full Piglit run, Heaven 4.0, etc.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
This commit is contained in:
Brian Paul
2016-08-01 16:30:14 -06:00
parent 88efaf9878
commit ced0dd0e95
+1 -1
View File
@@ -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]);
}