i965: Remove "disable_derivative_optimization" driconf option.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 1 Dec 2014 05:58:03 +0000 (21:58 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 3 Dec 2014 01:00:26 +0000 (17:00 -0800)
This was added in September 2013 when we first implemented the fast
(but lower quality) derivatives.  A quick Google search didn't turn
up anyone using or recommending the option, so I suspect no one does.

Applications that want to control the quality of their derivatives can
use the new GL_ARB_derivative_control extension, or use the glHint
mechanism.  The driconf option seems superfluous.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_wm.c
src/mesa/drivers/dri/i965/intel_screen.c

index 8b0f391ecda8243e460bc7ec968451f54cc1e54b..5830b6e442d557cea64567e19cd6b5db3810bccd 100644 (file)
@@ -630,9 +630,6 @@ brw_process_driconf_options(struct brw_context *brw)
       brw->disable_throttling = true;
    }
 
-   brw->disable_derivative_optimization =
-      driQueryOptionb(&brw->optionCache, "disable_derivative_optimization");
-
    brw->precompile = driQueryOptionb(&brw->optionCache, "shader_precompile");
 
    ctx->Const.ForceGLSLExtensionsWarn =
index c4e96dee3277386342a8dd9c6b0c37aa0c95ac5e..b0f699f5d10ffc8e6203925549fa0f655f84a7b4 100644 (file)
@@ -1019,7 +1019,6 @@ struct brw_context
    bool always_flush_cache;
    bool disable_throttling;
    bool precompile;
-   bool disable_derivative_optimization;
 
    driOptionCache optionCache;
    /** @} */
index 5ed42339ad86b17022bc99e6dc8af97e9b0d433c..c6cd73b3bfde6ab04b560c9b917a48445527f3ca 100644 (file)
@@ -3793,12 +3793,6 @@ brw_fs_precompile(struct gl_context *ctx,
                           key.nr_color_regions > 1;
    }
 
-   /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT is almost always GL_DONT_CARE.  The
-    * quality of the derivatives is likely to be determined by the driconf
-    * option.
-    */
-   key.high_quality_derivatives = brw->disable_derivative_optimization;
-
    key.program_string_id = bfp->id;
 
    uint32_t old_prog_offset = brw->wm.base.prog_offset;
index 01838522799eb96232213238a087a2ed28de8811..fe36dd422850695d695c83546f6cc737def6010c 100644 (file)
@@ -468,13 +468,8 @@ static void brw_wm_populate_key( struct brw_context *brw,
    key->line_aa = line_aa;
 
    /* _NEW_HINT */
-   if (brw->disable_derivative_optimization) {
-      key->high_quality_derivatives =
-         ctx->Hint.FragmentShaderDerivative != GL_FASTEST;
-   } else {
-      key->high_quality_derivatives =
-         ctx->Hint.FragmentShaderDerivative == GL_NICEST;
-   }
+   key->high_quality_derivatives =
+      ctx->Hint.FragmentShaderDerivative == GL_NICEST;
 
    if (brw->gen < 6)
       key->stats_wm = brw->stats_wm;
index 6618c1ab4093da01f4fa5a15e68fe4167bdddc4a..cea7ddfe67ad19c25edc8110734904974f1e1ade 100644 (file)
@@ -61,10 +61,6 @@ DRI_CONF_BEGIN
       DRI_CONF_OPT_BEGIN_B(hiz, "true")
         DRI_CONF_DESC(en, "Enable Hierarchical Z on gen6+")
       DRI_CONF_OPT_END
-
-      DRI_CONF_OPT_BEGIN_B(disable_derivative_optimization, "false")
-        DRI_CONF_DESC(en, "Derivatives with finer granularity by default")
-      DRI_CONF_OPT_END
    DRI_CONF_SECTION_END
 
    DRI_CONF_SECTION_QUALITY