Module: Mesa Branch: master Commit: ced0dd0e9575c3eacd9a618c34175dde0463f393 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ced0dd0e9575c3eacd9a618c34175dde0463f393
Author: Brian Paul <[email protected]> Date: Mon Aug 1 16:30:14 2016 -0600 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 <[email protected]> --- src/gallium/drivers/svga/svga_surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c index e5943cf..e299063 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]); } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
