[Mesa-dev] [PATCH 1/2] i965: Always set MaxViewports and related limits

Ian Romanick idr at freedesktop.org
Tue Nov 8 18:10:34 UTC 2016


From: Ian Romanick <ian.d.romanick at intel.com>

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 at intel.com>
---
 src/mesa/drivers/dri/i965/brw_context.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index d6204fd..3295eb3 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -778,8 +778,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;
 
-- 
2.5.5



More information about the mesa-dev mailing list