stack.back().state = CANT_LOWER;
 
    /* Don't lower precision for derivative calculations */
-   if (ir->operation == ir_unop_dFdx ||
-         ir->operation == ir_unop_dFdx_coarse ||
-         ir->operation == ir_unop_dFdx_fine ||
-         ir->operation == ir_unop_dFdy ||
-         ir->operation == ir_unop_dFdy_coarse ||
-         ir->operation == ir_unop_dFdy_fine) {
+   if (!options->LowerPrecisionDerivatives &&
+       (ir->operation == ir_unop_dFdx ||
+        ir->operation == ir_unop_dFdx_coarse ||
+        ir->operation == ir_unop_dFdx_fine ||
+        ir->operation == ir_unop_dFdy ||
+        ir->operation == ir_unop_dFdy_coarse ||
+        ir->operation == ir_unop_dFdy_fine)) {
       stack.back().state = CANT_LOWER;
    }
 
 
             &ctx->Const.ShaderCompilerOptions[i];
          options->LowerPrecisionFloat16 = true;
          options->LowerPrecisionInt16 = true;
+         options->LowerPrecisionDerivatives = true;
       }
    }
 
 
          }
          """,
          r'\(expression +uint16_t min'),
+    Test("dFdx",
+         """
+         #version 300 es
+         precision mediump float;
+
+         in vec4 var;
+         out vec4 color;
+
+         void main()
+         {
+                 color = dFdx(var);
+         }
+         """,
+         r'\(expression +f16vec4 +dFdx +\(expression +f16vec4'),
+    Test("dFdy",
+         """
+         #version 300 es
+         precision mediump float;
+
+         in vec4 var;
+         out vec4 color;
+
+         void main()
+         {
+                 color = dFdy(var);
+         }
+         """,
+         r'\(expression +f16vec4 +dFdy +\(expression +f16vec4'),
 ]
 
 
 
     */
    GLboolean LowerPrecisionFloat16;
    GLboolean LowerPrecisionInt16;
+   GLboolean LowerPrecisionDerivatives;
 
    /**
     * \name Forms of indirect addressing the driver cannot do.