i965: Always set MaxViewports and related limits
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 8 Nov 2016 18:10:34 +0000 (10:10 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 6 Jan 2017 20:42:43 +0000 (12:42 -0800)
Since 9d6ca7c3, there should be no performance hit for having
MaxViewports > 1.  Always set this context state.  This eliminates the
need to update this conditional as we add support for OES_viewport_array
on older GPUs.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.c

index 0b9d2a05bf65f19343da6cf2a6bcb8109e86b54a..f939463539c850c12a6fcecdd4b89a5472add0fb 100644 (file)
@@ -795,8 +795,7 @@ brw_initialize_context_constants(struct brw_context *brw)
    }
 
    /* ARB_viewport_array, OES_viewport_array */
-   if ((brw->gen >= 6 && ctx->API == API_OPENGL_CORE) ||
-       (brw->gen >= 8  && ctx->API == API_OPENGLES2)) {
+   if (brw->gen >= 6) {
       ctx->Const.MaxViewports = GEN6_NUM_VIEWPORTS;
       ctx->Const.ViewportSubpixelBits = 0;