From 725b1a406dbe98d7cd187b0dcdfdd0933977de89 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 14 Jun 2018 11:00:24 +1000 Subject: mesa/util: add allow_glsl_relaxed_es driconfig override This relaxes a number of ES shader restrictions allowing shaders to follow more desktop GLSL like rules. This initial implementation relaxes the following: - allows linking ES shaders with desktop shaders - allows mismatching precision qualifiers - always enables standard derivative builtins These relaxations allow Google Earth VR shaders to compile. Reviewed-by: Dave Airlie --- src/compiler/glsl/builtin_functions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/compiler/glsl/builtin_functions.cpp') diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp index efe90346d0e..7119903795f 100644 --- a/src/compiler/glsl/builtin_functions.cpp +++ b/src/compiler/glsl/builtin_functions.cpp @@ -446,7 +446,8 @@ fs_oes_derivatives(const _mesa_glsl_parse_state *state) { return state->stage == MESA_SHADER_FRAGMENT && (state->is_version(110, 300) || - state->OES_standard_derivatives_enable); + state->OES_standard_derivatives_enable || + state->ctx->Const.AllowGLSLRelaxedES); } static bool -- cgit v1.2.3