/* Iterate through all linked shaders */
struct nir_link_uniforms_state state = {0,};
- if (!prog->data->spirv) {
+ if (!prog->data->spirv && !consts->DisableUniformArrayResize) {
/* Gather information on uniform use */
for (unsigned stage = 0; stage < MESA_SHADER_STAGES; stage++) {
struct gl_linked_shader *sh = prog->_LinkedShaders[stage];
DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(false)
DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED(false)
DRI_CONF_DISABLE_ARB_GPU_SHADER5(false)
+ DRI_CONF_DISABLE_UNIFORM_ARRAY_RESIZE(false)
DRI_CONF_FORCE_GLSL_VERSION(0)
DRI_CONF_ALLOW_EXTRA_PP_TOKENS(false)
DRI_CONF_ALLOW_GLSL_EXTENSION_DIRECTIVE_MIDSHADER(false)
query_bool_option(disable_blend_func_extended);
query_bool_option(disable_arb_gpu_shader5);
query_bool_option(disable_glsl_line_continuations);
+ query_bool_option(disable_uniform_array_resize);
query_bool_option(force_compat_shaders);
query_bool_option(force_glsl_extensions_warn);
query_int_option(force_glsl_version);
bool disable_blend_func_extended;
bool disable_glsl_line_continuations;
bool disable_arb_gpu_shader5;
+ bool disable_uniform_array_resize;
bool force_compat_shaders;
bool force_glsl_extensions_warn;
unsigned force_glsl_version;
GLboolean DisableTransformFeedbackPacking;
/**
+ * Disable the glsl optimisation that resizes uniform arrays.
+ */
+ bool DisableUniformArrayResize;
+
+ /**
* Align varyings to POT in a slot
*
* Drivers that prefer varyings to be aligned to POT must set this value to GL_TRUE
if (options->disable_glsl_line_continuations)
consts->DisableGLSLLineContinuations = 1;
+ if (options->disable_uniform_array_resize)
+ consts->DisableUniformArrayResize = 1;
+
if (options->allow_glsl_extension_directive_midshader)
consts->AllowGLSLExtensionDirectiveMidShader = GL_TRUE;
<option name="force_glsl_extensions_warn" value="true" />
</application>
+ <application name="Dune: Spice Wars" executable="D4X.exe">
+ <option name="disable_uniform_array_resize" value="true" />
+ </application>
+
<application name="Dying Light" executable="DyingLightGame">
<option name="allow_glsl_builtin_variable_redeclaration" value="true" />
</application>
DRI_CONF_OPT_B(disable_glsl_line_continuations, def, \
"Disable backslash-based line continuations in GLSL source")
+#define DRI_CONF_DISABLE_UNIFORM_ARRAY_RESIZE(def) \
+ DRI_CONF_OPT_B(disable_uniform_array_resize, def, \
+ "Disable the glsl optimisation that resizes uniform arrays")
+
#define DRI_CONF_FORCE_GLSL_VERSION(def) \
DRI_CONF_OPT_I(force_glsl_version, def, 0, 999, \
"Force a default GLSL version for shaders that lack an explicit #version line")