glsl: don't limit fp16 lowering to frag
authorRob Clark <robdclark@chromium.org>
Thu, 2 Apr 2020 21:08:54 +0000 (14:08 -0700)
committerMarge Bot <eric+marge@anholt.net>
Sat, 4 Apr 2020 00:07:10 +0000 (00:07 +0000)
This restriction doesn't belong in core code.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4423>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4423>

src/compiler/glsl/glsl_parser_extras.cpp

index d930c30a7e15457e9e8c27ef17a0bd3def148373..c6e3999caf5c08bc252a6cad8dab5add3b2a4c1c 100644 (file)
@@ -2236,7 +2236,7 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
       &ctx->Const.ShaderCompilerOptions[shader->Stage];
 
    if (!state->error && !shader->ir->is_empty()) {
-      if (options->LowerPrecision && shader->Stage == MESA_SHADER_FRAGMENT)
+      if (options->LowerPrecision)
          lower_precision(shader->ir);
       lower_builtins(shader->ir);
       assign_subroutine_indexes(state);