Mesa (master): i965: Ignore INTEL_SCALAR_* debug variables on Gen10+.

Kenneth Graunke kwg at kemper.freedesktop.org
Tue May 30 04:42:55 UTC 2017


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sat May 13 12:11:40 2017 -0700

i965: Ignore INTEL_SCALAR_* debug variables on Gen10+.

Scalar mode has been default since Broadwell, and vector mode is getting
increasingly unmaintained.  There are a few things that don't even fully
work in vector mode on Skylake, but we've never cared because nobody
uses it.  There's no point in porting it forward to new platforms.

So, just ignore the debug options to force it on.

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/intel/compiler/brw_compiler.c | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/src/intel/compiler/brw_compiler.c b/src/intel/compiler/brw_compiler.c
index cd9473f9a3..aa896b9a33 100644
--- a/src/intel/compiler/brw_compiler.c
+++ b/src/intel/compiler/brw_compiler.c
@@ -112,16 +112,22 @@ brw_compiler_create(void *mem_ctx, const struct gen_device_info *devinfo)
 
    compiler->precise_trig = env_var_as_boolean("INTEL_PRECISE_TRIG", false);
 
-   compiler->scalar_stage[MESA_SHADER_VERTEX] =
-      devinfo->gen >= 8 && !(INTEL_DEBUG & DEBUG_VEC4VS);
-   compiler->scalar_stage[MESA_SHADER_TESS_CTRL] =
-      devinfo->gen >= 8 && env_var_as_boolean("INTEL_SCALAR_TCS", true);
-   compiler->scalar_stage[MESA_SHADER_TESS_EVAL] =
-      devinfo->gen >= 8 && env_var_as_boolean("INTEL_SCALAR_TES", true);
-   compiler->scalar_stage[MESA_SHADER_GEOMETRY] =
-      devinfo->gen >= 8 && env_var_as_boolean("INTEL_SCALAR_GS", true);
-   compiler->scalar_stage[MESA_SHADER_FRAGMENT] = true;
-   compiler->scalar_stage[MESA_SHADER_COMPUTE] = true;
+   if (devinfo->gen >= 10) {
+      /* We don't support vec4 mode on Cannonlake. */
+      for (int i = MESA_SHADER_VERTEX; i < MESA_SHADER_STAGES; i++)
+         compiler->scalar_stage[i] = true;
+   } else {
+      compiler->scalar_stage[MESA_SHADER_VERTEX] =
+         devinfo->gen >= 8 && !(INTEL_DEBUG & DEBUG_VEC4VS);
+      compiler->scalar_stage[MESA_SHADER_TESS_CTRL] =
+         devinfo->gen >= 8 && env_var_as_boolean("INTEL_SCALAR_TCS", true);
+      compiler->scalar_stage[MESA_SHADER_TESS_EVAL] =
+         devinfo->gen >= 8 && env_var_as_boolean("INTEL_SCALAR_TES", true);
+      compiler->scalar_stage[MESA_SHADER_GEOMETRY] =
+         devinfo->gen >= 8 && env_var_as_boolean("INTEL_SCALAR_GS", true);
+      compiler->scalar_stage[MESA_SHADER_FRAGMENT] = true;
+      compiler->scalar_stage[MESA_SHADER_COMPUTE] = true;
+   }
 
    /* We want the GLSL compiler to emit code that uses condition codes */
    for (int i = 0; i < MESA_SHADER_STAGES; i++) {




More information about the mesa-commit mailing list