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 <airlied@redhat.com>
This commit is contained in:
Timothy Arceri
2018-06-14 11:00:24 +10:00
parent 781c23ece6
commit 725b1a406d
8 changed files with 33 additions and 10 deletions
+2 -1
View File
@@ -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