diff options
author | Marek Olšák <marek.olsak@amd.com> | 2013-07-30 22:29:24 +0200 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2013-08-06 09:26:01 -0700 |
commit | 78e760c234f4552fcb0166a146dbdb1ab5186bad (patch) | |
tree | 649479548f6ee56ccd6dd61d10688cc63d168c3e /src/gallium | |
parent | 71891ce017cd22a1be3c2a90c12073b146b45b66 (diff) |
mesa,glsl,st/dri: add a new driconf option force_glsl_version for Unigine
See documentation in mtypes.h.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 0f6a7cb00c86fbdb415b01450bb1ece8cfe1e31d)
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/include/state_tracker/st_api.h | 5 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_context.c | 10 | ||||
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_screen.c | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/osmesa/osmesa.c | 1 |
4 files changed, 12 insertions, 7 deletions
diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h index 2c178b6951d..539dec0f0c5 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -239,9 +239,10 @@ struct st_visual */ struct st_config_options { - boolean force_glsl_extensions_warn; - boolean disable_glsl_line_continuations; boolean disable_blend_func_extended; + boolean disable_glsl_line_continuations; + boolean force_glsl_extensions_warn; + unsigned force_glsl_version; boolean force_s3tc_enable; }; diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c index ab80fc75bd4..b36daf3b0cc 100644 --- a/src/gallium/state_trackers/dri/common/dri_context.c +++ b/src/gallium/state_trackers/dri/common/dri_context.c @@ -52,12 +52,14 @@ dri_pp_query(struct dri_context *ctx) static void dri_fill_st_options(struct st_config_options *options, const struct driOptionCache * optionCache) { - options->force_glsl_extensions_warn = - driQueryOptionb(optionCache, "force_glsl_extensions_warn"); - options->disable_glsl_line_continuations = - driQueryOptionb(optionCache, "disable_glsl_line_continuations"); options->disable_blend_func_extended = driQueryOptionb(optionCache, "disable_blend_func_extended"); + options->disable_glsl_line_continuations = + driQueryOptionb(optionCache, "disable_glsl_line_continuations"); + options->force_glsl_extensions_warn = + driQueryOptionb(optionCache, "force_glsl_extensions_warn"); + options->force_glsl_version = + driQueryOptioni(optionCache, "force_glsl_version"); options->force_s3tc_enable = driQueryOptionb(optionCache, "force_s3tc_enable"); } diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index f19998bb7ba..6a694bed097 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.c +++ b/src/gallium/state_trackers/dri/common/dri_screen.c @@ -63,6 +63,7 @@ PUBLIC const char __driConfigOptions[] = DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN("false") DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false") DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false") + DRI_CONF_FORCE_GLSL_VERSION(0) DRI_CONF_SECTION_END DRI_CONF_SECTION_MISCELLANEOUS @@ -72,7 +73,7 @@ PUBLIC const char __driConfigOptions[] = #define false 0 -static const uint __driNConfigOptions = 11; +static const uint __driNConfigOptions = 12; static const __DRIconfig ** dri_fill_in_modes(struct dri_screen *screen) diff --git a/src/gallium/state_trackers/osmesa/osmesa.c b/src/gallium/state_trackers/osmesa/osmesa.c index 594372bd725..5b63b8baf39 100644 --- a/src/gallium/state_trackers/osmesa/osmesa.c +++ b/src/gallium/state_trackers/osmesa/osmesa.c @@ -546,6 +546,7 @@ OSMesaCreateContextExt(GLenum format, GLint depthBits, GLint stencilBits, attribs.options.disable_blend_func_extended = FALSE; attribs.options.disable_glsl_line_continuations = FALSE; attribs.options.force_s3tc_enable = FALSE; + attribs.options.force_glsl_version = 0; osmesa_init_st_visual(&attribs.visual, PIPE_FORMAT_R8G8B8A8_UNORM, |