diff options
author | Tapani Pälli <[email protected]> | 2017-11-24 07:46:07 +0200 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2017-11-30 11:43:10 +0200 |
commit | faccbaf3faf9a7cdcda3e4032fafd0f6064459bd (patch) | |
tree | dff07c0c37ff3198f58ae018f2b04762612d0e3d /src/mesa | |
parent | 8c1e4b1afc8d396ccf99c725c59b29a9aa305557 (diff) |
mesa: add AllowGLSLCrossStageInterpolationMismatch workaround
This fixes issues seen with certain versions of Unreal Engine 4 editor
and games built with that using GLSL 4.30.
v2: add driinfo_gallium change (Emil Velikov)
Signed-off-by: Tapani Pälli <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97852
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103801
Acked-by: Andres Gomez <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_screen.c | 1 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 5 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 2 |
4 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index dd55b436698..b62852d90c8 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -816,6 +816,9 @@ brw_process_driconf_options(struct brw_context *brw) brw->dual_color_blend_by_location = driQueryOptionb(options, "dual_color_blend_by_location"); + ctx->Const.AllowGLSLCrossStageInterpolationMismatch = + driQueryOptionb(options, "allow_glsl_cross_stage_interpolation_mismatch"); + ctx->Const.dri_config_options_sha1 = ralloc_array(brw, unsigned char, 20); driComputeOptionsSha1(&brw->screen->optionCache, ctx->Const.dri_config_options_sha1); diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 38769babf0c..db1552c1880 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -81,6 +81,7 @@ DRI_CONF_BEGIN DRI_CONF_DUAL_COLOR_BLEND_BY_LOCATION("false") DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER("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") DRI_CONF_FORCE_GLSL_ABS_SQRT("false") diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 96775824ea6..0e8a05359a4 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3718,6 +3718,11 @@ struct gl_constants GLboolean AllowGLSLBuiltinVariableRedeclaration; /** + * Allow GLSL interpolation qualifier mismatch across shader stages. + */ + GLboolean AllowGLSLCrossStageInterpolationMismatch; + + /** * Allow creating a higher compat profile (version 3.1+) for apps that * request it. Be careful when adding that driconf option because some * features are unimplemented and might not work correctly. diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index de3d1ef4e9b..9ef0df1e926 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -941,6 +941,8 @@ void st_init_extensions(struct pipe_screen *screen, consts->dri_config_options_sha1 = options->config_options_sha1; + consts->AllowGLSLCrossStageInterpolationMismatch = options->allow_glsl_cross_stage_interpolation_mismatch; + if (consts->GLSLVersion >= 400) extensions->ARB_gpu_shader5 = GL_TRUE; if (consts->GLSLVersion >= 410) |