diff --git a/src/compiler/glsl/lower_precision.cpp b/src/compiler/glsl/lower_precision.cpp index 7a690a3c2c8..c2b1f169a02 100644 --- a/src/compiler/glsl/lower_precision.cpp +++ b/src/compiler/glsl/lower_precision.cpp @@ -408,7 +408,7 @@ find_lowerable_rvalues_visitor::visit_enter(ir_expression *ir) stack.back().state = CANT_LOWER; /* Don't lower precision for derivative calculations */ - if (!options->LowerPrecisionDerivatives && + if (!screen->shader_caps[stage].fp16_derivatives && (ir->operation == ir_unop_dFdx || ir->operation == ir_unop_dFdx_coarse || ir->operation == ir_unop_dFdx_fine || diff --git a/src/compiler/glsl/standalone.cpp b/src/compiler/glsl/standalone.cpp index 6eb9a03ee40..2bc2046c1d3 100644 --- a/src/compiler/glsl/standalone.cpp +++ b/src/compiler/glsl/standalone.cpp @@ -367,10 +367,10 @@ standalone_compile_shader(const struct standalone_options *_options, for (unsigned i = MESA_SHADER_VERTEX; i <= MESA_SHADER_COMPUTE; i++) { ((struct pipe_shader_caps*)&ctx->screen->shader_caps[i])->fp16 = true; ((struct pipe_shader_caps*)&ctx->screen->shader_caps[i])->int16 = true; + ((struct pipe_shader_caps*)&ctx->screen->shader_caps[i])->fp16_derivatives = true; struct gl_shader_compiler_options *options = &ctx->Const.ShaderCompilerOptions[i]; - options->LowerPrecisionDerivatives = true; options->LowerPrecisionConstants = true; options->LowerPrecisionFloat16Uniforms = true; options->LowerPrecision16BitLoadDst = true;