summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-11-07 17:28:33 -0700
committerBrian Paul <[email protected]>2013-11-11 08:12:18 -0700
commit34ce1a850236b94186f73c24a7ddb0f18075eb94 (patch)
treeb5e450678aba1ab8d5ca47dc07ee5eda9b53f38e /src/gallium/drivers/svga/svga_context.c
parent2182d2db28e9ae5c276dcbad1309cf3484a4476e (diff)
svga: improve loops over color buffers
Only loop over the actual number of color buffers supported, not PIPE_MAX_COLOR_BUFS. Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_context.c')
-rw-r--r--src/gallium/drivers/svga/svga_context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c
index 83afe796f4b..21fe73ad152 100644
--- a/src/gallium/drivers/svga/svga_context.c
+++ b/src/gallium/drivers/svga/svga_context.c
@@ -246,6 +246,7 @@ void svga_hwtnl_flush_buffer( struct svga_context *svga,
*/
void svga_surfaces_flush(struct svga_context *svga)
{
+ struct svga_screen *svgascreen = svga_screen(svga->pipe.screen);
unsigned i;
/* Emit buffered drawing commands.
@@ -254,7 +255,7 @@ void svga_surfaces_flush(struct svga_context *svga)
/* Emit back-copy from render target view to texture.
*/
- for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
+ for (i = 0; i < svgascreen->max_color_buffers; i++) {
if (svga->curr.framebuffer.cbufs[i])
svga_propagate_surface(svga, svga->curr.framebuffer.cbufs[i]);
}