From 7568a89500c35f14cbd397f87c77acc915afc672 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 30 Jul 2013 22:29:27 +0200 Subject: [PATCH] st/dri: add a new driconf option disable_shader_bit_encoding for Unigine Now Unigine Heaven 3.0 finally works with r600g. Reviewed-by: Kenneth Graunke Reviewed-by: Brian Paul --- src/gallium/include/state_tracker/st_api.h | 1 + src/gallium/state_trackers/dri/common/dri_context.c | 2 ++ src/gallium/state_trackers/dri/common/dri_screen.c | 3 ++- src/gallium/state_trackers/osmesa/osmesa.c | 1 + src/mesa/drivers/dri/common/drirc | 6 ++++++ src/mesa/drivers/dri/common/xmlpool/t_options.h | 5 +++++ src/mesa/state_tracker/st_extensions.c | 5 ++++- 7 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h index 539dec0f0c5..3ecd12e91af 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -241,6 +241,7 @@ struct st_config_options { boolean disable_blend_func_extended; boolean disable_glsl_line_continuations; + boolean disable_shader_bit_encoding; 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 b4ee2c8c9ff..031e951b9db 100644 --- a/src/gallium/state_trackers/dri/common/dri_context.c +++ b/src/gallium/state_trackers/dri/common/dri_context.c @@ -46,6 +46,8 @@ static void dri_fill_st_options(struct st_config_options *options, driQueryOptionb(optionCache, "disable_blend_func_extended"); options->disable_glsl_line_continuations = driQueryOptionb(optionCache, "disable_glsl_line_continuations"); + options->disable_shader_bit_encoding = + driQueryOptionb(optionCache, "disable_shader_bit_encoding"); options->force_glsl_extensions_warn = driQueryOptionb(optionCache, "force_glsl_extensions_warn"); options->force_glsl_version = diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index 6e999b1878b..3b42b5aa243 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_DISABLE_SHADER_BIT_ENCODING("false") DRI_CONF_FORCE_GLSL_VERSION(0) DRI_CONF_SECTION_END @@ -73,7 +74,7 @@ PUBLIC const char __driConfigOptions[] = #define false 0 -static const uint __driNConfigOptions = 12; +static const uint __driNConfigOptions = 13; 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 5b63b8baf39..9f9d2ad033c 100644 --- a/src/gallium/state_trackers/osmesa/osmesa.c +++ b/src/gallium/state_trackers/osmesa/osmesa.c @@ -545,6 +545,7 @@ OSMesaCreateContextExt(GLenum format, GLint depthBits, GLint stencilBits, attribs.options.force_glsl_extensions_warn = FALSE; attribs.options.disable_blend_func_extended = FALSE; attribs.options.disable_glsl_line_continuations = FALSE; + attribs.options.disable_shader_bit_encoding = FALSE; attribs.options.force_s3tc_enable = FALSE; attribs.options.force_glsl_version = 0; diff --git a/src/mesa/drivers/dri/common/drirc b/src/mesa/drivers/dri/common/drirc index b5430eda5db..ebc04cd9bf7 100644 --- a/src/mesa/drivers/dri/common/drirc +++ b/src/mesa/drivers/dri/common/drirc @@ -18,6 +18,10 @@ Application bugs worked around in this file: fails to compile with GLSL 1.10. Adding "#version 130" fixes this. +* Unigine Heaven 3.0 with ARB_shader_bit_encoding uses a "uint & int" + expression, which fails (and should fail) to compile with any GLSL version. + Disabling ARB_shader_bit_encoding fixes this. + TODO: document the other workarounds. --> @@ -40,12 +44,14 @@ TODO: document the other workarounds.