diff options
author | Timothy Arceri <[email protected]> | 2018-06-14 11:00:24 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-06-19 12:09:56 +1000 |
commit | 725b1a406dbe98d7cd187b0dcdfdd0933977de89 (patch) | |
tree | 388d90d9c8b72a4b0d3d724b137147af48b7e2de /src/gallium | |
parent | 781c23ece62cc9bf0f28035572be7a4eadf23d42 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 1 | ||||
-rw-r--r-- | src/gallium/include/state_tracker/st_api.h | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/dri_screen.c | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h index f25f2080080..90dbf658a6d 100644 --- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h +++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h @@ -24,6 +24,7 @@ DRI_CONF_SECTION_DEBUG DRI_CONF_FORCE_GLSL_VERSION(0) DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER("false") DRI_CONF_ALLOW_GLSL_BUILTIN_CONST_EXPRESSION("false") + DRI_CONF_ALLOW_GLSL_RELAXED_ES("false") DRI_CONF_ALLOW_GLSL_BUILTIN_VARIABLE_REDECLARATION("false") DRI_CONF_ALLOW_GLSL_CROSS_STAGE_INTERPOLATION_MISMATCH("false") DRI_CONF_ALLOW_HIGHER_COMPAT_VERSION("false") diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h index 1efc7f081d1..5b72c0afc99 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -223,6 +223,7 @@ struct st_config_options unsigned force_glsl_version; boolean allow_glsl_extension_directive_midshader; boolean allow_glsl_builtin_const_expression; + boolean allow_glsl_relaxed_es; boolean allow_glsl_builtin_variable_redeclaration; boolean allow_higher_compat_version; boolean glsl_zero_init; diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c index a86b7519364..6228425d9a2 100644 --- a/src/gallium/state_trackers/dri/dri_screen.c +++ b/src/gallium/state_trackers/dri/dri_screen.c @@ -76,6 +76,8 @@ dri_fill_st_options(struct dri_screen *screen) driQueryOptionb(optionCache, "allow_glsl_extension_directive_midshader"); options->allow_glsl_builtin_const_expression = driQueryOptionb(optionCache, "allow_glsl_builtin_const_expression"); + options->allow_glsl_relaxed_es = + driQueryOptionb(optionCache, "allow_glsl_relaxed_es"); options->allow_glsl_builtin_variable_redeclaration = driQueryOptionb(optionCache, "allow_glsl_builtin_variable_redeclaration"); options->allow_higher_compat_version = |