From 90dbab0f9a2e35595b7510595b464e654b870e3a Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 14 Jun 2018 11:00:22 +1000 Subject: mesa/util: add allow_glsl_builtin_const_expression driconf override Google Earth VR shaders uses builtins in constant expressions with GLSL 1.10. That feature wasn't allowed until GLSL 1.20. Reviewed-by: Dave Airlie --- src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 1 + src/gallium/include/state_tracker/st_api.h | 1 + src/gallium/state_trackers/dri/dri_screen.c | 2 ++ 3 files changed, 4 insertions(+) (limited to 'src/gallium') diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h index 21dc599dc26..f25f2080080 100644 --- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h +++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h @@ -23,6 +23,7 @@ DRI_CONF_SECTION_DEBUG DRI_CONF_DISABLE_SHADER_BIT_ENCODING("false") 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_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 ec6e7844b87..1efc7f081d1 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -222,6 +222,7 @@ struct st_config_options boolean force_glsl_extensions_warn; unsigned force_glsl_version; boolean allow_glsl_extension_directive_midshader; + boolean allow_glsl_builtin_const_expression; 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 aaee9870776..a86b7519364 100644 --- a/src/gallium/state_trackers/dri/dri_screen.c +++ b/src/gallium/state_trackers/dri/dri_screen.c @@ -74,6 +74,8 @@ dri_fill_st_options(struct dri_screen *screen) driQueryOptioni(optionCache, "force_glsl_version"); options->allow_glsl_extension_directive_midshader = driQueryOptionb(optionCache, "allow_glsl_extension_directive_midshader"); + options->allow_glsl_builtin_const_expression = + driQueryOptionb(optionCache, "allow_glsl_builtin_const_expression"); options->allow_glsl_builtin_variable_redeclaration = driQueryOptionb(optionCache, "allow_glsl_builtin_variable_redeclaration"); options->allow_higher_compat_version = -- cgit v1.2.3