Mesa (master): i965/gen6+: Support 128 varying components.

Paul Berry stereotype441 at kemper.freedesktop.org
Mon Sep 16 20:07:17 UTC 2013


Module: Mesa
Branch: master
Commit: 24765c58bd7b041f92ff51ec354f5d6b0ce35daa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=24765c58bd7b041f92ff51ec354f5d6b0ce35daa

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Sep  3 12:37:47 2013 -0700

i965/gen6+: Support 128 varying components.

GL 3.2 requires us to support 128 varying components for geometry
shader outputs and fragment shader inputs, and 64 varying components
otherwise.  But there's no hardware limitation that restricts us to 64
varying components, and core Mesa doesn't currently allow different
stages to have different maximum values, so just go ahead and enable
128 varying components for all stages.  This gets us better test
coverage anyway.

Even though we are only working on GL 3.2 support for gen7 right now,
gen6 also supports 128 varying components, so go ahead and switch it
on there too.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_context.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 4fcc9fb..7b38ea3 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -247,6 +247,9 @@ brw_initialize_context_constants(struct brw_context *brw)
    ctx->Const.DisableGLSLLineContinuations =
       driQueryOptionb(&brw->optionCache, "disable_glsl_line_continuations");
 
+   if (brw->gen >= 6)
+      ctx->Const.MaxVarying = 32;
+
    /* We want the GLSL compiler to emit code that uses condition codes */
    for (int i = 0; i < MESA_SHADER_TYPES; i++) {
       ctx->ShaderCompilerOptions[i].MaxIfDepth = brw->gen < 6 ? 16 : UINT_MAX;




More information about the mesa-commit mailing list