i965: Use NIR by default for fragment shaders
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 10 Apr 2015 23:24:11 +0000 (16:24 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 11 Apr 2015 00:19:54 +0000 (17:19 -0700)
GLSL IR vs. NIR shader-db results on i965:

   total instructions in shared programs: 2889747 -> 2890782 (0.04%)
   instructions in affected programs:     2425446 -> 2426481 (0.04%)
   helped:                                3698
   HURT:                                  5341

GLSL IR vs. NIR shader-db results on g4x:

   total instructions in shared programs: 2547252 -> 2550440 (0.13%)
   instructions in affected programs:     1984482 -> 1987670 (0.16%)
   helped:                                2844
   HURT:                                  4776

GLSL IR vs. NIR shader-db results on Iron Lake:

   total instructions in shared programs: 4053381 -> 4063828 (0.26%)
   instructions in affected programs:     3026601 -> 3037048 (0.35%)
   helped:                                4110
   HURT:                                  8331
   GAINED:                                1287
   LOST:                                  9

GLSL IR vs. NIR shader-db results on Sandy Bridge:

   total instructions in shared programs: 5307041 -> 5236666 (-1.33%)
   instructions in affected programs:     3442908 -> 3372533 (-2.04%)
   helped:                                11829
   HURT:                                  5604
   GAINED:                                33
   LOST:                                  18

GLSL IR vs. NIR shader-db results on Ivy Bridge:

   total instructions in shared programs: 4926333 -> 4857017 (-1.41%)
   instructions in affected programs:     3144042 -> 3074726 (-2.20%)
   helped:                                11559
   HURT:                                  4774
   GAINED:                                46
   LOST:                                  25

GLSL IR vs. NIR shader-db results on Bay Trail:

   total instructions in shared programs: 4926333 -> 4857017 (-1.41%)
   instructions in affected programs:     3144042 -> 3074726 (-2.20%)
   helped:                                11559
   HURT:                                  4774
   GAINED:                                46
   LOST:                                  25

GLSL IR vs. NIR shader-db results on Haswell:

   total instructions in shared programs: 4392487 -> 4293476 (-2.25%)
   instructions in affected programs:     2800180 -> 2701169 (-3.54%)
   helped:                                13073
   HURT:                                  3383
   GAINED:                                46
   LOST:                                  23

GLSL IR vs. NIR shader-db results on Broadwell (FS only):

   total instructions in shared programs: 4378113 -> 4283025 (-2.17%)
   instructions in affected programs:     2743209 -> 2648121 (-3.47%)
   helped:                                12470
   HURT:                                  3609
   GAINED:                                64
   LOST:                                  27

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.c

index dfd00319309c20aacc613f2e175ad452dc7e0df6..e52c44e3f6d77ab27dc341ef7e006ca4f41e2abf 100644 (file)
@@ -590,7 +590,7 @@ brw_initialize_context_constants(struct brw_context *brw)
          ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].NirOptions = &nir_options;
    }
 
-   if (brw_env_var_as_boolean("INTEL_USE_NIR", false))
+   if (brw_env_var_as_boolean("INTEL_USE_NIR", true))
       ctx->Const.ShaderCompilerOptions[MESA_SHADER_FRAGMENT].NirOptions = &nir_options;
 
    /* ARB_viewport_array */