aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_screen.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_screen.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_screen.c')
-rw-r--r--src/gallium/drivers/svga/svga_screen.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index cc6214dfbc5..3c013eaec49 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -154,10 +154,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_TGSI_TEXCOORD:
return 0;
case PIPE_CAP_MAX_RENDER_TARGETS:
- /* The SVGA3D device always supports 4 targets at this time, regardless
- * of what querying SVGA3D_DEVCAP_MAX_RENDER_TARGETS might return.
- */
- return 4;
+ return svgascreen->max_color_buffers;
case PIPE_CAP_OCCLUSION_QUERY:
return 1;
case PIPE_CAP_QUERY_TIME_ELAPSED:
@@ -661,6 +658,11 @@ svga_screen_create(struct svga_winsys_screen *sws)
svgascreen->maxPointSize = MIN2(result.f, 80.0f);
}
+ /* The SVGA3D device always supports 4 targets at this time, regardless
+ * of what querying SVGA3D_DEVCAP_MAX_RENDER_TARGETS might return.
+ */
+ svgascreen->max_color_buffers = 4;
+
pipe_mutex_init(svgascreen->tex_mutex);
pipe_mutex_init(svgascreen->swc_mutex);