st/mesa: initialize Const.MaxColorAttachments
authorMarek Olšák <maraeo@gmail.com>
Thu, 2 May 2013 01:29:47 +0000 (03:29 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sat, 11 May 2013 21:45:02 +0000 (23:45 +0200)
NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_extensions.c

index 43fba0105e95dcbe8be025404cbab633c63105cf..b64d363d3497599db57fba44c278147e439d0be3 100644 (file)
@@ -101,9 +101,9 @@ void st_init_limits(struct st_context *st)
    c->MaxViewportHeight =
    c->MaxRenderbufferSize = c->MaxTextureRectSize;
 
-   c->MaxDrawBuffers
-      _clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
-              1, MAX_DRAW_BUFFERS);
+   c->MaxDrawBuffers = c->MaxColorAttachments =
+      _clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
+             1, MAX_DRAW_BUFFERS);
 
    c->MaxDualSourceDrawBuffers
       = _clamp(screen->get_param(screen, PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS),
@@ -139,10 +139,6 @@ void st_init_limits(struct st_context *st)
    c->MaxTextureLodBias
       = screen->get_paramf(screen, PIPE_CAPF_MAX_TEXTURE_LOD_BIAS);
 
-   c->MaxDrawBuffers
-      = CLAMP(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
-              1, MAX_DRAW_BUFFERS);
-
    c->QuadsFollowProvokingVertexConvention = screen->get_param(
       screen, PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION);